Maintain the integrity of filesystems Flashcards
What command will check the configutation of ext2 or ext3 partitions?
dumpe2fs /dev/sda1
What command will show the configuration of a xfs partition?
xfs_info /dev/sda1
What command could be used to send xfs data for debugging to the xfs devs?
xfs_metadump
What command is used to change the parameters that are output in dumpe2fs?
tune2fs
What command and switch will change the mount count needed before a check on ext2 and ext3?
tune2fs /dev/sdb1 -c 100
What command and switch will change the mount count on ext2 and ext3?
tune2fs /dev/sdb1 -C 100
What command and switch will add jounaling on ext2?
tune2fs /dev/sdb1 -j
What command and switch will change the reserved blocks percentage on ext2 and ext3?
tune2fs /dev/sdb1 -m 10
Before using tune2fs, what should you do?
Unmount the disk
What xfs command will set the 2 jounal format?
xfs_admin /dev/sdb2/ -j
What xfs_admin command will show the UUID?
xfs_admin -u /dev/sda1
What xfs_admin command will show the label?
xfs_admin -l /dev/sda1
What xfs_admin command will change the UUID?
xfs_admin -U xxxx /dev/sda1
What xfs_admin command will change the label?
xfs_admin -L xxxx /dev/sda1
What should be done to an xfs partition before editing its atttributes?
unmount
Which command is all the file system admins and more in one command?
debugfs
What two debugfs commands show super block stats?
stats, show_super_stats
What debugfs command will show detailed information about a file?
stat
What two commands will list deleted files?
lsdel, list_deleted_inodes
What debugfs command will copy a file from an unmounted partition?
write internal_file external_file
What is the main tool for checking filesystems?
fsck
What fsck switch checks all files?
A
What fsck switch indicates progress?
I
Can fsck be run on a mounted file system?
No
What command will show a summary of all disk space across a system’s partitions?
df
What df switch will show inodes information?
-i –inodes
What df switch will show local filesystems only?
-l –local
What df switch will show the filesystem type?
-T –print-type
Which command will show space used by directories?
du
Which du switch will summarise files as well?
-a -all
Which du switch will compute a grand total?
-c -total
Which du switch will count the hard links?
-l –count-links
Which du switch will limit the depth of the report?
–max-depth
Which du switch will summarise the output?
–summarize