104.2 Maintain Integrity of Filesystems Flashcards

1
Q

Filesystem Integrity

responsible for estimating disk space usage on files and or directories

A

du

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Filesystem Integrity: du

write counts for all files and not just directories

A

du -a

du –all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Filesystem Integrity: du

produce a grand total

A

du -c

du –total

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Filesystem Integrity: du

print sizes in readable format (K/M/G/TB)

A

du -h

du –human-readable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Filesystem Integrity: du

display only a summary for any argument

A

du -s

du –summarize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Filesystem Integrity: du

can be used with file

A

globbing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Filesystem Integrity

reports on a file system disk space usage

A

df

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Filesystem Integrity: df

include all filesystems including dummy filesystems

A

df -a

df –all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Filesystem Integrity: df

show stats for a file instead of mount

A

df –direct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Filesystem Integrity: df

print a grand total

A

df –total

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Filesystem Integrity: df

print sizes for in readable format (K/M/G/TB)

A

df -h

df –human-readable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Filesystem Integrity: df

include only local file systems

A

df -l

df –local

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Filesystem Integrity: df

limit listing to the indicated type

A

df -t

df –type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Filesystem Integrity

filesystem debugger can show a vast amount of info about indicated partition

A

debugfs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Filesystem Integrity: debugfs

will show a lot of info about any selected file or folder on the indicated drive

A

degubfs /dev/sdb1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Filesystem Integrity: debugfs - interactive

show available commands

A

?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Filesystem Integrity: debugfs - interactive

change the indicated path and must exist on disk debugfs is running on

A

cd [path]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Filesystem Integrity: debugfs - interactive

display filesystem features

A

features

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Filesystem Integrity: debugfs - interactive

display journal contents if available

A

logdump

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Filesystem Integrity: debugfs - interactive

shows contents of current directory

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Filesystem Integrity: debugfs - interactive

shows working directory

22
Q

Filesystem Integrity: debugfs - interactive

open a filesystem for debugging

23
Q

Filesystem Integrity: debugfs - interactive

show stats for filesystem

24
Q

Filesystem Integrity: debugfs - interactive

undeletes a file (NOTE: MUST be used immediately after deleting a file before
all changes are synced to disk - often fails to find the deleted file on modern distributions as
‘sync’ is the default filesystem disk setting)

25
Filesystem Integrity: debugfs - interactive quit
exit
26
Filesystem Check
fsck
27
Filesystem Check checks ext filesystems type
e2fsck
28
Filesystem Check check ReiserFS filesystem type
reiserfsck
29
Filesystem Check check DOS filesystem types - VFAT
dosfsck
30
Filesystem Check check filesystems automatically on boot (those with a '1' in the sixth column in the file), when a filesystem is marked 'unclean' (crashed, corrupt, not cleanly unmounted, etc), a deeper scan will be performed
uses /etc/fstab
31
Filesystem Check if filesystem cannot be fixed automatically on boot
CTRL-D to continue or provide root password to perform a deeper scan
32
Filesystem Check - fsck will iterate through the /etc/fstab file and check all filetystms
fsck -A
33
Filesystem Check - fsck display has/mark progress bar
fsck -C
34
Filesystem Check - fsck dry run makes no changes but displays what would have been done
fsck -N
35
Filesystem Check - fsck verbose output (prolific and may scroll quickly by)
fsck -V
36
Filesystem Check - fsck just do it does not prompt for confirmation or any other feedback and runs the checks and repair non-interactively
fsck -a
37
Filesystem Check - fsck force a check even if filesystem reports clean
fsck -f
38
Filesystem Check - fsck check inodes, blocks, sizes
fsck step 1
39
Filesystem Check - fsck check directory structure
fsck step 2
40
Filesystem Check - fsck check directory connectivity
fsck step 3
41
Filesystem Check - fsck check file/directory reference counts
fsck step 4
42
Filesystem Check - fsck check group summary info
fsck step 5
43
Filesystem Check - fsck only run fsck on unmounted filesystems or the action performed may cause
instability or corruption
44
Filesystem Check used to set filesystem parameters after creation
tune2fs
45
Filesystem Check - tune2fs set max number of times a filesystem can be mounted for an fsck to happen automatically
tune2fs -c [#]
46
Filesystem Check - tune2fs modifies the behavior of the filesystem with the indicated option (continue, remount-ro, panic)
tune2fs -e [option]
47
Filesystem Check - tune2fs add indicated group as potential users of the reserved space on a filesystem - usually reserved for root
tune2fs -g [groupname]
48
Filesystem Check: xfsprogs tools and utilities for the XFS filesystem
xfsprogs
49
Filesystem Check: xfsprogs XFS filesystem equivalent to fsck for checking file systems
xfs_check
50
Filesystem Check: xfsprogs XFS filesystem equivalent to fsck for repairing filesystem
xfs_repair
51
Filesystem Check: xfsprogs creates debugging info that can be used by a third party to aid in recovery of an XFS filesystem when repair has failed
xfs_metadump
52
Filesystem Check: xfsprogs used to grow an XFS filesystem - it can never shrink
xfs_growfs