Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
4 – Linux File SystemsMarian Marinov     Borislav VaradinovCEO of 1H Ltd.   System Administratormm@1h.com             bobi...
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 ArchitectureThere is NO DIRECTORY!
File System Architecture                   inode                   dentry
File System Architecture     Super Blocks
File System Architecture
File System ArchitectureSoft/symlinksHardlinks
File System Architecture
File System Architectureln source destination   ln -s source destination
File System ArchitectureDATA 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, oneDLM 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➢Create...
Mounting - CMD➢cat /proc/partitions➢cat /proc/mounts➢mount➢umount➢/etc/fstab/dev/sdb2          /        ext4 defaults,noat...
Ext/2/3/4➢First Linux FS – MinixFS➢And there we go....  ➢ Ext - April 1992, Linux 0.96c  ➢ Ext2 – January 1993  ➢ Ext3 – N...
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  ...
Ext2➢Max. partition size – 32TB➢Max. file name size – 255 chars➢Max. file size – 2TB➢Max. Number of files - 1018➢FS Perms➢...
Ext3➢Max. partition size – 32TB➢Max. file name size – 255 chars➢Max. file size – 2TB➢Max. Number of files - 1018➢Sub direc...
Ext4➢Max. partition size – 1EB➢Max. file name size – 255 chars➢Max. file size – 2TB➢Max. Number of files - 1018➢Sub direct...
Ext/2/3
Ext3
Ext4
ReiserFS➢Introduced 2001➢Metadata-only journaling➢Online resizing (growth only)➢Tail packing, a scheme to reduce internal ...
ReiserFS
ReiserFS
XFS●   Introduced 2001●   Max file size 8 EB●   Max volume size 16 EB●   Online resize(growth only)●   Online defragmentat...
XFSEqually sizedchunksAllocationgroups – AG
Log-structuredFileSystemsArchitect-ure
Log-structuredFile Systems Architecture
Log-structured         NAND File SystemsNILFS2F2FS
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 fo...
Pseudo File Systems➢procfs is the first FS to provide easy access to kernel-space from user-space➢tmpfs is a very fast in-...
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...
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...
Linux File Systemshttp://academy.telerik.com/student-courses/software-technologies/os-windows-linux/
Free Trainings @ Telerik Academy   Operating Systems @ Telerik Academy   http://telerikacademy.com/Courses/Courses/Detai...
4. linux file systems
4. linux file systems
Upcoming SlideShare
Loading in …5
×

4. linux file systems

3,539 views

Published on

Linux File System talk for the OS course

Published in: Education
  • Be the first to comment

4. linux file systems

  1. 1. 4 – Linux File SystemsMarian Marinov Borislav VaradinovCEO of 1H Ltd. System Administratormm@1h.com bobi [ at ] itp.bg
  2. 2. Agenda➢ File System Architecture➢ Virtual File System Layer➢ Directory Structure➢ Mount operations
  3. 3. Agenda➢ File system types ➢ Local ➢ Log-structured - NAND ➢ Pseudo ➢ Network ➢ Cluster ➢ Distributed
  4. 4. File System ArchitectureThere is NO DIRECTORY!
  5. 5. File System Architecture inode dentry
  6. 6. File System Architecture Super Blocks
  7. 7. File System Architecture
  8. 8. File System ArchitectureSoft/symlinksHardlinks
  9. 9. File System Architecture
  10. 10. File System Architectureln source destination ln -s source destination
  11. 11. File System ArchitectureDATA is never erased... it gets OVERWRITTEN!
  12. 12. Local File System
  13. 13. Network File System
  14. 14. Cluster File System
  15. 15. Cluster File System“One DLM to rule them all, one DLM to mind them, oneDLM to sync them all, and in the cluster, bind them”
  16. 16. Distributed File System
  17. 17. Virtual File System Layer
  18. 18. Virtual File System Layer Introduced April 1992
  19. 19. VFS Caches
  20. 20. FUSE
  21. 21. 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
  22. 22. 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 0proc /proc proc defaults 00tmpfs /dev/shmtmpfs defaults 00/home/hackman /fedora/home/hackman none rw,bind,auto 0 0//10.2.0.11/share /storage/beast cifsuser=hackman,password=p1r@tk3,uid=1000,gid=1000,noauto 0 0
  23. 23. 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
  24. 24. MinixFS➢Max. partition size – 64MB➢Max. file name size – 14 chars➢Ownership – uid, gid➢Permissions – user, group, others
  25. 25. Ext➢Max. partition size – 2GB➢Max. file name size – 255 chars➢No support for time stamps ➢ Access ➢ Inode modification ➢ Data modification
  26. 26. Ext2➢Max. partition size – 32TB➢Max. file name size – 255 chars➢Max. file size – 2TB➢Max. Number of files - 1018➢FS Perms➢Time stamps
  27. 27. 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
  28. 28. 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
  29. 29. Ext/2/3
  30. 30. Ext3
  31. 31. Ext4
  32. 32. 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
  33. 33. ReiserFS
  34. 34. ReiserFS
  35. 35. XFS● Introduced 2001● Max file size 8 EB● Max volume size 16 EB● Online resize(growth only)● Online defragmentation
  36. 36. XFSEqually sizedchunksAllocationgroups – AG
  37. 37. Log-structuredFileSystemsArchitect-ure
  38. 38. Log-structuredFile Systems Architecture
  39. 39. Log-structured NAND File SystemsNILFS2F2FS
  40. 40. Pseudo File Systems➢ procfs➢ sysfs➢ debugfs➢ configfs➢ tmpfs➢ others
  41. 41. 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
  42. 42. 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
  43. 43. Network File Systems➢ Network File System – NFS v3/v4➢Common Internet File System - CIFS
  44. 44. Network File Systems
  45. 45. Network File Systems
  46. 46. Cluster File Systems➢ GFS, GFS2➢ OCFS2
  47. 47. Cluster File Systems - GFS2
  48. 48. Cluster File Systems - GFS2
  49. 49. Cluster File Systems - OCFS2
  50. 50. Cluster File Systems - OCFS2
  51. 51. Distributed File Systems➢ Hadoop➢ Lustre➢ GlusterFS➢ GFarm➢ FhgFS➢ PohmelFS➢ Ceph➢ PVFS2
  52. 52. Hadoop
  53. 53. Hadoop➢ Large block FS – 64MB➢ Write mostly FS➢ Writes smaller then one block wait➢ Adding/removing nodes requires restart of the cluster
  54. 54. GlusterFS
  55. 55. GlusterFS
  56. 56. GFarm
  57. 57. GFarm
  58. 58. Linux Directory Structure
  59. 59. Linux Directory Structure
  60. 60. 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 Systemshttp://academy.telerik.com/student-courses/software-technologies/os-windows-linux/
  61. 61. Linux File Systemshttp://academy.telerik.com/student-courses/software-technologies/os-windows-linux/
  62. 62. 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

×