Serge,
  Is there a good way that I can determine if I'm in an lxc container so that I 
can decide not to try to resize the filesystem on '/' ?
  At 
http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/CloudConfig/cc_resizefs.py
 , cloud-init does:
    try:
       st_dev=os.stat("/").st_dev
       dev=os.makedev(os.major(st_dev),os.minor(st_dev))
       os.mknod(devpth, 0400 | stat.S_IFBLK, dev)
    except:
        log.warn("Failed to make device node to resize /")
        raise
Its using the os.stat / to get the major, minor, then does an mknod of that so 
that it has a known device node to work on (rather than guessing the path to 
/dev/root).  Either way,  right now the mknod is failing, but I'm guessing the 
subsequent resize would also fail in a typical lxc setup.

Any suggestions on how to decide not to attempt resize?

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

Title:
  resizefs module causes problems on LXC containers

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/800856/+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