See what is there
lsblk -f
blkid
df -hT
df -i
findmnt
mount | column -t
du -xh --max-depth=1 /var | sort -h | taillsof +L1Filesystems
mkfs.ext4 /dev/sdb1
mkfs.xfs /dev/sdb1
mount /dev/sdb1 /data
umount /data
tune2fs -l /dev/sdb1 | head
xfs_info /data
fsck -n /dev/sdb1 # check, no changesfstab line:
UUID=7c1d... /data xfs defaults,nofail 0 0Test with mount -a before you reboot.
LVM
pvs; vgs; lvs
pvcreate /dev/sdc
vgextend vg0 /dev/sdc
lvextend -r -L +20G /dev/vg0/data # -r grows the filesystem too
resize2fs /dev/vg0/data # ext4
xfs_growfs /data # XFS, takes the mount pointXFS can grow but not shrink.
RAID
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm /dev/md0 --add /dev/sdd1Performance
iostat -x 1
iotop -o
vmstat 1Watch %util, await and queue size, not only throughput.
Network storage
showmount -e server
mount -t nfs4 server:/export /mnt
nfsstat -m
iscsiadm -m session
ceph statusQuick diagnosis
| Symptom | First look |
|---|---|
| Full but nothing to delete | df -i, lsof +L1 |
| Read-only filesystem | dmesg, mount, disk errors |
| Slow | iostat -x, queue and latency |
| Boot stops after mount change | journalctl -xb, fstab UUID, nofail |