Public bug reported:

quantal
lxc 0.8.0~rc1-4ubuntu39
kernel 3.5.0-21-generic
using lvm on the host


I came back from holidays and found this problem. Not sure if it's related to a 
recent update of the system, I was updating it regularly in the past 3 weeks I 
was away but I haven't tried any LXC creation during that time, until today.

If I create a container with the following command:

lxc-create -n precise-test -t ubuntu -- -b andreas -r precise

Then start it and login, the device for / is incorrect:

andreas@precise-test:~$ mount
/dev/mapper/vg0-var on / type ext4 (rw)

That device does not exist:
andreas@precise-test:~$ ls -la /dev/mapper
ls: cannot access /dev/mapper: No such file or directory
andreas@precise-test:~$ 

It's in fact my external device for the /var mount point. On the host:
root@nsn7:~# mount|grep /var
/dev/mapper/vg0-var on /var type ext4 (rw)
/dev/mapper/vg0-postgresql on /var/lib/postgresql type ext4 (rw)
/dev/mapper/vg0-virt on /var/lib/libvirt/images type ext4 (rw)


If I create the container with this command, however:
lxc-create -n precise-test -t ubuntu -B lvm --vgname vg0 --lvname 
lxc-precise-test -- -b andreas -r precise

Then it works:
andreas@precise-test:~$ mount
/dev/dm-16 on / type ext4 (rw)


The consequence I saw so far is that installing or updating or installing 
grub-pc inside the container breaks, because it can't find the device where the 
root filesystem is mounted from:
2013-01-07 16:15:07,835 unit:mysql/1: hook.output INFO: Setting up grub-pc 
(1.99-21ubuntu3.7) ...

2013-01-07 16:15:08,293 unit:mysql/1: hook.output INFO: /usr/sbin/grub-
probe: error: cannot find a device for / (is /dev mounted?).

2013-01-07 16:15:08,500 unit:mysql/1: hook.output INFO: dpkg: error processing 
grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1

(example above from a juju deploy command)

The default precise container does not have grub-pc installed, so
something else must be pulling it in (maybe the mysql charm from my
example).

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1096984

Title:
  Wrong device for the / mount point

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1096984/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to