Linux File Systems Introduction to data storage using Slides: 10 Download presentation Linux File Systems Introduction to data storage using the ‘msdos’ and ‘ext 2’ filesystems Common diskette form-factors • • Package sizes: 8 -inch, 5. 25 -inch, 3. 5 -inch Single-sided, Double-sided Hard-sectored, Soft-sectored Recording densities: – Single-density – Double-density – High-density – Ultra high-density – Super high-density Diskettes predominant today • 3 -1/2 inch, double-sided high-density • Labeled as: DSHD SS • • • 512 bytes-per-sector 18 sectors-per-track 2 tracks-per-cylinder 80 cylinders-per-disk Total disk capacity: 80 x 2 x 18 x 512 = 1440 KB Formatting a DSHD diskette • With Linux: a two-step procedure • 1) Low-Level Formatting: • root# fdformat /dev/fd 0 H 1440 • 2) High-Level Formatting: • root# /sbin/mkfs. ext 2 /dev/fd 0 or • root# /sbin/mkfs. m sdos /dev/fd 0 Key ‘msdos’ concepts • • Record Cluster File Directory Entry File Allocation Table Key ‘ext 2’ concepts • • • Block Super Block-Group File Information Node (‘inode’) Directory Entry (‘dentry’) ‘ext 2’ block-size options • # mkfs. ext 2 -b 1024 /dev/fd 0 • # mkfs. ext 2 -b 2048 /dev/fd 0 • # mkfs. ext 2 -b 4096 /dev/fd 0 ‘ext 2’ disk organization • • Boot Block Super Block-Group Descriptor Block Bitmap Inode Table Root Directory Data Blocks Mounting and Unmounting • $ mkdir floppy • # /bin/mount –t msdos /dev/fd 0 floppy • # /bin/mount –t ext 2 /dev/fd 0 floppy • # /bin/umount /dev/fd 0 • # /bin/umount floppy Class Exercise • Use ‘fileview. cpp’ application: $ fileview /dev/fd 0 • Find the location of the ‘super’ block Look for SUPER_MAGIC: 0 x. EF 53 • Repeat for each ‘ext 2’ block-size: 1 K, 2 K, and 4 K