Comment #9 on issue 1064 by [email protected]: Cannot install VM on Gluster bankend storage
https://code.google.com/p/ganeti/issues/detail?id=1064

I have found the problem is caused by function `format_disk0` in create script.

root@node1:/srv/ganeti/os/debootstrap# cat create
[...]
 45
 46 DEVICE_SIZE=$(blockdev --getsize64 $blockdev)
 47 if [ "$DEVICE_SIZE" -lt $MIN_DEV_SIZE ]; then
 48   echo "Device size is too small ($((DEVICE_SIZE/1048576)) MB)" 1>&2
 49   echo "Required size is at least 256MB" 1>&2
 50   exit 1
 51 fi
 52
 53 echo "999 DEVICE_SIZE is $DEVICE_SIZE"
 54
 55 if [ "$PARTITION_STYLE" = "none" ]; then
 56   echo "999 style none"
 57   filesystem_dev=$blockdev
 58   echo "999 filesystem_dev is $blockdev"
 59 elif [ "$PARTITION_STYLE" = "msdos" ]; then
 60   echo "999 style msdos"                   <---------------------------
 61   # Create one big partition, and make it bootable
 62   format_disk0 $blockdev
63 echo "999 call <--------------------------- format_disk0"
 64   filesystem_dev=$(map_disk0 $blockdev)
 65   echo "999 filesystem_dev is $blockdev"
 66   CLEANUP+=("unmap_disk0 $blockdev")
 67 else
 68   echo "Unknown partition style $PARTITION_STYLE" 1>&2
 69   exit 1
 70 fi
 71
 72 mke2fs -Fjqt $OSP_FILESYSTEM $filesystem_dev
 73 root_uuid=$($VOL_ID $filesystem_dev )
[...]

root@node1:/var/log/ganeti/os# cat add-debootstrap+default-instance2.ganeti.com-2015-04-16_03_33_41.log
999 enter create script
999 added udevadm here!!!
999 DEVICE_SIZE is 5368709120
999 style msdos                                 <---------------------------
BLKRRPART: Invalid argument
Disk /dev/loop2: cannot get geometry

Disk /dev/loop2: 5120 cylinders, 64 heads, 32 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/loop2: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/loop2p1   *      2048  10485759   10483712  83  Linux
/dev/loop2p2             0         -          0   0  Empty
/dev/loop2p3             0         -          0   0  Empty
/dev/loop2p4             0         -          0   0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Invalid argument

999 call format_disk0                            <--------------------------
999 filesystem_dev is /dev/loop2
999 run mke2fs here!!!
999 reset passwd
passwd: password expiry information changed.
999 leave create script
settle: invalid option -- 'd'
umount: /tmp/tmp.0xN0xEkiIW: not found


The related codes in create is "format_disk0 $blockdev ". $blockdev is "/dev/loop2". It seems that something wrong with "/dev/loop2". $blockdev is passed into format_disk0 to execute as the command "sfdisk -H 64 -S 32 -u S --quiet --Linux $blockdev". When I run this command as follows, it shows me the same error.

root@node1:/var/log/ganeti/os# sfdisk -H 64 -S 32 -u S --quiet --Linux /dev/loop2
BLKRRPART: Invalid argument
Disk /dev/loop2: cannot get geometry

Disk /dev/loop2: 5120 cylinders, 64 heads, 32 sectors/track
Old situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/loop2p1   *      2048  10485759   10483712  83  Linux
/dev/loop2p2             0         -          0   0  Empty
/dev/loop2p3             0         -          0   0  Empty
/dev/loop2p4             0         -          0   0  Empty
^C

I am trying to fix this problem.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Reply via email to