SlideShare a Scribd company logo
1 of 30
A Primer for Beginners
Paul W. Frields
Presented by
Red Hat, Inc.
Licensed under a Creative Commons Attribution-ShareAlike (BY-SA) 3.0 license. http://creativecommons.org/by-sa/3.0/
Linux File Systems
Today's Topics
Disks and partitions
Logical Volume Management (LVM)
File system formats
Concentration is on practical use by
home/desktop users
Disks and Partitions
What kind of disks?
SATA – most laptops and home desktops)
IDE, SCSI – mainly outdated
Fibre Channel, Infiniband, and others – high
end
In most cases, your hard disk is probably the
device node /dev/sda
RAID
Redundant Array of Inexpensive Disks
Combine two or more disks into a group that is
managed together
Sacrifices storage capacity for fault tolerance
Avoid for today – this is an hour on its own!
What are partitions?
Divide your disk into usable areas
A map/table at the top describes the layout
In complex setups (>4 partitions), it becomes a
linked list
Most dual-boot systems fall into this category
Each successive table points to another table
further down the disk, and so on...
You need three
/boot – used to bootstrap the GRUB loader
and kernel
swap – used by the kernel to shift older data
out of RAM when memory gets tight
/ (also called “root”) – everything else can be
stored here
Everything in root?
Linux does not have a C: drive, D: drive...
Everything is unified under top level / folder
Under this, /bin, /etc, /var, etc.
How you break up file systems under this is up
to you – let’s look at reasons for and against...
Why break things up?
Guard against “out of space” problems that
might affect the running system
Lets you re-install OS without touching data (try
that on Windows with just a C: drive!)
Why not?
Complexity of understanding partitions
Complexity of management
Figuring out where you ran out of space
Figuring out where you need more space
“But, I have a 640 GB drive, it can’t be full!”
What’s on
your disk? (df)
Installer defaults
Depends on the Linux distro
Most installers pick a good default
DON’T worry about it if you don’t have to
DO note the layout so you can understand
implications
“Disks” tool
LVM
Logical Volume Management
Turns storage into areas that can be flexibly
adjusted after the fact
Don’t use this for /boot or swap
Some installers use by default
Generally a good idea since you may want to
reallocate space later
Adds a level of abstraction (complexity)
LVM concepts
PV (physical volume) – a partition or disk that’s
been added to the LVM pool
VG (volume group) – one or more PVs
connected under a single name and managed
together
LV (logical volume) – a portion of a VG which is
formatted with a file system (like a partition
would be)
From disks to LVs
LVM utilities
pvscan, pvs, pvcreate, pvremove, pvchange...
vgscan, vgs, vgcreate, vgchange, vgextend,
vgreduce, vgremove, vgsplit...
lvscan, lvs, lvcreate, lvchange, lvextend,
lvreduce, lvresize, lvremove, lvrename...
lvm shell utility
LVM system files
Boot time use of LVM defined in /etc/lvm
directory
/etc/lvm/lvm.conf – general configuration
/etc/lvm/backup/vg_name – backup of VG
definition (sizes, locations) – CAREFUL!
/etc/lvm/archive – stores previous
definitions of VGs
What’s on your
disk? (LVM)
Formatted file systems
Live on a partition or LVM logical volume (LV)
Provide orderly arrangement of files
Usually hierarchical (folders, subfolders)
Store file data and metadata (timestamps,
security details, size, etc.)
Examples are ext3fs, ext4fs, btrfs, NTFS, FAT
varieties
Linux and other OS’s
Linux reads and writes most other OS file
systems “out of the box”
The opposite is not necessarily true!
You can get drivers for Linux file systems for
Windows, MacOS
FAT and NTFS
Used primarily by Windows
Also removable media where manufacturer
can’t guess your OS (85-90% case)
NTFS is needed for larger storage (>4 GB)
HFS+ and beyond
Apple MacOS
Older HFS is quite rare nowadays but still
supported in Linux (moving to reaonly)
ext3 and ext4
Standard Linux file systems
Older ext2 not used as much anymore although
it’s basically compatible with ext3
ext3 added journaling capability
ext4 supports much larger file systems
What is btrfs?
Pronounced “better” or “butter eff ess”
Uses more modern file system design similar to
e.g. XFS to achieve higher levels of scalability
and performance for modern workloads
Still adding features and stability
Chances are you won’t need to decide to use;
your distro will pick if/when necessary
File system utilities
Show disk free space (df)
Show disk usage by files (du)
Make a file system (mkfs)
File system check/repair (fsck)
Mount/unmount file system (mount/umount)
The mount utility also shows curent mounts
Mounts
All separate formatted file systems, when
mounted, are part of the single hierarchy
A file system can be mounted on any directory
as a mount point
System defined mounts (used at boot) in the
/etc/fstab file
What’s on your
disk? (mounts)
Summary
Disks can be divided up into partitions
Partitions can be combined and split into LVM
storage
Partitions or LVM logical volumes are mounted
on the system to store files
Questions?
Licensestatementgoeshere.Seehttps://fedoraproject.org/wiki/Licensing#Content_Licensesforacceptablelicenses.
example@fedoraproject.org
Contact:

More Related Content

What's hot

Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Cache optimization
Cache optimizationCache optimization
Cache optimizationKavi Kathir
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device ManagementDamian T. Gordon
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basicsSankar Suriya
 
Lecture6 memory hierarchy
Lecture6 memory hierarchyLecture6 memory hierarchy
Lecture6 memory hierarchyli12x
 
Secondary storage structure-Operating System Concepts
Secondary storage structure-Operating System ConceptsSecondary storage structure-Operating System Concepts
Secondary storage structure-Operating System ConceptsArjun Kaimattathil
 
lotus domino questions answers 2017
lotus domino questions answers 2017lotus domino questions answers 2017
lotus domino questions answers 2017mJOBrr
 
Lpi lição 01 exam 102 objectives
Lpi lição 01  exam 102 objectivesLpi lição 01  exam 102 objectives
Lpi lição 01 exam 102 objectivesAcácio Oliveira
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configurationThamizharasan P
 
101 4.4 manage disk quotas
101 4.4 manage disk quotas101 4.4 manage disk quotas
101 4.4 manage disk quotasAcácio Oliveira
 
Lpi lição 01 exam 101 objectives
Lpi lição 01  exam 101 objectivesLpi lição 01  exam 101 objectives
Lpi lição 01 exam 101 objectivesAcácio Oliveira
 
Memory management in Linux
Memory management in LinuxMemory management in Linux
Memory management in LinuxRaghu Udiyar
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Ahmed El-Arabawy
 
Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagementpradeepelinux
 

What's hot (20)

Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Cache optimization
Cache optimizationCache optimization
Cache optimization
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basics
 
Lecture6 memory hierarchy
Lecture6 memory hierarchyLecture6 memory hierarchy
Lecture6 memory hierarchy
 
Secondary storage structure-Operating System Concepts
Secondary storage structure-Operating System ConceptsSecondary storage structure-Operating System Concepts
Secondary storage structure-Operating System Concepts
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
lotus domino questions answers 2017
lotus domino questions answers 2017lotus domino questions answers 2017
lotus domino questions answers 2017
 
10215 A 10
10215 A 1010215 A 10
10215 A 10
 
Lpi lição 01 exam 102 objectives
Lpi lição 01  exam 102 objectivesLpi lição 01  exam 102 objectives
Lpi lição 01 exam 102 objectives
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configuration
 
101 4.4 manage disk quotas
101 4.4 manage disk quotas101 4.4 manage disk quotas
101 4.4 manage disk quotas
 
Cache memory
Cache memoryCache memory
Cache memory
 
3. intro
3. intro3. intro
3. intro
 
Data recovery glossary w
Data recovery glossary   wData recovery glossary   w
Data recovery glossary w
 
Lpi lição 01 exam 101 objectives
Lpi lição 01  exam 101 objectivesLpi lição 01  exam 101 objectives
Lpi lição 01 exam 101 objectives
 
Memory management in Linux
Memory management in LinuxMemory management in Linux
Memory management in Linux
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
 
Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagement
 
Active directory backup
Active directory backupActive directory backup
Active directory backup
 

Viewers also liked

RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)skalaivanibutp
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1NAILBITER
 
How To View Login History and Logout History on RHEL 7
How To View Login History and Logout History on RHEL 7How To View Login History and Logout History on RHEL 7
How To View Login History and Logout History on RHEL 7VCP Muthukrishna
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting processSiddharth Jain
 
How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7VCP Muthukrishna
 
RHEL-7 Administrator Guide for RedHat 7
RHEL-7  Administrator Guide for RedHat 7RHEL-7  Administrator Guide for RedHat 7
RHEL-7 Administrator Guide for RedHat 7Hemnath R.
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!sourav verma
 

Viewers also liked (13)

Yum (Linux)
Yum (Linux) Yum (Linux)
Yum (Linux)
 
Rh401 rhel6
Rh401 rhel6Rh401 rhel6
Rh401 rhel6
 
Rh199 rhel 7
Rh199   rhel 7Rh199   rhel 7
Rh199 rhel 7
 
RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)
 
RPM (LINUX)
RPM (LINUX)RPM (LINUX)
RPM (LINUX)
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1
 
Rh436 pdf
Rh436 pdfRh436 pdf
Rh436 pdf
 
How To View Login History and Logout History on RHEL 7
How To View Login History and Logout History on RHEL 7How To View Login History and Logout History on RHEL 7
How To View Login History and Logout History on RHEL 7
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting process
 
How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7
 
RHEL-7 Administrator Guide for RedHat 7
RHEL-7  Administrator Guide for RedHat 7RHEL-7  Administrator Guide for RedHat 7
RHEL-7 Administrator Guide for RedHat 7
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 

Similar to Disks and-filesystems

Distributed File System
Distributed File SystemDistributed File System
Distributed File SystemNtu
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 
Xen server storage Overview
Xen server storage OverviewXen server storage Overview
Xen server storage OverviewNuno Alves
 
Files and directories in Linux 6
Files and directories  in Linux 6Files and directories  in Linux 6
Files and directories in Linux 6Meenakshi Paul
 
File system hiearchy
File system hiearchyFile system hiearchy
File system hiearchysritolia
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage SystemAmdocs
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage SystemAmdocs
 
File system Os
File system OsFile system Os
File system OsNehal Naik
 
Distributed file systems
Distributed file systemsDistributed file systems
Distributed file systemsSri Prasanna
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systemsalok pal
 
Hadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsHadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsDrPDShebaKeziaMalarc
 

Similar to Disks and-filesystems (20)

Posscon2013
Posscon2013Posscon2013
Posscon2013
 
Distributed File System
Distributed File SystemDistributed File System
Distributed File System
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Xen server storage Overview
Xen server storage OverviewXen server storage Overview
Xen server storage Overview
 
File system discovery
File system discovery File system discovery
File system discovery
 
CIT173_Ch15_Mnstr_23.pdf
CIT173_Ch15_Mnstr_23.pdfCIT173_Ch15_Mnstr_23.pdf
CIT173_Ch15_Mnstr_23.pdf
 
Olf2013
Olf2013Olf2013
Olf2013
 
Linux
LinuxLinux
Linux
 
Edubooktraining
EdubooktrainingEdubooktraining
Edubooktraining
 
Files and directories in Linux 6
Files and directories  in Linux 6Files and directories  in Linux 6
Files and directories in Linux 6
 
File system hiearchy
File system hiearchyFile system hiearchy
File system hiearchy
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage System
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage System
 
Unix Administration 4
Unix Administration 4Unix Administration 4
Unix Administration 4
 
File system Os
File system OsFile system Os
File system Os
 
Distributed file systems
Distributed file systemsDistributed file systems
Distributed file systems
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
Hadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsHadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data Analytics
 
Storage Managment
Storage ManagmentStorage Managment
Storage Managment
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 

More from plarsen67

Containers in a Kubernetes World
Containers in a Kubernetes WorldContainers in a Kubernetes World
Containers in a Kubernetes Worldplarsen67
 
FREDLUG - Open Broadcast Studio - OBS
FREDLUG - Open Broadcast Studio - OBSFREDLUG - Open Broadcast Studio - OBS
FREDLUG - Open Broadcast Studio - OBSplarsen67
 
Bash and regular expressions
Bash and regular expressionsBash and regular expressions
Bash and regular expressionsplarsen67
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut iiplarsen67
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxplarsen67
 
Open Source - NOVALUG January 2019
Open Source  - NOVALUG January 2019Open Source  - NOVALUG January 2019
Open Source - NOVALUG January 2019plarsen67
 
The ABC of Linux (Linux for Beginners)
The ABC of Linux (Linux for Beginners)The ABC of Linux (Linux for Beginners)
The ABC of Linux (Linux for Beginners)plarsen67
 
Kvm and libvirt
Kvm and libvirtKvm and libvirt
Kvm and libvirtplarsen67
 
JBoss Enterprise Data Services (Data Virtualization)
JBoss Enterprise Data Services (Data Virtualization)JBoss Enterprise Data Services (Data Virtualization)
JBoss Enterprise Data Services (Data Virtualization)plarsen67
 
Open shift 2.x and MongoDB
Open shift 2.x and MongoDBOpen shift 2.x and MongoDB
Open shift 2.x and MongoDBplarsen67
 
Fredlug networking
Fredlug networkingFredlug networking
Fredlug networkingplarsen67
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxplarsen67
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystemsplarsen67
 
Intro fredlug
Intro fredlugIntro fredlug
Intro fredlugplarsen67
 
Lvm and gang 2015
Lvm and gang 2015Lvm and gang 2015
Lvm and gang 2015plarsen67
 
Bash and regular expressions
Bash and regular expressionsBash and regular expressions
Bash and regular expressionsplarsen67
 
Speed Up Development With OpenShift
Speed Up Development With OpenShiftSpeed Up Development With OpenShift
Speed Up Development With OpenShiftplarsen67
 

More from plarsen67 (18)

Containers in a Kubernetes World
Containers in a Kubernetes WorldContainers in a Kubernetes World
Containers in a Kubernetes World
 
FREDLUG - Open Broadcast Studio - OBS
FREDLUG - Open Broadcast Studio - OBSFREDLUG - Open Broadcast Studio - OBS
FREDLUG - Open Broadcast Studio - OBS
 
Bash and regular expressions
Bash and regular expressionsBash and regular expressions
Bash and regular expressions
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Open Source - NOVALUG January 2019
Open Source  - NOVALUG January 2019Open Source  - NOVALUG January 2019
Open Source - NOVALUG January 2019
 
3d printing
3d printing3d printing
3d printing
 
The ABC of Linux (Linux for Beginners)
The ABC of Linux (Linux for Beginners)The ABC of Linux (Linux for Beginners)
The ABC of Linux (Linux for Beginners)
 
Kvm and libvirt
Kvm and libvirtKvm and libvirt
Kvm and libvirt
 
JBoss Enterprise Data Services (Data Virtualization)
JBoss Enterprise Data Services (Data Virtualization)JBoss Enterprise Data Services (Data Virtualization)
JBoss Enterprise Data Services (Data Virtualization)
 
Open shift 2.x and MongoDB
Open shift 2.x and MongoDBOpen shift 2.x and MongoDB
Open shift 2.x and MongoDB
 
Fredlug networking
Fredlug networkingFredlug networking
Fredlug networking
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Intro fredlug
Intro fredlugIntro fredlug
Intro fredlug
 
Lvm and gang 2015
Lvm and gang 2015Lvm and gang 2015
Lvm and gang 2015
 
Bash and regular expressions
Bash and regular expressionsBash and regular expressions
Bash and regular expressions
 
Speed Up Development With OpenShift
Speed Up Development With OpenShiftSpeed Up Development With OpenShift
Speed Up Development With OpenShift
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Disks and-filesystems

  • 1. A Primer for Beginners Paul W. Frields Presented by Red Hat, Inc. Licensed under a Creative Commons Attribution-ShareAlike (BY-SA) 3.0 license. http://creativecommons.org/by-sa/3.0/ Linux File Systems
  • 2. Today's Topics Disks and partitions Logical Volume Management (LVM) File system formats Concentration is on practical use by home/desktop users
  • 4. What kind of disks? SATA – most laptops and home desktops) IDE, SCSI – mainly outdated Fibre Channel, Infiniband, and others – high end In most cases, your hard disk is probably the device node /dev/sda
  • 5. RAID Redundant Array of Inexpensive Disks Combine two or more disks into a group that is managed together Sacrifices storage capacity for fault tolerance Avoid for today – this is an hour on its own!
  • 6. What are partitions? Divide your disk into usable areas A map/table at the top describes the layout In complex setups (>4 partitions), it becomes a linked list Most dual-boot systems fall into this category Each successive table points to another table further down the disk, and so on...
  • 7. You need three /boot – used to bootstrap the GRUB loader and kernel swap – used by the kernel to shift older data out of RAM when memory gets tight / (also called “root”) – everything else can be stored here
  • 8. Everything in root? Linux does not have a C: drive, D: drive... Everything is unified under top level / folder Under this, /bin, /etc, /var, etc. How you break up file systems under this is up to you – let’s look at reasons for and against...
  • 9. Why break things up? Guard against “out of space” problems that might affect the running system Lets you re-install OS without touching data (try that on Windows with just a C: drive!)
  • 10. Why not? Complexity of understanding partitions Complexity of management Figuring out where you ran out of space Figuring out where you need more space “But, I have a 640 GB drive, it can’t be full!”
  • 12. Installer defaults Depends on the Linux distro Most installers pick a good default DON’T worry about it if you don’t have to DO note the layout so you can understand implications
  • 14. LVM Logical Volume Management Turns storage into areas that can be flexibly adjusted after the fact Don’t use this for /boot or swap Some installers use by default Generally a good idea since you may want to reallocate space later Adds a level of abstraction (complexity)
  • 15. LVM concepts PV (physical volume) – a partition or disk that’s been added to the LVM pool VG (volume group) – one or more PVs connected under a single name and managed together LV (logical volume) – a portion of a VG which is formatted with a file system (like a partition would be)
  • 17. LVM utilities pvscan, pvs, pvcreate, pvremove, pvchange... vgscan, vgs, vgcreate, vgchange, vgextend, vgreduce, vgremove, vgsplit... lvscan, lvs, lvcreate, lvchange, lvextend, lvreduce, lvresize, lvremove, lvrename... lvm shell utility
  • 18. LVM system files Boot time use of LVM defined in /etc/lvm directory /etc/lvm/lvm.conf – general configuration /etc/lvm/backup/vg_name – backup of VG definition (sizes, locations) – CAREFUL! /etc/lvm/archive – stores previous definitions of VGs
  • 20. Formatted file systems Live on a partition or LVM logical volume (LV) Provide orderly arrangement of files Usually hierarchical (folders, subfolders) Store file data and metadata (timestamps, security details, size, etc.) Examples are ext3fs, ext4fs, btrfs, NTFS, FAT varieties
  • 21. Linux and other OS’s Linux reads and writes most other OS file systems “out of the box” The opposite is not necessarily true! You can get drivers for Linux file systems for Windows, MacOS
  • 22. FAT and NTFS Used primarily by Windows Also removable media where manufacturer can’t guess your OS (85-90% case) NTFS is needed for larger storage (>4 GB)
  • 23. HFS+ and beyond Apple MacOS Older HFS is quite rare nowadays but still supported in Linux (moving to reaonly)
  • 24. ext3 and ext4 Standard Linux file systems Older ext2 not used as much anymore although it’s basically compatible with ext3 ext3 added journaling capability ext4 supports much larger file systems
  • 25. What is btrfs? Pronounced “better” or “butter eff ess” Uses more modern file system design similar to e.g. XFS to achieve higher levels of scalability and performance for modern workloads Still adding features and stability Chances are you won’t need to decide to use; your distro will pick if/when necessary
  • 26. File system utilities Show disk free space (df) Show disk usage by files (du) Make a file system (mkfs) File system check/repair (fsck) Mount/unmount file system (mount/umount) The mount utility also shows curent mounts
  • 27. Mounts All separate formatted file systems, when mounted, are part of the single hierarchy A file system can be mounted on any directory as a mount point System defined mounts (used at boot) in the /etc/fstab file
  • 29. Summary Disks can be divided up into partitions Partitions can be combined and split into LVM storage Partitions or LVM logical volumes are mounted on the system to store files