problems with lvm configurations

Joseph Rawson umeboshi3 at gmail.com
Fri Oct 10 11:20:30 CEST 2008


On Friday 10 October 2008 03:55:29 Michael Tautschnig wrote:
> > I've been having some problems when using lvm configurations.  The normal
> > partitioning, and the raid configurations are both working just fine.  I
> > haven't tried testing "preserve" or anything fancy.  When using raid, the
> > disk_var.sh still shows /dev/md0 as the boot device.  I don't know if
> > this what's intended or not.  The way I've been handling this is as
> > follows:
> >
> > if bootdevice starts with '/dev/md' then
> > 	look for /boot/grub/device.map
> > 	if device.map doesn't exist then
> > 		run "grub-mkdevicemap -n"
> > 	search device.map for (hd0) and get device entry for (hd0) (usually
> > /dev/hda) use /dev/hda as boot device
> >
> > I should probably fix the code to use every active disk in the array, so
> > the machine will boot in case of disk failure.
>
> You should, in this case, just use all the disks from $BOOT_DEVICE. Please
> see also the my recent posting in the "Problem with GRUB" thread on
> linux-fai
>
I just read it.  I've never heard of grub-pc, I'll have to look that up.  The 
main reason my code doesn't install grub to all the (hd#) is that I've been 
busy with other things, and because I don't know how it will work on raid0 or 
raid5 (not really a problem for me, since all I use is raid1).

> > The lvm seems to work well, when the disk is brand new.  I'm using
> > virtualbox to do all the testing in, so making a "new" drive is cheap. :)
> >  Anyway, after the first run using lvm (the first run always seems to
> > work fine), doing it a second time won't work.  Also switching back to a
> > normal partitioning scheme won't work, and I have to make a new disk
> > image.  Also dd'ing a lot of zero's to the drive doesn't seem to work
> > either, although I think doing that in combination with vgremove may
> > work.  There's too many options for me to remember all my steps.
> >
> > I've just noticed that you have experimental4 on the website now, and all
> > these problems are based off of experimental3, so I'm going to install
> > the new packages and try them out before I send a more detailed report.
>
> Ok, I would't expect experimental4 to fix those problems; rather, they
> should have been fixed long ago :-) Could you please provide a fai.log with
> debugging enabled? This would really help a lot to get this one fixed as
> well.
I haven't had time to do much testing with lvm on the e4 packages.  I just 
recently rebuilt my nfsroot image with the e4.  I do have some logs that I 
made with the e3 packages that I will attach.  Actually, I think I'll only 
attach one of them, and go ahead and run the code again.

here's the command I used for this -
env LOGDIR=./logdir disklist=hda setup-storage -d -X -f lvm-diskconfig &> 
output

The first run was done on a blank disk.  This output is from the subsequent 
run.

>
> Thanks,
> Michael



-- 
Thanks:
Joseph Rawson
-------------- next part --------------
Starting setup-storage 1.0.2
Using config file: lvm-diskconfig
Input was:
disk_config hda  bootable:1
primary /boot 500 ext3 rw
primary -       4096-   -       -
disk_config lvm
vg main        hda2
main-swap     swap    2048    swap    sw
main-root     /       2048    ext3 rw

(CMD) parted -s /dev/hda unit TiB print 1> /tmp/RWdDCNJm8e 2> /tmp/Y7M8k1AkpB
Executing: parted -s /dev/hda unit TiB print
(STDOUT) Model: VBOX HARDDISK (ide)
(STDOUT) Disk /dev/hda: 0.01TiB
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) 
(STDOUT) Number  Start    End      Size     Type     File system  Flags
(STDOUT)  1      0.00TiB  0.00TiB  0.00TiB  primary  ext3         boot 
(STDOUT)  2      0.00TiB  0.01TiB  0.01TiB  primary               lvm  
(STDOUT) 
(CMD) parted -s /dev/hda unit B print free 1> /tmp/TMSnTyjQa8 2> /tmp/L8RVIM81qI
Executing: parted -s /dev/hda unit B print free
(STDOUT) Model: VBOX HARDDISK (ide)
(STDOUT) Disk /dev/hda: 8589934592B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) 
(STDOUT) Number  Start       End          Size         Type     File system  Flags
(STDOUT)  1      32256B      518192639B   518160384B   primary  ext3         boot 
(STDOUT)  2      518192640B  8587192319B  8068999680B  primary               lvm  
(STDOUT) 
(CMD) parted -s /dev/hda unit chs print free 1> /tmp/uYzasuNZfb 2> /tmp/9xJfk5Ccy4
Executing: parted -s /dev/hda unit chs print free
(STDOUT) Model: VBOX HARDDISK (ide)
(STDOUT) Disk /dev/hda: 1044,85,0
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 1044,255,63.  Each cylinder is 8225kB.
(STDOUT) Partition Table: msdos
(STDOUT) 
(STDOUT) Number  Start   End          Type     File system  Flags
(STDOUT)  1      0,1,0   62,254,62    primary  ext3         boot 
(STDOUT)  2      63,0,0  1043,254,62  primary               lvm  
(STDOUT) 
    Finding all volume groups
    Finding volume group "main"
    Finding all volume groups
    Finding volume group "main"
    Finding all volume groups
    Finding volume group "main"
    Finding all volume groups
    Finding volume group "main"
    Finding all volume groups
    Finding volume group "main"
Can't use string ("1/8") as a HASH ref while "strict refs" in use at /usr/share/fai/setup-storage//Volumes.pm line 321.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20081010/375d65df/attachment.bin 


More information about the linux-fai-devel mailing list