Creating partitions Flashcards

1
Q

Set label to xfs partition

Set label to ext4 partition

A

xfs_admin -L mypart1 /dev/xvdf1

tune2fs -L mypart2 /dev/xvdf2 or e2label /dev/xvdf2 mypart2

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

Check FS

A

fsck.vfat /dev/xvdf1 - if partition is vfat type

fsck /dev/xvdf1 -if partition is ext2-4 types

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

Show/dump ext2-ext4 FS info (blocks, size, inode etc)

The same for xfs type

A

dumpe2fs /dev/xvdf1

xfs_info /dev/xvdf1

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

Repair xfs partition

A

xfs_repair /dev/xvdf1

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

Extend LVMs

A
  1. pvcreate /dev/sdd1
  2. vgextend my_vg /dev/sdd1
  3. lvextend -L 50G /dev/my_vg/my_lv
    or lvextend -L +10G /dev/my_vg/my_lv
  4. xfs_growfs my_mount_point
    or resize2fs my_mount_point for ext2-ext4
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Create volume group

A

vgcreate my_vg /dev/sdb /dev/sdc

vgdisplay

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

Create volume group

Remove volume group

A

vgcreate my_vg /dev/sdb1 /dev/sdc1
vgdisplay

vgremove my_vg

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

Create logical volume

Remove logical volume

A

lvcreate -n my_lv -L 10G my_vg
lvdisplay

lvremove my_lv

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

Format LVM with type xfs

A

mkfs.xfs -L my_xfs_lvm /dev/my_vg/my_lv

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

Move from one PV to another

A

pvmove /dev/sdb1 /dev/sdd1

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

Remove physical volume from a volume group

A

vgreduce my_vg /dev/sdb1

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

VDO

A
  1. yum install vdo kmod-kvdo
  2. systemctl enable –now vdo
  3. vdo create –name vdo1 –device /dev/nvme1n1 –vdoLogicalSize 1T
  4. mkfs.xfs -K /dev/mapper/vdo1
  5. udevadm settle
  6. mkdir /vdo1
    man vdo to see fstab options
  7. vim /etc/fstab:
    /dev/mapper/vdo1 /vdo1 xfs x-systemd.requires=vdo.service 0 0
  8. mount -a
  9. vdostats –human-readable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly