Configure local storage Flashcards

1
Q

Display disk partition table for disk /dev/vdb

A

parted /dev/vdb print

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

Write an MBR disk label to disk /dev/vdb

A

parted /dev/vdb mklabel msdos

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

Write a GPT disk label to disk /dev/vdb

A

parted /dev/vdb mklabel gpt

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

Create an MBR partition on disk /dev/vdb

A

parted /dev/vdb mkpart primary xfs 2048s 1000MB

udevadm settle

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

Create a GPT partition on disk /dev/vdb

A

parted /dev/vdb mkpart usersdata xfs 2048s 1000MB

udevadm settle

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

Delete a partition 1 on disk /dev/vdb

A

parted /dev/vdb rm 1

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

Create 3 physical volumes on /dev/vdb

A

pvcreate /dev/vdb1 /dev/vdb2 /dev/vdb3

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

Remove physical volumes /dev/vdb2 and /dev/vdb1

A

pvremove /dev/vdb2 /dev/vdb1

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

Display physical volume /dev/vdb1

A

pvdisplay /dev/vdb1

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

Display volume group vg01

A

vgdisplay vg01

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

Create volume group vg01 and assign physical volumes /dev/vdb2 and /dev/vdb1 to it

A

vgcreate vg01 /dev/vdb2 /dev/vdb1

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

Add physical volume /dev/vdb3 to volume group vg01

A

vgextend vg01 /dev/vdb3

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

Remove physical volume /dev/vdb3 from volume group vg01

A

pvmove /dev/vdb3

vgreduce vg01 /dev/vdb3

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

Volume group vg01 is no longer needed. Delete it.

A

vgremove vg01

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

Create a 700 MB logical volume called lv01 in volume group vg01

A

lvcreate -n lv01 -L 700M vg01

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

Remove logical volume lv01 in volume group vg01

A

lvremove /dev/vg01/lv01

17
Q

Display logical volume /dev/vg01/lv01

A

lvdisplay /dev/vg01/lv01

18
Q

It is important to correctly identify disk and disk partitions. What commands are used to identify devices on your system?

A

lsblk, blkid, or cat /proc/partitions commands

19
Q

Persistent mounts are configured where?

A

/etc/fstab

20
Q

How do you configure a persistent mount by UUID or its label?

A

vim /etc/fstab
By Label:
/dev/vg01/lv01 /mnt/data xfs defaults 1 2
By UUID:
31b9363b-add8-4b46-a4bf-c199cd478c55 /mnt/data xfs defaults 1 2
systemctl daemon-reload

21
Q

How to add 500MB more swap space to the system

A

swapoff -v /dev/vg01/lv01
lvextend -L +500MB /dev/vg01/lv01
mkswap /dev/vg01/lv01
swapon -va /dev/vg01/lv01

22
Q

how to create a logical volume with exactly 128 extents

A

lvcreate -l 128