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
search for files that the 1000 user ID owns
```find -uid 1000```
26
lists files that the root user owns and with the mail group
find / -user root -group mail
27
find file by permission
find /home -perm 764 find /home -perm u=rwx,g=rw,o=r
28
find file by permission while showing file details
find /home -perm 764 -ls
29
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
find /home -perm /442 find /home -perm /u=r,g=r,o=w
30
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
```find /home -perm -324``` ```find /home -perm -u=wx,g=w,o=r```
31
search for any file for which others have at least read access
find -perm -004 find -perm -o=r
32
search for files with a size of more than 10 gigabytes
find -size +10G
33
search for files with an exact size of 10 megabytes
find -size 10M
34
search for files with a size of less than 10 kilobytes
find -size -10k
35
search for all files with content that changed 120 minutes ago
find / -mmin 120
36
search for all files with content that changed more than 200 minutes ago
find / -mmin +200
37
lists files that changed less than 150 minutes ago
find / -mmin -150
38
Search for all directories in the /etc directory
find /etc -type d
39
Search for all soft links in the / directory
find / -type l
40
Search for all block devices in the /dev directory
find /dev -type b
41
Search for all regular files with more than one hard link
find / -type f -links +1
42
What are tools for disk and partition management?
1) Web console 2) ansible 3) fdisk 4) gdisk 5) parted
43
MBR
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
GPT
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
Enable storage in cockpit
```dnf install cockpit-storaged```
46
standard partition editor on rhel
parted
47
what partitioning does parted support?
MBR and GPT
48
display the partition table on /dev/vda with parted
```parted /dev/vda print```
49
Configure new mbr disk with parted
```parted /dev/vdb mklabel msdos``` ```parted /dev/vdb mkpart primary 2048s 1001MB``` ```udevadm settle``` ```mkfs.xfs /dev/vdb1```
50
virtual memory
swap + RAM
51
format a partition for swap
mkswap /dev/vdb2
52
Activate swap on /dev/vdb2
swapon /dev/vdb2
53
swap file system type
linux-swap
54
Configure new GPT disk with parted
```parted /dev/vdb mklabel gpt``` ```parted /dev/vdb mkpart mydisk 2048s 1001MB``` ```udevadm settle``` ```mkfs.xfs /dev/vdb1```