package: fai-setup-storage
version: 5.5.3
X-Debbugs-CC: l...@sanger.ac.uk

Hi,

If you have a disk config like the below, with a single / partition
(i.e. no separate /boot) on LVM on md-raid, then BOOT_DEVICE is set
incorrectly, such that the fai GRUB setup scripts won't manage to
install GRUB correctly.

For example, in the below example, BOOT_DEVICE is set to
/dev/vg_fai/root ; while the example GRUB_PC/10-setup understands
devices like /dev/mdXX (and installs grub correctly on the underlying
devices), it doesn't understand LVM device names.

It seems to me that there are 3 possible solutions:

i) fai-setup-storage knows that / is on LVM, so should set BOOT_DEVICE
to the underlying pv (which GRUB_PC/10-setup would grok)

ii) fai-setup-storage's config file should be extended so you can
explicitly set boot_device (e.g. the below would have "rad1 -
disk1.1,disk2.1 - - BOOT_DEVICE)

iii) GRUB_PC/10-setup could spot an LVM BOOT_DEVICE and find the
underlying pv, e.g.

x=$(readlink -f $BOOT_DEVICE)
if [ "${x%%-*}" = "/dev/dm" ]; then
  BOOT_DEVICE=$( lvs --noheadings -o devices $BOOT_DEVICE | sed -e 's/^
*\([^(]*\)(.*$/\1/' )
fi

and then let the rest of the script do its thing as before. [if you'd
like a proper patch of this form, let me know :) ]

example disk config:

# <type> <mountpoint> <size>   <fs type> <mount options> <misc options>

# Root partition with RAID and LVM, single root partition

disk_config disk1 disklabel:gpt-bios fstabkey:uuid align-at:1M bootable:1

primary - 120G- - -

disk_config disk2 sameas:disk1

disk_config raid fstabkey:uuid
raid1 - disk1.1,disk2.1  -  -

disk_config lvm fstabkey:uuid

vg vg_fai md0
vg_fai-root   /    100G- ext3 errors=remount-ro
vg_fai-swap   swap 16G   swap sw

Thanks,

Matthew


-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

Reply via email to