SlideShare une entreprise Scribd logo
1  sur  64
4 – Linux File Systems



Marian Marinov     Borislav Varadinov
CEO of 1H Ltd.   System Administrator
mm@1h.com             bobi [ at ] itp.bg
Agenda


➢ File System Architecture
➢ Virtual File System Layer
➢ Directory Structure
➢ Mount operations
Agenda

➢ File system types
 ➢ Local
 ➢ Log-structured - NAND
 ➢ Pseudo
 ➢ Network
 ➢ Cluster
 ➢ Distributed
File System Architecture




There is NO DIRECTORY!
File System Architecture
                   inode
                   dentry
File System Architecture

     Super Blocks
File System Architecture
File System Architecture




Soft/symlinks
Hardlinks
File System Architecture
File System Architecture




ln source destination   ln -s source destination
File System Architecture




DATA is never erased... it gets OVERWRITTEN!
Local File System
Network File System
Cluster File System
Cluster File System




“One DLM to rule them all, one DLM to mind them, one
DLM to sync them all, and in the cluster, bind them”
Distributed File System
Virtual File System Layer
Virtual File System Layer




 Introduced April 1992
VFS Caches
FUSE
Mounting
➢Attaching a device into the directory tree
➢Mount point – a destination directory
 where a device is mounted
➢Creates an entry in the kernel for each
 mounted device/dir
➢/proc/mounts
 /etc/fstab, /etc/mtab
Mounting - CMD
➢cat /proc/partitions
➢cat /proc/mounts
➢mount
➢umount
➢/etc/fstab
/dev/sdb2          /        ext4 defaults,noatime,nodiratime 0 0
/dev/sdb1          /boot    ext2 defaults,noatime,nodiratime 0 0
proc          /proc     proc defaults                             00
tmpfs              /dev/shmtmpfs defaults                         00
/home/hackman /fedora/home/hackman           none    rw,bind,auto 0 0
//10.2.0.11/share /storage/beast      cifs
user=hackman,password=p1r@tk3,uid=1000,gid=1000,noauto 0 0
Ext/2/3/4
➢First Linux FS – MinixFS
➢And there we go....
  ➢ Ext - April 1992, Linux 0.96c
  ➢ Ext2 – January 1993
  ➢ Ext3 – November 2001
  ➢ Ext4 – October 2006
MinixFS



➢Max. partition size – 64MB
➢Max. file name size – 14 chars
➢Ownership – uid, gid
➢Permissions – user, group, others
Ext


➢Max. partition size – 2GB
➢Max. file name size – 255 chars
➢No support for time stamps
  ➢ Access
  ➢ Inode modification
  ➢ Data modification
Ext2

➢Max. partition size – 32TB
➢Max. file name size – 255 chars
➢Max. file size – 2TB
➢Max. Number of files - 1018
➢FS Perms
➢Time stamps
Ext3

➢Max. partition size – 32TB
➢Max. file name size – 255 chars
➢Max. file size – 2TB
➢Max. Number of files - 1018
➢Sub directory limit - 32,000
➢Time stamps
➢Has Jurnal
Ext4

➢Max. partition size – 1EB
➢Max. file name size – 255 chars
➢Max. file size – 2TB
➢Max. Number of files - 1018
➢Sub directory limit - 64,000
➢File space pre-allocation
➢File space delayed allocation
Ext/2/3
Ext3
Ext4
ReiserFS
➢Introduced 2001
➢Metadata-only journaling
➢Online resizing (growth only)
➢Tail packing, a scheme to reduce internal
 fragmentation.
➢Max. file size - 1EB
➢Max. number of files - 232
ReiserFS
ReiserFS
XFS
●   Introduced 2001
●   Max file size 8 EB
●   Max volume size 16 EB
●   Online resize(growth only)
●   Online defragmentation
XFS
Equally sized
chunks

Allocation
groups – AG
Log-
structured
File
Systems
Architect-
ure
Log-structured
File Systems Architecture
Log-structured
         NAND File Systems




NILFS2
F2FS
Pseudo File Systems
➢ procfs
➢ sysfs
➢ debugfs
➢ configfs
➢ tmpfs
➢ others
Pseudo File Systems
➢debugfs is designed to provide Kernel Devs
 with simple way to push data into User
 space
➢configfs is for creating, managing and
 destroying kernel objects from user-space
➢sysfs is for viewing and manipulating
 objects from user-space which are created
 and destroyed by kernel space
Pseudo File Systems
➢procfs is the first FS to provide easy access
 to kernel-space from user-space
➢tmpfs is a very fast in-memory file system
Network File Systems


➢ Network File System – NFS v3/v4
➢Common Internet File System - CIFS
Network File Systems
Network File Systems
Cluster File Systems


➢ GFS, GFS2
➢ OCFS2
Cluster File Systems - GFS2
Cluster File Systems - GFS2
Cluster File Systems - OCFS2
Cluster File Systems - OCFS2
Distributed File Systems
➢ Hadoop
➢ Lustre
➢ GlusterFS
➢ GFarm
➢ FhgFS
➢ PohmelFS
➢ Ceph
➢ PVFS2
Hadoop
Hadoop
➢ Large block FS – 64MB
➢ Write mostly FS
➢ Writes smaller then one block wait
➢ Adding/removing nodes requires restart of
 the cluster
GlusterFS
GlusterFS
GFarm
GFarm
Linux Directory Structure
Linux Directory Structure
Links
       Wikipedia - Comparison of file systems
       Ext2 and OCFS2 on-disk layout
       Ext2 on-disk layout
       XFS on-disk structure
       ReiserFS on-disk structure
        RFSTool for Windows
        XFS Scalability
        BtrFS on-disk structure
       NILFS2 the new kid on the block
       Usenix paper on Log-Structured File Systems




http://academy.telerik.com/student-courses/software-technologies/os-windows-linux/
Linux File Systems




http://academy.telerik.com/student-courses/software-technologies/os-windows-linux/
Free Trainings @ Telerik Academy

   Operating Systems @ Telerik Academy
   http://telerikacademy.com/Courses/Courses/Details/35
 Telerik Software Academy

       academy.telerik.com
 Telerik Academy @ Facebook

       facebook.com/TelerikAcademy
 Telerik Software Academy Forums

       forums.academy.telerik.com

Contenu connexe

Tendances

Linux internal
Linux internalLinux internal
Linux internal
mcganesh
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
艾鍗科技
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 

Tendances (20)

Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
File System Hierarchy
File System HierarchyFile System Hierarchy
File System Hierarchy
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
 
Linux internal
Linux internalLinux internal
Linux internal
 
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Root file system
Root file systemRoot file system
Root file system
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file system
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 

Similaire à 4. linux file systems

Distributed File System
Distributed File SystemDistributed File System
Distributed File System
Ntu
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
Shu-Yu Fu
 

Similaire à 4. linux file systems (20)

11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
 
Distributed File System
Distributed File SystemDistributed File System
Distributed File System
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
Security Walls in Linux Environment: Practice, Experience, and Results
Security Walls in Linux Environment: Practice, Experience, and ResultsSecurity Walls in Linux Environment: Practice, Experience, and Results
Security Walls in Linux Environment: Practice, Experience, and Results
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in Linux
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
 
unit 3 ppt file represented system......
unit 3 ppt file represented system......unit 3 ppt file represented system......
unit 3 ppt file represented system......
 
Files and directories in Linux 6
Files and directories  in Linux 6Files and directories  in Linux 6
Files and directories in Linux 6
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
 
Windowsforensics
WindowsforensicsWindowsforensics
Windowsforensics
 
Ch12
Ch12Ch12
Ch12
 
FUSE Filesystems
FUSE FilesystemsFUSE Filesystems
FUSE Filesystems
 
Operating System
Operating SystemOperating System
Operating System
 
Os
OsOs
Os
 
Linux file system
Linux file systemLinux file system
Linux file system
 
linuxfilesystem-180727181106 (1).pdf
linuxfilesystem-180727181106 (1).pdflinuxfilesystem-180727181106 (1).pdf
linuxfilesystem-180727181106 (1).pdf
 

Plus de Marian Marinov

Plus de Marian Marinov (20)

How to implement PassKeys in your application
How to implement PassKeys in your applicationHow to implement PassKeys in your application
How to implement PassKeys in your application
 
Dev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & LoggingDev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & Logging
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanisms
 
Microservices: Benefits, drawbacks and are they for me?
Microservices: Benefits, drawbacks and are they for me?Microservices: Benefits, drawbacks and are they for me?
Microservices: Benefits, drawbacks and are they for me?
 
Introduction and replication to DragonflyDB
Introduction and replication to DragonflyDBIntroduction and replication to DragonflyDB
Introduction and replication to DragonflyDB
 
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMessage Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
 
How to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfHow to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdf
 
How to survive in the work from home era
How to survive in the work from home eraHow to survive in the work from home era
How to survive in the work from home era
 
Managing sysadmins
Managing sysadminsManaging sysadmins
Managing sysadmins
 
Improve your storage with bcachefs
Improve your storage with bcachefsImprove your storage with bcachefs
Improve your storage with bcachefs
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd
 
Comparison of-foss-distributed-storage
Comparison of-foss-distributed-storageComparison of-foss-distributed-storage
Comparison of-foss-distributed-storage
 
Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?
 
Securing your MySQL server
Securing your MySQL serverSecuring your MySQL server
Securing your MySQL server
 
Sysadmin vs. dev ops
Sysadmin vs. dev opsSysadmin vs. dev ops
Sysadmin vs. dev ops
 
DoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDKDoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDK
 
Challenges with high density networks
Challenges with high density networksChallenges with high density networks
Challenges with high density networks
 
SiteGround building automation
SiteGround building automationSiteGround building automation
SiteGround building automation
 
Preventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingPreventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel tracking
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of servers
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 

4. linux file systems