104.2 Maintain the integrity of filesystems Flashcards
What flags of the #ls command will give you a long listing of files and directories with sizes?
ls -lh
What output does #df give?
File systems - used space - available space - % used - mount point of FS
How do you get the total of used disk space in the whole file system?
df –total -h
What command displays disk usage?
du
From what location does the command #du display disk usage?
From the current directory where it is run.
What option of the #du command will give you only the disk usage of a specified number of folders?
du -h –max-depth-
What is an inode?
An inode (index node) stores information about files and folders, such as permissions, ownership, and file type.
Are inodes infinite in a file system?
No, most file systems have a maximum number of inodes that it can contain.
What command is useful to find out how many inodes are available in the file system and how many have been used?
df -i
How can you see what inode number a file or folder has been assigned?
ls -i
How can you see how many inodes a file or folder is using?
du –inodes
What does the fsck utility do?
It checks the file system for errors and attempts to fix them.
What is a condition to run the #fsck utility?
Devices must be unmounted before a check can run.
What syntax do we use to get a report on a file system for errors?
fsck -r LABEL=
Where is the #fsck utility configured?
/etc/fstab
What utility is used to check and repair errors in ext2, etx3 and ext4 FS?
e2fsck
What is the command for creating new ext2, ext3 or ext4 FS?
mke2fs
What is the command to tune or adjust parameters on an ext2, ext3 or ext4 FS?
tune2fs
What is xfs_repair?
It is a utility to repair XFS file systems if it encounters any errors.
How do you defrag an XFS file system?
Use the command #xfs_fsr (FS has to be mounted)
How do you debug an XFS file system?
xfs_db
What does a block device called “sda” mean?
s: scsi
d: disk
a: first disk of the drive
What does a block device called “vdb” mean?
v: virtual hard disk
d: disk
b: second virtual disk
Where is the #fsck utility configured?
/etc/fstab
What utility is used to check and repair errors in ext2, etx3 and ext4 FS?
e2fsck
What is the command for creating new ext2, ext3 or ext4 FS?
mke2fs
What is the command to tune or adjust parameters on an ext2, ext3 or ext4 FS?
tune2fs
What is xfs_repair?
It is a utility to repair XFS file systems if it encounters any errors.
How do you defrag an XFS file system?
Use the command #xfs_fsr (FS has to be mounted)
How do you debug an XFS file system?
xfs_db
What does a block device called “vdb” mean?
v: virtual hard disk
d: disk
b: second virtual disk