Mount, /etc/fstab, df and du
Sign in to read this lesson
The file system is ready, but Linux does not give a disk a letter like "D:" — you attach it to a point in the directory tree. In this lesson we learn to mount a disk, write it to /etc/fstab so it survives a reboot, and find the directory that eats space with df and du when a disk fills up.
What you will learn
sudo mount /dev/sdc1 /backupattaches a file system to a directory,umountdetaches it;findmntshows them all as a tree.- Permanent mounts live in
/etc/fstab:UUID=... /backup xfs defaults 0 0— always write the UUID. - After editing fstab, check with
sudo findmnt --verifyandsudo mount -a— a broken fstab can stop the server from booting. df -hshows how full file systems are,df -ishows inodes.du -sh *anddu -h --max-depth=1 / | sort -hfind who takes the space.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.