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?
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!? :-)
On Sat, Nov 03, 2007 at 05:41:42PM +0000, Chris G 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!? :-)
OK, continuing my conversation with myself here, there doesn't seem to be a sensible answer to the above, you just have to set the size parameter to the right size to use up all the disk if that's what you want.
Anyway I now have both my hard drives as Logical Volumes and my system is still working so I'm happy! :-)
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!
To tell pvcreate what disk to you just issue the command "pvcreate -f /dev/sda" if sda is the disk you want to re-use, the -f switch forces the disk to be re-used. You then need to setup a volume group before you can setup the logical volume. So next you'll need a "vgcreate vg*** /dev/sda" - this will create a volume group of your choice and will add the formatted disk to it. Then you can create your logical volume.
I'd advise checking use of these commands first with the usual help pages as I'm more of a unix administrator at the moment than Linux, but the theory is still the same but LVM is slightly different between the two....
Rgds
On 03/11/2007, Chris G cl@isbd.net 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?
-- 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!