- Disks can be partitioned, allowing for more than one filesystem per disk. Also, multiple disks can often be combined into a single filesystem.
- Specifics vary by vendor in how disks may be partitioned, how the partitions are named, and how multiple disks are combined.
- Traditional Unix filesystem is created with the newfs command.
- Filesystems may be mounted with the mount command.
- If you always want to mount the filesystem, it can be added to the /etc/fstab file
- Format is "device file" "mount point" "FS type" flags "dump frequency" "fsck pass"
- Example
/dev/hda5 / ext2 defaults 1 1
/dev/hda6 /home ext2 defaults 1 2
/dev/hda7 swap swap defaults 0 0
- fsck command checks and repairs filesystems
- If filesystem is in the fstab file, fsck is run automatically if filesystem is not "clean" at boot time
- Automatic running can only fix certain errors
- You may end up with a root prompt, asking you to run fsck manually
- Files may end up in lost+found directory, with a filename of the inode number
- Some more modern filesystems are called "journaling" file systems
- Don't need fsck
- Can save a lot of time rebooting after a crash
- OS keeps a log of FS events
- If you end up with a filesystem problem, you may need to remake the filesystem and restore from a backup