Filesystem Features Flashcards
Name the four extended attribute flags
immutable, append-only, no-dump, no atime update
How can I view extended attributes
lsattr
How can I change attributes
chattr
How do format a filesystem on a partition
mkfs (sudo mkfs -t ext4 /dev/sda0)
How do I check for errors in a filesystem
fsck (sudo fsck -t ext4 /dev/sda1)
How do I mount a filesystem
mount (sudo mount -t ext4 /dev/sda1 /home)
How do I find the currently mounted filesystems
mount
How do I unmount filesystems
umount (sudo umount /home)
How do I mount a network share
mount (sudo mount -t nfs myserver.com:/shdir /mnt/shdir)
How are filesystems mounted at boot
during boot, mount -a is executed, which reads and mounts all systems isted in /etc/fstab
How can I tell the system to automatically mount a filesystem
with a line /etc/fstab (which uses the automount facility in systemd) (LABEL=Sam128 /SAM ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,x-systemd.idle-timeout=30 0 0)
How do I list swap areas
cat /proc/swaps
List the swap-related commands
mkswap, swapon, swapoff
How do I enable quota
- mount filesystem with usrquota and/or grpquota specified in /etc/fstab (/dev/sda5 /home ext4 defaults, usrquoata 1 2)
- run quaotacheck (sudo quotacheck -vu /home
- enable quotas (sudo quotaon -vu /home)
- set quotas (sudo edquota -u username)
How do I examine quotas
sudo quota username