Univention Bugzilla – Bug 33460
UCC roll out fails if underlying (virtual/RAID) harddisk was resized
Last modified: 2014-06-12 09:19:55 CEST
It happened during an UCC desktop roll out on a virtual machine. The first roll out attempt the HD space was not enough, so the roll out failed and I increased the size of the virtual disk. All following attempts, the roll out will fail: "The boot failed. Please contact your system administrator. Add debugshell=y to the boot parameters to get a debug shell. Press enter to reboot!" *Reason: Since a GPT partition was already created the first time, and the disk sized changed after that (moving the GPT header), 'parted' will fail to create the partitions (even when forced) with the following message: "Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra X blocks) or continue with the current setting?" *Solution: (http://www.novell.com/support/kb/doc.php?id=7006405) **add 'debugshell=yes' as an "Additional boot parameter" in UMC and once you have a shell: **Get 'parted' to report the error again: # parted -l Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra X blocks) or continue with the current setting? Fix/Ignore **Write "FIX" and press 'Enter' key Try the roll out again.
Yes, that is true. If i create a virtual machine with a small hard disk image (100MB) i get an error during partitioning. After resizing the image file with -> qemu-img resize fbotner_ucc-3-0.qcow2 +3000M the partitioning still fails ("Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra X blocks) or continue with the current setting?"). The reason is, we don't always create the GPT table, only if none exists. pt="$(/sbin/parted -s ${partition_device} unit MB print | sed -ne... if [ "$pt" != "gpt" ]; then debug "Partition table on ${partition_device} is not gpt." notice "Creating GPT on ${partition_device}" parted -s "${partition_device}" mklabel GPT fi So during the first run (with the small hard disk image), the GPT table is created. In the second run (with the resized image) the table is not rewritten. This causes the mismatch between the old GPT table and the new (resized) hard disk. After recreating the GPT tabel with "parted -s "${partition_device}" mklabel GPT" the problem is gone. But we can not simply always create the GPT table during partitioning as this would break the "remove_partitions" option from the image ini (all partitions are lost after (re)creating the GTP table). Best we wait for bug #34774 to rethink the whole partitioning process. Also, this is very hypothetical as normal ucc clients are not virtual machines (with the option to resize the hard disk)
Agreed, a cleaner solution can be implemented with Bug #34774, for UCC 2.0 we'll document this.
*** Bug 34042 has been marked as a duplicate of this bug. ***
UCC 2.0 has been released: http://docs.univention.de/release-notes-ucc-2.0.html If this error occurs again, please use "Clone This Bug".