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

A

pwd

22
Q

Filesystem Integrity: debugfs - interactive

open a filesystem for debugging

A

open

23
Q

Filesystem Integrity: debugfs - interactive

show stats for filesystem

A

stats

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)

A

undelete

25
Q

Filesystem Integrity: debugfs - interactive

quit

A

exit

26
Q

Filesystem Check

A

fsck

27
Q

Filesystem Check

checks ext filesystems type

A

e2fsck

28
Q

Filesystem Check

check ReiserFS filesystem type

A

reiserfsck

29
Q

Filesystem Check

check DOS filesystem types - VFAT

A

dosfsck

30
Q

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

A

uses /etc/fstab

31
Q

Filesystem Check

if filesystem cannot be fixed automatically on boot

A

CTRL-D to continue or provide root password to perform a deeper scan

32
Q

Filesystem Check - fsck

will iterate through the /etc/fstab file and check all filetystms

A

fsck -A

33
Q

Filesystem Check - fsck

display has/mark progress bar

A

fsck -C

34
Q

Filesystem Check - fsck

dry run makes no changes but displays what would have been done

A

fsck -N

35
Q

Filesystem Check - fsck

verbose output (prolific and may scroll quickly by)

A

fsck -V

36
Q

Filesystem Check - fsck

just do it does not prompt for confirmation or any other feedback and runs the checks and repair non-interactively

A

fsck -a

37
Q

Filesystem Check - fsck

force a check even if filesystem reports clean

A

fsck -f

38
Q

Filesystem Check - fsck

check inodes, blocks, sizes

A

fsck step 1

39
Q

Filesystem Check - fsck

check directory structure

A

fsck step 2

40
Q

Filesystem Check - fsck

check directory connectivity

A

fsck step 3

41
Q

Filesystem Check - fsck

check file/directory reference counts

A

fsck step 4

42
Q

Filesystem Check - fsck

check group summary info

A

fsck step 5

43
Q

Filesystem Check - fsck

only run fsck on unmounted filesystems or the action performed may cause

A

instability or corruption

44
Q

Filesystem Check

used to set filesystem parameters after creation

A

tune2fs

45
Q

Filesystem Check - tune2fs

set max number of times a filesystem can be mounted for an fsck to happen automatically

A

tune2fs -c [#]

46
Q

Filesystem Check - tune2fs

modifies the behavior of the filesystem with the indicated option (continue, remount-ro, panic)

A

tune2fs -e [option]

47
Q

Filesystem Check - tune2fs

add indicated group as potential users of the reserved space on a filesystem - usually reserved for root

A

tune2fs -g [groupname]

48
Q

Filesystem Check: xfsprogs

tools and utilities for the XFS filesystem

A

xfsprogs

49
Q

Filesystem Check: xfsprogs

XFS filesystem equivalent to fsck for checking file systems

A

xfs_check

50
Q

Filesystem Check: xfsprogs

XFS filesystem equivalent to fsck for repairing filesystem

A

xfs_repair

51
Q

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

A

xfs_metadump

52
Q

Filesystem Check: xfsprogs

used to grow an XFS filesystem - it can never shrink

A

xfs_growfs