Adding a logical volume
gayleard at eircom.net
Fri Feb 22 13:58:52 UTC 2008
Colin Paul Adams wrote:
>>>>>> "Jim" == Jim Cornette <fc-cornette at insight.rr.com> writes:
> Jim> Colin Paul Adams wrote:
> >> I have uninitialized disk space on my disk (/dev/sda), and I
> >> have the Logical Volume Management GUI tool system-config-lvm
> >> 1.1.1 running and looking at the unpartitioned space.
> >> How do I create a new logical volume group in that space (the
> >> obvious way seems to be to press the Initialize entity button,
> >> but that is greyed out)?
> Jim> You might need to initialize the disk and toggle the
> Jim> partition to lvm with fdisk or another disk management tool
> Jim> first. I read that people have setup lvm without partitions a
> Jim> long while back but not much lately about lvm with no
> Jim> previous partitions setup.
> How do I do this?
> I have tried with fdisk and got lost.
> I added an extended partition, then tried to change its system id to
> 8e (LVM). It wouldn't let me.
> I don't know how to invoke Disk Druid.
> Are there instructions for this anywhere?
Not sure if this is relevant,
but as I understand it you have to create LVM in a partition
like /dev/sdb2 .
So the first step is to create such a partition with fdisk.
You should give it the LVM partition type (with fdisk),
though I am not sure if this is necessary.
Then you do something like this:
[tim at carrie ~]$ sudo pvcreate /dev/sdb2
Physical volume "/dev/sdb2" successfully created
[tim at carrie ~]$ sudo vgcreate vg /dev/sdb2
Volume group "vg" successfully created
[tim at carrie ~]$ sudo vgdisplay vg
--- Volume group ---
VG Name vg
[tim at carrie ~]$ sudo lvcreate -L 20G -n slash vg
Logical volume "slash" created
[tim at carrie ~]$ sudo lvcreate -L 10G -n home vg
Logical volume "home" created
[tim at carrie ~]$ sudo lvcreate -L 2G -n swap vg
Logical volume "swap" created
[tim at carrie ~]$ sudo lvdisplay vg
Nb Keep /boot out of the LVM, or grub won't see it.
I've never used a system-config program for this.
On the whole I'd prefer not to.
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
More information about the fedora-list