I plan to use LVM instead of Extended MBR partition with its logical volumes. LVM is a somewhat new concept for me (in the sense that I have never before tried to use this option despite being aware of its existence) so I need some assistance.
I will have only one Volume Group placed on only one Physical Volume. I want that initial Extends of my Logical Volumes to be adjacent (volume initially contiguous). After creating all needed Logical Volumes there should be an empty space at the end of my PV for future usage (extending LV's as needed). So only the parts of LV's that later extend the initial size will be not adjacent to initial space of these LV's. Which option of
--type, is intended for usage just described.
Maybe there is an option to explicitly specify PE ranges as in
pvmove command but while creating Logical Volume, not after creating it?
pvmove /dev/sdb2:501-800 /dev/sdb2:1001-1300 pvmove /dev/sdb2:101-300 /dev/sdb2:1301-1500 pvmove /dev/sdb2:4001-5500 /dev/sdb2:1501-3000
... but with single
lvcreate command instead of the above sequence which may take a long time unnecessarily:
lvcreate /dev/sdb2:1001-3000 -n home vg1
... and instead of below one that may (as I suppose) create scattered LV of the same size as above command line (if the above would have the correct syntax):
lvcreate -l 2000 -n home vg1
The reason is I don't want for my Logical Volumes (and therefore my big files on these volumes) to be too fragmented. The one option is to use really big Extends (64 MiB or 128 MiB) but I think there should be (and probably is) an option that additionally make my files less fragmented and scattered over my drive.
- What is the difference between
- Which one should I use and with what argument?
- If none of these options can achieve what I want, then what I can do instead of creating scattered volume and then moving (by
pvmove) each of its range so that the whole volume would be contiguous.
- Can the initial range of PE's be specified at creation time?