Storage Flashcards

1
Q

Where are block device file stored?

A

/dev

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

What is the first detected the first detected SATA, SAS, SCSI, or USB hard drive?

A

/dev/sda

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

What is the second detected the first detected SATA, SAS, SCSI, or USB hard drive?

A

/dev/sdb

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

What name is given to virtio-blk paravirtualized storage (VMs) device storage?

A

/dev/vda, /dev/vdb, /dev/vdc, etc.

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

How do you recognize block devices on the file system?

A

ls -l /dev/sda1

Any entry with file type b is a block device.

brw-rw—-. 1 root disk 8, 1 Feb 22 08:00 /dev/sda1

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

display an overview of local and remote file-system devices

A

df

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

View the file systems on the host machine with all units converted to human-readable format

A

df -h

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

View the disk usage report for the /usr/share directory

A

du /usr/share

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

Which command provides an overview of the file-system mount points and the available free space in SI units?

A

df -H

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

What is the naming pattern for ssd storage devices?

A

/dev/nvme0, /dev/nvme1, …​

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

What is the naming pattern for SD storage devices?

A

/dev/mmcblk0, /dev/mmcblk1, …​

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

list the details of a specified block device or of all the available devices

A

lsblk

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

mount the /dev/vda4 partition on the /mnt/data mount point

A

mount /dev/vda4 /mnt/data

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

Mount the file system by the file-system UUID.

A

mount UUID=”efd314d0-b56e-45db-bbb3-3f32ae98f652” /mnt/data

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

Determine the UUID of a file system

A
lsblk -fp
lsblk -o NAME,UUID
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

unmount a file system

A

umount /mnt/data

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

identify which processes are preventing the file system from successfully unmounting

A

lsof /mnt/data

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

How often is the locate db updated?

A

everyday

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

force the locate database to update itself immediately?

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

Difference between locate and find

A

locate searches a pre-generated index and returns the results instantly (fast, index update delay).

find searches for files in real time by parsing the file-system hierarchy (slow, accurate).

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

Example uses of locate

A

locate image
locate -i passwd
locate -n 5 file.txt

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

search files with case-insensitive text that matches the messages string in their names in the root / directory,

A

find / -iname ‘messages

23
Q

search for files that the developer user owns

A

find -user developer

24
Q

search for files that the developer group owns

A

find -group developer

25
Q

search for files that the 1000 user ID owns

A
find -uid 1000
26
Q

lists files that the root user owns and with the mail group

A

find / -user root -group mail

27
Q

find file by permission

A

find /home -perm 764
find /home -perm u=rwx,g=rw,o=r

28
Q

find file by permission while showing file details

A

find /home -perm 764 -ls

29
Q

search for files for which the user has read permissions, OR the group has at least read permissions, OR others have at least write permission

A

find /home -perm /442
find /home -perm /u=r,g=r,o=w

30
Q

search for files for which the user has at least write and execute permissions, AND the group has at least write permission, AND others have at least read permission

A
find /home -perm -324
find /home -perm -u=wx,g=w,o=r
31
Q

search for any file for which others have at least read access

A

find -perm -004
find -perm -o=r

32
Q

search for files with a size of more than 10 gigabytes

A

find -size +10G

33
Q

search for files with an exact size of 10 megabytes

A

find -size 10M

34
Q

search for files with a size of less than 10 kilobytes

A

find -size -10k

35
Q

search for all files with content that changed 120 minutes ago

A

find / -mmin 120

36
Q

search for all files with content that changed more than 200 minutes ago

A

find / -mmin +200

37
Q

lists files that changed less than 150 minutes ago

A

find / -mmin -150

38
Q

Search for all directories in the /etc directory

A

find /etc -type d

39
Q

Search for all soft links in the / directory

A

find / -type l

40
Q

Search for all block devices in the /dev directory

A

find /dev -type b

41
Q

Search for all regular files with more than one hard link

A

find / -type f -links +1

42
Q

What are tools for disk and partition management?

A

1) Web console
2) ansible
3) fdisk
4) gdisk
5) parted

43
Q

MBR

A

1) Legacy
2) 2 TiB disk and partition size limit
3) Max of 4 primary partitions
4) Suitable for old BIOS Firmware
5) 15 partitions max
6) 32 bits

44
Q

GPT

A

1) Unified Extensible Firmware Interface (UEFI) firmware
2) eight zebibytes (ZiB) or eight billion tebibytes (TiB) size limit
3) 128 partitions max
4) 64 bits

45
Q

Enable storage in cockpit

A
dnf install cockpit-storaged
46
Q

standard partition editor on rhel

A

parted

47
Q

what partitioning does parted support?

A

MBR and GPT

48
Q

display the partition table on /dev/vda with parted

A
parted /dev/vda print
49
Q

Configure new mbr disk with parted

A
parted /dev/vdb mklabel msdos
parted /dev/vdb mkpart primary  2048s 1001MB
udevadm settle
mkfs.xfs /dev/vdb1
50
Q

virtual memory

A

swap + RAM

51
Q

format a partition for swap

A

mkswap /dev/vdb2

52
Q

Activate swap on /dev/vdb2

A

swapon /dev/vdb2

53
Q

swap file system type

A

linux-swap

54
Q

Configure new GPT disk with parted

A
parted /dev/vdb mklabel gpt
parted /dev/vdb mkpart mydisk  2048s 1001MB
udevadm settle
mkfs.xfs /dev/vdb1