Artur Linhart
2011-Apr-10 08:46 UTC
[Pkg-xen-devel] Bug#622096: xen-utils-common: error in script "block" by checking loop device sharing prevents DomU from start
Package: xen-utils-common Version: 4.0.0-1 Severity: important The script /etc/xen/scripts/block contains an error in the part which is checking the sharing of the already created loop devices. This error leads in the case of somespecific file inode values to the wrong report of the loop device as being already used and causes then the domain could not be started with such device at all, there is only displayed the message File {filename} is loopback-mounted through {loop1devname}, which is mounted in a guest domain {domainname}, and so cannot be mounted now. This error occurs in the case the inode of the given file is the substring of the another inode of the another file used also as loop device (for example as a block device in different DomU) Concretely, in my case I have one file with inode value 13 and the second with inode value 1356984 In this case the part of the script "block": shared_list=$(losetup -a | grep ' \[0*'${dev}'\]:'${inode} | does not work correctly, it resolves the file with inode 1356984 which is already used like the file with inode 13 and prevents the usage of the file with inode 13, thinking it is already used. Also, the check of the sharing could generally cause following error: It would also not work anymore in the case there are multiple inodes, starting with "13" - then the given statement resolves multiple loop devices, so even if the device "13" would be already used, the checking of the sharing reports multiple loop devices (loop device corresponding with all such inodes like 1356984, 13, 1369336) what leads in the next processing in function check_sharing to the wrong evaluation and report the device 13 can be used again. The solution of this problem is (at least in my case it helped, but I think this could be a general solution of the output of "losetup -a" is always the same) to modify the statement above like follows: shared_list=$(losetup -a | grep ' \[0*'${dev}'\]:'"${inode} " | -- System Information: Debian Release: 6.0.1 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages xen-utils-common depends on: ii gawk 1:3.1.7.dfsg-5 GNU awk, a pattern scanning and pr ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip ii udev 164-3 /dev/ and hotplug management daemo ii xenstore-utils 4.0.1-2 Xenstore utilities for Xen xen-utils-common recommends no packages. xen-utils-common suggests no packages. -- Configuration Files: /etc/default/xendomains changed [not included] /etc/init.d/xend changed [not included] /etc/xen/scripts/block changed [not included] /etc/xen/scripts/network-bridge changed [not included] /etc/xen/scripts/qemu-ifup changed [not included] /etc/xen/scripts/vif-bridge changed [not included] /etc/xen/scripts/vif-common.sh changed [not included] /etc/xen/xend-config.sxp changed [not included] -- no debconf information
Maybe Matching Threads
- Bug#588406: xen-utils-common: /etc/xen/scripts/block not driving helper scripts; XEN_SCRIPT_DIR not properly set
- [PATCH] losetup: use stdout and return 0 for -h
- [klibc:master] losetup: Fix char signedness mismatches with <linux/loop.h>
- [klibc:master] losetup: Delete fallbacks to LOOP_{GET, SET}_STATUS
- [klibc:master] losetup: Use LOOP_CTL_GET_FREE to find free device