Thanks,
-Brian
> I'd like to extend the LVM partition backwards over the unused
> parition to add the extra space to the LVM. Is there a way to safely
> do this without fubaring my LVMs?
Do not delete the existing partition, or you may run into problems with
the partition numbering. Use a partitioning tool, such as cfdisk, to change
the existing partition type to 8e.
Run "pvcreate /dev/sdxx", to initialize the partition, as a physical volume.
"vgextend whateveryourvolumegroupnameis /dev/sdxx" adds the partition to
the volume group.
lvextend is used to increase the space for a given logical volume.
You then have to resize the filesystem on the logical volume, using the
program appropriate to the filesystem type, such as resize2fs,
resize_reiserfs, etc.
Regards, Dave Hodgins
--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
You add the slice to the volume group (add hdc1)
vgextend my_volume_group /dev/hdc1
then you need to add it to a logical volume (add 1G)
lvextend -L+1G /dev/myvg/homevol
after this you need to extend the file system (example for ext2/3)
umount /dev/myvg/homevol/dev/myvg/homevol
resize2fs /dev/myvg/homevol
mount /dev/myvg/homevol /home
I suggest you take a look at the LVM HowTo for more information
http://tldp.org/HOWTO/LVM-HOWTO/
mainly the sections 11.5 and 11.9 for your part.
--
//Aho
Thanks,
-Brian
>
> lvextend -L+1G /dev/myvg/homevol
>
> after this you need to extend the file system (example for ext2/3)
>
> umount /dev/myvg/homevol/dev/myvg/homevol
> resize2fs /dev/myvg/homevol
> mount /dev/myvg/homevol /home
>
> I suggest you take a look at the LVM HowTo for more informationhttp://tldp.org/HOWTO/LVM-HOWTO/
> Thanks for the help guys. I'm actually looking for a way to get rid of
> the extra partition, though, and merge it with the LVM one. I know I
> can just add it to the Volume Group, but I don't like the idea of
> having unnecessary physical partitions lying around and jut stitching
> every thing together with lvm. Maybe that's an unnecessary concern
> though?
It's a unnecessary concern and not doing it will avoid you from a lot of
trouble, not only the renaming of slices, but extending the LVM on the same slice.
--
//Aho
> Thanks for the help guys. I'm actually looking for a way to get rid of
> the extra partition, though, and merge it with the LVM one. I know I
Removing that partition, and then resizing the existing lvm partition
will renumber the partitions, and will result in the physical order
of the partitions being different then the logical order. While linux
programs have no problem with the orders being different, some m$ stuff,
like fdisk, does.
If you do decide to remove the partition, make sure you have a full copy
of everything on another drive, first. I wouldn't. Avoiding renumbering
the partitions, is one of the things lvm is designed to help avoid.
-Brian