Disks, partitions and mounting (fstab)
Mount a disk and find it again at every boot.
- List disks and file systems:
lsblk -f sudo blkid
- Temporarily mount a partition:
sudo mkdir -p /mnt/data sudo mount /dev/sdb1 /mnt/data
- For a permanent mount, add a line to /etc/fstab (use the UUID):
UUID=xxxx-xxxx /mnt/data ext4 defaults,nofail 0 2
- Test before rebooting:
sudo mount -a
- Monitor space:
df -h du -sh * | sort -h
⚠️ A mistake in /etc/fstab can prevent booting: keep the nofail option for secondary disks.