LVM on an entire disk

Mathieu Alorent malorent at echo.fr
Thu Oct 29 16:00:10 CET 2009


Hi,

We would like to use LVM on an entire disk, especially when making
partitions over than 2T (xfs).

We would like to use someting like that...

disk_config disk1 bootable:1
primary	/boot		100	ext3	rw
primary	swap		1G	swap	sw
primary	/		1G	ext3	rw,errors=remount-ro
logical	/usr		1500	ext3	rw
logical	/var		1G	ext3	rw
logical	/home		512	ext3	rw
logical	/tmp		1G	ext3	rw

disk_config disk2

disk_config lvm
vg BACKUP		disk2
BACKUP-BACKUP	/BACKUP		1T	ext3	rw,noatime
BACKUP-BACKUP2	/BACKUP2	5T-	xfs	rw,noatime

Unfortunately, we we unable to use this syntax :
disk_config disk2
disk_config lvm
vg BACKUP		disk2
...

But something like, works, but not for parts over 2T.
disk_config disk2
primary	-		1G-	-	-

disk_config lvm
vg BACKUP		disk2.1
...

I have patched setup-storage to handle LVM on an entire disk like this:
file: usr/share/fai/setup-storage/Parser.pm near lines 607

              if ($dev =~ m/^disk(\d+)\.(\d+)/) {
                $dev = &FAI::make_device_name("/dev/" . $FAI::disks[ $1
- 1 ], $2);
+              } elsif ($dev =~ m/^disk(\d+)/) {
+               $dev = "/dev/" . $FAI::disks[ $1 - 1 ];
              } else {
                $dev = "/dev/$dev";
              }

Hope this will (or has already) be(en) integrated in next release :)


-- 
Mathieu Alorent
Shell&Core Sophia-Antipolis
AUSY
Pour France Telecom – OPF/PORTAILS/DOP/HEBEX/SOPHIA

Tél: 04 97 12 6226

malorent.ext at orange-ftgroup.com

La signature de ce mail peut être vérifiée en installant les autorités de certifications CAcert suivantes :
http://www.cacert.org/certs/root.crt
http://www.cacert.org/certs/class3.crt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20091029/43515770/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4892 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20091029/43515770/attachment.bin 


More information about the linux-fai mailing list