Linux Filesystems and Storage Questions
Specialized knowledge of Linux storage subsystems, filesystem architectures, and maintenance. Covers filesystem internals and selection considerations for ext4, XFS, and btrfs; partitioning tools and workflows using fdisk and parted; logical volume management including physical volumes, volume groups, logical volumes, snapshots and resizing; adding and expanding disks, resizing filesystems, mount options and performance tradeoffs; filesystem integrity tools such as fsck, recovery techniques, inode and metadata concepts, capacity planning, and interaction with software and hardware RAID and storage arrays.
Sample Answer
date > /root/recovery-note.txt
dmesg | tail -n 200 > /root/dmesg.log
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT > /root/lsblk.logsha256sum /dev/sdX > /root/sdX.sha256lvcreate --size 10G --snapshot --name snap_datavg /dev/vg/datavg
dd if=/dev/vg/snap_datavg of=/backup/images/datavg-snap.img bs=4M status=progressdd if=/dev/sdX bs=4M | gzip -c > /backup/images/sdX-$(date +%F).img.gzlosetup -Pf /backup/images/sdX.imgxfs_repair -n /dev/loop0p1xfs_metadump /dev/loop0p1 metadump.out
xfs_db -r -c "sb 0" /dev/loop0p1mount -o ro /dev/loop0p1 /mnt/recover
rsync -aHAX --progress /mnt/recover/important /backup/recovered/Sample Answer
Sample Answer
# per-filesystem summary
df -i
# find top directories by inode count
for d in /*; do echo $d; find "$d" -xdev -type f | wc -l; done
# find many small files
find /path -xdev -type f -printf '%h\n' | sort | uniq -c | sort -nr | headSample Answer
Sample Answer
Unlock Full Question Bank
Get access to hundreds of Linux Filesystems and Storage interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.