I'm reading some very conflicting things on something I've done (with no issues) several times in the past. That is, on a disk that's been increased in size in a VM environment, increasing the size of an extended partition to the end of the disk in order to allow the creation of new logical partitions, where those new logical partitions will be used as LVM PVs. After doing that, those LVM PVs are added to an LVM volume group, allowing resize of an LVM logical volume, thus allowing resize of the file system with resize2fs.
In a case where extended/logical partitions aren't involved (that is all physical partitions) this is just a matter of creating new partitions with fdisk and adding those to LVM. When an extended partition is involved, fdisk will not be able to use the new space for any new logical partitions unless the extended partition is increased. I've done this several times in the past using parted similar to what's described here:
»
sites.google.com/site/rh ··· lvminuseGenerally though I use parted in interactive mode with units set to 's' (sector), accepting the default for the starting sector, and entering -1 for the end (the sector at the end of the disk).
After doing that, fdisk will allow you to add a new logical partition.
One thing that bothers me is that parted gives this dire warning when you do this:
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
There are several confusing things about this warning. Only the logical partitions (as apposed to the extended partition) actually have any file system, and even then, only by virtue of being part of the LVM volume group and subsequent logical volume on which the actual file system is created. In this case, I am in fact only changing the end point of the extended partition.
Is there something wrong with what I'm doing there, and is there a better way to do it? Like I said, I've read all sorts of conflicting things ranging from things like the link above that imply this is exactly how to do this, all the way to things that say parted can't do it at all. Confusing as hell. I sure don't know any other way, and I've yet to have an issue doing so.
Thanks in advance.
Tom