Linux Storage Management Flashcards
How do you list the block devices?
lsblk
What are the layers of lvm2, describe them?
Physical volumes - Actual physical storage, disks, partitions and raw files
Volume groups - Aggregates physical volumes
Logical volumes - Dev mapper devices which are formatted and presented to the consumer as a block device
What is a dev-mapper?
A dev-mapper is a framework for mapping physical block devices onto virtual ones. They work by passing data from the virtual block devices onto the physical ones.
What command allows you to create a file storage?
fallocate -l 500M /tmp/file1
For each of the lvm layers what commands do you use to list, create and remove entities?
physical volume - pvcreate, pvremove, pvs
volume group - vgcreate, vgremove, vgs
logical volume - lvcreate, lvremove, lvs
How to you attatch a file to a loop device to be used as block storage?
losetup -f /path/to/file
The -f option allocates the file to the next available loop device