setup-storage for raid5 + lvm
Nicolas Courtel
courtel at cena.fr
Tue Apr 28 17:39:20 CEST 2009
Michael Tautschnig a écrit :
>> Executing: /lib/udev/vol_id -u /dev/sda2
>> Command /lib/udev/vol_id -u /dev/sda2 had exit code 4
>> Failed to obtain UUID for /dev/sda2
>>
>> I originally wanted to have one swap slice on each disk, but in this
>> case the error is on the sdb swap partition:
>>
>> Executing: /lib/udev/vol_id -u /dev/sdb2
>> Command /lib/udev/vol_id -u /dev/sdb2 had exit code 4
>> Failed to obtain UUID for /dev/sdb2
>>
>> Any clue?
>>
>>
>
> That should only occur with some old mkswap versions that did not set up the
> UUID, but that doesn't seem to be the case here:
>
> Executing: udevsettle --timeout=10 && mkswap /dev/sda2
> (STDOUT) Setting up swapspace version 1, size = 1069281 kB
> (STDOUT) no label, UUID=3aa0ad8c-b7c9-428d-a2be-3511298c86af
>
> So, mysteriously, that information is lost afterwards. Hmm, looking at the code
> of vol_id it seems that parted might have overridden the volume id for
> /dev/sda2 (instead of /dev/sda1 or /dev/sda3). Could you re-run that failing
> installation and, once it aborts, do
>
> parted -s /dev/sda print
>
>
This looks ok:
# parted -s /dev/sda print
[...]
Number Start End Size Type File system Flags
1 32.3kB 535MB 535MB primary ext2 raid
2 535MB 1604MB 1069MB primary linux-swap
3 1604MB 320GB 318GB primary raid
No raid on sda2, but vol_id disagrees:
# /lib/udev/vol_id --export /dev/sda2
ID_FS_USAGE=raid
ID_FS_TYPE=linux_raid_member
[...]
So vol_id needs the --skip-raid option to return the uuid; a small patch
of setup-storage makes the installation work much better:
--- Fstab.pm.~1~ 2009-04-22 11:41:56.000000000 +0000
+++ Fstab.pm 2009-04-27 12:41:55.000000000 +0000
@@ -94,7 +94,7 @@
# or labels, use these if available
my @uuid = ();
&FAI::execute_ro_command(
- "/lib/udev/vol_id -u $device_name", \@uuid, 0);
+ "/lib/udev/vol_id --skip-raid -u $device_name", \@uuid, 0);
# every device must have a uuid, otherwise this is an error (unless we
# are testing only)
I don't know if this patch is a good idea, though, or if this behavior
of vol_id should be considered as a feature or a bug.
--
Nicolas
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090428/443db986/attachment.htm
More information about the linux-fai
mailing list