Creating partitions Flashcards
Set label to xfs partition
Set label to ext4 partition
xfs_admin -L mypart1 /dev/xvdf1
tune2fs -L mypart2 /dev/xvdf2 or e2label /dev/xvdf2 mypart2
Check FS
fsck.vfat /dev/xvdf1 - if partition is vfat type
fsck /dev/xvdf1 -if partition is ext2-4 types
Show/dump ext2-ext4 FS info (blocks, size, inode etc)
The same for xfs type
dumpe2fs /dev/xvdf1
xfs_info /dev/xvdf1
Repair xfs partition
xfs_repair /dev/xvdf1
Extend LVMs
- pvcreate /dev/sdd1
- vgextend my_vg /dev/sdd1
- lvextend -L 50G /dev/my_vg/my_lv
or lvextend -L +10G /dev/my_vg/my_lv - xfs_growfs my_mount_point
or resize2fs my_mount_point for ext2-ext4
Create volume group
vgcreate my_vg /dev/sdb /dev/sdc
vgdisplay
Create volume group
Remove volume group
vgcreate my_vg /dev/sdb1 /dev/sdc1
vgdisplay
vgremove my_vg
Create logical volume
Remove logical volume
lvcreate -n my_lv -L 10G my_vg
lvdisplay
lvremove my_lv
Format LVM with type xfs
mkfs.xfs -L my_xfs_lvm /dev/my_vg/my_lv
Move from one PV to another
pvmove /dev/sdb1 /dev/sdd1
Remove physical volume from a volume group
vgreduce my_vg /dev/sdb1
VDO
- yum install vdo kmod-kvdo
- systemctl enable –now vdo
- vdo create –name vdo1 –device /dev/nvme1n1 –vdoLogicalSize 1T
- mkfs.xfs -K /dev/mapper/vdo1
- udevadm settle
- mkdir /vdo1
man vdo to see fstab options - vim /etc/fstab:
/dev/mapper/vdo1 /vdo1 xfs x-systemd.requires=vdo.service 0 0 - mount -a
- vdostats –human-readable