Skip to contentSkip to conversation

Create a Logical volume with 100% of Volume groups size?

linux-lvm Alejandro Alfonso 3 participants 4 messages Mar 1, 2006 – Mar 2, 2006

lore
Share & tools
lore
#0 lore raw

Hi everybody!

we only want to use LVM with one Logical volume, and want to use the 100% of available space.
is there any way to create it? Look:

acrol ~ # vgdisplay
--- Volume group ---
VG Name mirror
[...]

  VG Size               232.88 GB
  PE Size               32.00 MB
  Total PE              7452
  Alloc PE / Size       7452 / 232.88 GB
  Free  PE / Size       0 / 0

[...]

acrol ~ # lvcreate -L232.88G -nlv00 mirrorPoe
Rounding up size to full physical extent 232.91 GB Insufficient free extents (7452) in volume group mirrorPoe: 7453 required

How to use all the 7452 PE? Thanks in advance

Best regards!

Signature · 15 lines
------------------------------------------------------------------------
 
*       Alejandro Alfonso Fern�ndez
      Dpto de Sistemas. �rea Corporativa *
[email protected] <mailto:[email protected]>
http://www.telecyl.com/
 
Proci�n 7, Portales 1-2 Edificio Am�rica II
28023 Madrid
Tfn: 91 452 18 00 - Fax: 91 452 18 08 	Juan Garc�a Hortelano, 43
Edificio Telecyl
47014 Valladolid
Tfn: 983 428 200 - Fax: 983 428 223

------------------------------------------------------------------------
#1 lore raw
Quoted 15 lines · Alejandro Alfonso

Hi everybody!

we only want to use LVM with one Logical volume, and want to use the 100% of available space.
is there any way to create it? Look:

acrol ~ # vgdisplay
--- Volume group ---
VG Name mirror
[...]

  VG Size               232.88 GB
  PE Size               32.00 MB
  Total PE              7452
  Alloc PE / Size       7452 / 232.88 GB
  Free  PE / Size       0 / 0
Quoted 7 lines

[...]

acrol ~ # lvcreate -L232.88G -nlv00 mirrorPoe
Rounding up size to full physical extent 232.91 GB Insufficient free extents (7452) in volume group mirrorPoe: 7453 required

How to use all the 7452 PE? Thanks in advance

lvcreate -l7452 -nlv00 mirrorPoe

see man lvcreate

Signature · 1 line
patrick
#2 lore raw

Thanks Patrick!

promise i've read the man but dosen't understand Logical Extents concept :)

Best regards!

Quoted 26 lines
Quoted 13 lines

we only want to use LVM with one Logical volume, and want to use the 100% of available space.
is there any way to create it? Look:

acrol ~ # vgdisplay
--- Volume group ---
VG Name mirror
[...]

  VG Size               232.88 GB
  PE Size               32.00 MB
  Total PE              7452
  Alloc PE / Size       7452 / 232.88 GB
  Free  PE / Size       0 / 0
Quoted 8 lines

[...]

acrol ~ # lvcreate -L232.88G -nlv00 mirrorPoe
Rounding up size to full physical extent 232.91 GB Insufficient free extents (7452) in volume group mirrorPoe: 7453 required

How to use all the 7452 PE? Thanks in advance

lvcreate -l7452 -nlv00 mirrorPoe

see man lvcreate

Signature · 15 lines
------------------------------------------------------------------------
 
*       Alejandro Alfonso Fern�ndez
      Dpto de Sistemas. �rea Corporativa *
[email protected] <mailto:[email protected]>
http://www.telecyl.com/
 
Proci�n 7, Portales 1-2 Edificio Am�rica II
28023 Madrid
Tfn: 91 452 18 00 - Fax: 91 452 18 08 	Juan Garc�a Hortelano, 43
Edificio Telecyl
47014 Valladolid
Tfn: 983 428 200 - Fax: 983 428 223

------------------------------------------------------------------------
#3 lore raw

[linux-lvm] Flushing a device

Hi,

I have a question regarding how to ensure that all data is flushed to a logical volume before a snapshot is taken. The exact scenario is as follows:

I have the logical volume "/dev/mapper/userfiles" which is formatted with Reiser3. The volume has been created using "dmsetup ... crypt ..." on top of a logical volume "/dev/storage/cryptdisk".

My aim is to be able to write a set of files to the "/dev/mapper/userfiles" volume, then take a snapshot of the "/dev/storage/cryptdisk" as a backup, knowing that the contents of the backup are encrypted.

I don't have a problem setting up the above scenario or creating the snapshot volume, but I want to be sure that the files I have written will be in the backup. My concern is that if all file writes have not been flushed through all the layers of LVM then I will not get all the files in the snapshot of then encrypted volume. I have tried issuing the "sync" command, but I am not confident that this has worked.

Is it necessary to forcibly flush the data through each layer of the above volume "stack" so that I know it is all on the snapshot, or is this taken care of automatically when the snapshot command is issued and I am just being paranoid...

Thanks,

Roger.