Managing storage devices Flashcards

1
Q

What is NVDIMMN

A

non-volatile dual in-line memory modules
combo of memory and storage.

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

What are the different remote storage options?

A

iSCSI

FC (fiber channel)

NVMe (non-volatile memory express)
Interface that allows host software utility to communicate with ssd drives.

Device Mapper multipathing (DM Multipath)

Network File Systems
NFS
SMB

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

3.1 How many partitions does MBR have vs GPT?

A

MBR
either
4 primary
or

3 primary and one extended that has multiple logical patitions
Can only hand storage up to 2 TiB

GPT
128 partitions
Can handle storage up to 64ZiB

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

What does active mean in terms of a partition

A

OS in the partition is that’s marked active is booted

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

Describe an extended partition

A

Has it’s own partition table.

No fixed amount of logical partitions except Linux only allows 15 max.

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

Partition naming scheme

A

/dev/xxyN

/dev <- it’s a device
xx <- Type of device
y <- specific device (sda and sdb)
N <- which partition

If you have more than 26 they’ll start looking like this
sdaa1

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

If you mounted partition sda2 on /usr,every child directory would be part of that partition. Could you mount another partition onto a child directory of /usr?

A

yes

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

Make an MBR partition table on sda

from there, look at sdb, see if it’s used for LVM, raid, swap, hidden, root, or boot

A

parted /dev/sda
print
mklabel msdos (gpt for gpt lel)
print
select /dev/sdb
look at flags
quit

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

Create a partition that’s primary, and is 1G in size

A

4.3
parted /dev/sda
mkpart primary xfs 1024MiB 2048MiB

udevadm settle (registers the new device node?)

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

Check to see if a device is using GPT or MBR

A

fdisk -l
look at:
Disk Label Type: dos = MBR

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

Resize /dev/sda2

A

parted /dev/sda
print (find minor number and current ending point)
resizepart 1 2Gib

Minor number just means partition number.

cat /proc/partitions

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

Remove a partition on /dev/sda

Regenerate mount units

See active kernel options for any reference (if swap or lvm)

A

parted /dev/sda
print
rm 2
print
quit
cat /proc/partitions

if deleted in /etc/fstab, regenerate mounts
systemctl daemon-reload

grubby –info=ALL
grubby –update-kernel=ALL –remove-args=”option”

dracut –force –verbose (register changes in early boot system)

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

File System Identifiers vs Device Identifiers

A

File System Identifiers:
Tied to a file system created on a block device. So if you rewrite device with mkfs, this will be lost:
UUID - Unique Identifier
Label

Device Identifier:
Tied to a block device like a disk or partition. This means you can rewrite and it will be fine:
WWID - World Wide Identifier
Partition UUID
Serial Number

TIP - LVMs use lots of devices, so it’s better using a file system identifier here

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

Path that uuids stored
Path where labels are stored
Path where WWID stored
Path where partition UUIDs stored (defined biy GPT part table)
Path where path is stored (symb name that refers to storage device by hardware path)

A

/dev/disk/by-uuid/
fstab:
UUID=2948u149iut98egq9i2t

/dev/disk/by-label/
fstab:
LABEL=boot

/dev/disk/by-id

/dev/disk/by-partuuid

/dev/disk/by-path/

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

List UUID and Labels of /dev/sda

A

lsblk –fs /dev/sda

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

Difference between the PARTUUID and UUID

A

UUID is associated with the file system

PARTUUID is associated with the partition table itself.

17
Q

List the UUID of all disks

List the PARTUUID of all disks

List the WWID of all disks

A

lsblk –fs
lsblk –output +PARTUUID

file /dev/disk/by-id/*

18
Q

Change the UUID and label of:
xfs file system
ext3 fs
swap volume

A

xfs_admin -U 43891tihg943982 -L fart_box /dev/sdb1

tune2fs -U 192845u9821utigwhg -L fart_box /dev/sdb1

swaplabel –uuid f2t98h2fhwdf –label fart_box

udevadm settle

19
Q

What does it mean to discard unused blocks?

A

Mounted file system will discard blocks not in use to create space. This optimizes garbage collection routines.

20
Q

Types of block discard operations

A

batch discard - Triggered by user

online discard - specified at mount time. Only block are discarded that transition from used to free

Periodic Discard - Batch operations run regularly by systemd

21
Q

Perform a batch discard on sda then everything

A

fstrim /dev/sda or just the mount point, so like /mnt

fstrim –all

22
Q

Enable online block discard (not advised)

Enable periodic block discard

A

mount -o discard /dev/sda1 /mnt

systemctl enable –now fstrim.timer