defconf SYSTEM_DISK_TYPE "scsi" \
"scsi|ide|virtio" "type of disks to use in nodes"
-rhel_system_disk_prefix ()
+rhel_disk_prefix ()
{
- case "$SYSTEM_DISK_TYPE" in
+ case "$1" in
(scsi) echo "sd" ;;
(virtio) echo "vd" ;;
ide)
case "$RHEL_VERSION" in
(5.*) echo "hd" ;;
(6.*) echo "sd" ;;
- (*) die "Unknow RHEL_VERSION in rhel_system_disk_prefix" ;;
+ (*) die "Unknow RHEL_VERSION in rhel_disk_prefix" ;;
esac
;;
- (*) die "Unknow SYSTEM_DISK_TYPE in rhel_system_disk_prefix" ;;
+ (*) die "Unknow SYSTEM_DISK_TYPE in rhel_disk_prefix" ;;
esac
}
fi
if [ "$SYSTEM_DISK_PREFIX" = "@uto" ] ; then
- SYSTEM_DISK_PREFIX=$(rhel_system_disk_prefix)
+ SYSTEM_DISK_PREFIX=$(rhel_disk_prefix $SYSTEM_DISK_TYPE)
fi
}
defconf SHARED_DISK_TYPE "scsi" \
"scsi|ide|virtio|iscsi" "type of disks to use for shared disks"
-defconf SHARED_DISK_PREFIX "sd" \
+defconf SHARED_DISK_PREFIX "@uto" \
"sd|hd|vd" "shared disk device prefix"
defconf SHARED_DISK_CACHE "default" \
##############################
+shared_disk_post_config_hook()
+{
+ if [ "$SHARED_DISK_PREFIX" = "@uto" ] ; then
+ SHARED_DISK_PREFIX=$(rhel_disk_prefix $SHARED_DISK_TYPE)
+ fi
+}
+
+register_hook post_config_hooks shared_disk_post_config_hook
+
shared_disk_ids="tmp/shared_disk_ids"
register_hook create_cluster_hooks shared_disk_setup