you need to tell the lvcreate how big you want it to be, e.g. lvcreate lvol1 -L 1024, this will give you 1GB logical volume, if you use the lower case "L" then put the size in extents instead, do a pvdisplay /dev/sda to see how many extents you can allocate to lvcreate perhaps!?
Rgds
On 03/11/2007, Chris G cl@isbd.net wrote:
On Sat, Nov 03, 2007 at 05:16:54PM +0000, Chris G wrote:
OK, so I have cleared everything off my /dev/sda (except, presumably, the MBR) and all is well still, Fedora still boots and my Windows guest virtual machine is still working.
How do I now set up /dev/sda using LVM? As I understand it the sequence is to create a Physical Volume using pvcreate, then a Logical Group that uses the Physical Volumes I have created and then I create a logical volume in the Logical Group.
The problem is that I don't understand how you tell pvcreate what disk it is to use. The 'synopsis' on the pvcreate man page says:-
SYNOPSIS pvcreate [-d|--debug] [-f[f]|--force [--force]] [-y|--yes] [-h|--help] [-t|--test] [-v|--verbose] [--labelsector] [-M|--metadatatypetype] [--metadatacopies#copies] [--meta- datasizesize] [--restorefilefile] [--setphysicalvolumesizesize] [--version] [-Z|--zeroy/n] PhysicalVolume [PhysicalVolume...]
Which doesn't seem to give much clue as to what disk it uses, PhysicalVolume is (as I understand it) the name that pvcreate gives to the chunk of disk you want to use, so what disk does it use?
It's OK, although the man page wasn't very clear the example was, a PhysicalVolume is simply the same name as the device, so I just say:-
pvcreate /dev/sda2
So now I have created my PhysicalVolume and I have created a Logical Group that is just that PhysicalVolume I'm now stuck trying to set the size of a VolumeGroup to use all of the space.
If I just say:-
lvcreate VolGroupA2
I get an error saying "Please specify either size or extents (not both)", there seems no way to specify 'all' and I can't find anything that tells me what the parameters to --size mean.
Help!? :-)
-- Chris Green
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!