Volume Group creation

Alexander Skwar listen at alexander.skwar.name
Sat Aug 5 06:06:00 UTC 2006


ยท Stephen Liu <satimis at yahoo.com>:

> Hi Alexander,
> 
>> > Whether tab /dev/hda2 with '8e' will be the solution, by running;
>> 
>> Nope. You /should/ set part. type to 8e. But you *MUST* create a
>> "PV label" on the part. by running pvcreate
>> 
>>         pvcreate /dev/hda2
>> 
>> After that's done, you can "vgcreate VG /dev/hda2".
> 
> I got it done.  Tks.
> 
> # pvcreate /dev/hda2
> File descriptor 3 left open
> File descriptor 4 left open
> File descriptor 5 left open
> File descriptor 6 left open

Those are strange messages. I'd investigate into what they
mean - I've got no idea what they mean.

> But unfortunately can't proceed further.
> 
> # lvcreate -L 8G -n UbuntuRoot VG
> # lvcreate -L 8G -n /dev/hda2/VG/UbuntuRoot
> # lvcreate -L 8G -n /dev/hda2/UbuntuRoot VG
> etc. all failed.
> displaying;
> .....
> ......

*GR* Please *ALWAYS* and *EVER* post the complete error message!

> OriginalLogicalVolume[Path]  [PhysicalVolumePath...]

Hm. This indicates, that your syntax was wrong.  "lvcreate -L 8G -n
UbuntuRoot VG" is correct syntax, though.

> Whether I need creating;
> /dev/hda5 /  (for UbuntuRoot)
> /dev/hda6 /home (for UbuntuHome)
> /dev/hda7 swap
> /dev/hda8 (umount) (for FC5Root)
> /dev/hda9 (umount) (for FC5Home)
> first.

????

What's that supposed to mean? With LVM, you don't need *ANY* 
partitions at all. You use the LVs to create the filesystems
on. Partitions can be used as Physical Volumes.

Please read the Howto!

Anyway, short summary:

pvcreate /dev/hda5 && vgcreate VG /dev/hda5 && \
        lvcreate -L8G -nUbuntuHome VG && \
        mkfs -t jfs -L HomeUbuntu /dev/VG/UbuntuHome && mkdir -p \
        /ubuntu/home && mount LABEL=Home /ubuntu/home

Yes, it's THAT simple.

Actually, you don't need any partitions at all. This means, that instead
of /dev/hda5, you can use /dev/hda and everything will work.

With old style partitioning, you'd do:

fdisk && reboot

        mkfs -t jfs -L HomeUbuntu /dev/hda5 && mkdir -p \
        /ubuntu/home && mount LABEL=Home /ubuntu/home
        
See? Not much different, but much less flexible.

Alexander Skwar
-- 
Das sage ich nun wirklich nie!
Das ist wohl eher Joeys Satz.
                -- Oliver Zendel






More information about the ubuntu-users mailing list