Disk and File System Management Flashcards

1
Q

lsblk

A

A tool to list block devices.

-f: filesystem info included, UUID.

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

fdisk

A
An MBR command to create MBR partitions. 
p: partition in table
m: help
n: new partition
    (enter to accept defaults)
    p: primary
    e: extended
    Add partition # 
    sector location or size of partition
w: write file system table to disk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

parted

A
An more MBR and GPT app to list partitions
help: lists all commands
p: print partition info
mklabel : adds label for type
mkpart: needs  ,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

gdisk

A

fdisk-styled for GPT.

?: For help.

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

mkswap

A

NEEDS AN EXISTING SWAP ID PARTITION TO USE
Formats partition for use as swap space
-L: label add

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

swapon

A
Enables swap spaces
Swapoff disables
/etc/fstab example
LABEL=SWAP swap swap defaults 0 0
-a: all in /etc/fstab
-U: by UUID
-L: by label
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

mkfs

A

Adds file system to specified partition
-t or .
-L
Note: can get UUID via blkid

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

df

A
Shows available disk space on file system. (disk free)
lkblock, used, available, %, mounted on.
-i: shows inode info per directory
-h: human
—total: shows total for all file sys.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

du

A

Shows used space (disk used)
—inodes: shows inode info for each directory and sub directory
-h: human
—max-depth=: shows down to directories in.
-s: summary of spaces used in directory.

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

fsck

A

File system check utility to run on unmounted devices. Configured in /etc/fstab. Specify device like in fstab.
-r: report

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

e2fsck

A

ext2,3,4 specific utility. Can also display file system journal

  • f: force to rerun
  • p: repair file system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

mke2fs

A

Creates new ext2,3,4 file system.

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

mke2fs.conf

A

Lists defaults for file systems

  • t: type
  • L: label
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

tune2fs

A

Adjusts parameters, lost&found for recovery

  • l: lists parameters
  • i: interval for times checked
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Various xfs tools

A
xfs_repair: similar to e2fsck
xfs_sfr: recognizes data stored in blocks. Similar to defrag
xfs_db: debugging tool
    Frag = fragmentation
    Freesp = free space on device
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

mount

A
W/o extra lists every mount point on system.
-a: auto
-h: help
-t: type
-o: options. Same as fstab
    auto: any time -a used
Refer to S18 for options.