Permalink
Browse files

Fix xe-edit-bootloader script to match new sm backend scheme.

Old XCP use /dev/xvd* devices when done vbd-plug to dom0.
xe-edit-bootloader adds parition number to it:

-p0 -> /dev/xvda0, -p1 -> /dev/xvda1, etc.

New SM backend scheme use kpartx to get partitions from devices like this:

/dev/sm/backend/b9b15e78-c79b-f9b7-4238-d36be14b8075/a5711219-c54f-4d14-ad1e-a0ac36d16232p1
/dev/sm/backend/b9b15e78-c79b-f9b7-4238-d36be14b8075/a5711219-c54f-4d14-ad1e-a0ac36d16232p2

This fix replace old dev+part_num scheme with new: dev+'p'+part_num scheme.

Note: Partition numbers are shifting (was: 0,1,2,3,4,5...; become: 1,2,3,4,5,6...)
  • Loading branch information...
1 parent 25b4129 commit 5231a5c40d69a77a86cda2e67c8718e0c8c0ca2f @amarao amarao committed Jul 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/xe-edit-bootloader
@@ -37,7 +37,7 @@ while getopts "hu:n:p:f:" opt ; do
h) usage ;;
u) vm_uuid=${OPTARG} ;;
n) vm_name="${OPTARG}" ;;
- p) device_number=${OPTARG} ;;
+ p) device_number=p${OPTARG} ;;
f) default_file_list="${OPTARG}" ;;
*) echo "Invalid option"; usage ;;
esac

0 comments on commit 5231a5c

Please sign in to comment.