Skip to content

Commit

Permalink
drbd should catch all unknown devices (e.g. rbd)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpavlin committed Oct 7, 2018
1 parent 7d4ea81 commit ba74341
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hooks/grub
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Do not include grub in EXTRA_PKGS of
# $sysconfdir/default/ganeti-instance-debootstrap because it will
# cause error of debootstrap.
#
# based on https://groups.google.com/forum/#!searchin/ganeti/debootstrap|sort:date/ganeti/N8_r8lKoA-k/8ExYRnPUAQAJ

set -e

Expand All @@ -31,7 +33,8 @@ elif dmsetup info $BLOCKDEV > /dev/null 2>&1; then
DISKTYPE=lvm
else
echo "Unknown disk type"
exit 1
#exit 1
DISKTYPE=unknown
fi

mount -o bind /dev $TARGET/dev
Expand Down Expand Up @@ -70,7 +73,7 @@ case $DISKTYPE in
echo "(hd0) $MAPPERDEV" > $TARGET/boot/grub/device.map
chroot "$TARGET" grub-install $LODEV
;;
drbd)
*)
chroot "$TARGET" grub-install $BLOCKDEV
;;
esac
Expand All @@ -88,7 +91,7 @@ case $DISKTYPE in
lvm)
chroot "$TARGET" grub-install $LODEV
;;
drbd)
*)
chroot "$TARGET" grub-install $BLOCKDEV
;;
esac
Expand Down

0 comments on commit ba74341

Please sign in to comment.