[lxc-users] Getting a read-only error when trying to add storage

Tony Lewis tony at lewistribe.com
Thu Jul 27 23:12:31 UTC 2017


I'm just getting started with LXC.  I'm trying to add a storage pool, 
but it's telling me that it's read-only.

    root at debian:/# mkdir /test
    root at debian:/# mkdir /test/stor1
    root at debian:/# lxc storage create vm dir source=/test/stor1
    error: mkdir /test: read-only file system
    root at debian:/# ls -laR /test
    /test:
    total 12
    drwxr-xr-x  3 root root 4096 Jul 27 15:42 .
    drwxr-xr-x 24 root root 4096 Jul 27 15:42 ..
    drwxr-xr-x  2 root root 4096 Jul 27 15:42 stor1

    /test/stor1:
    total 8
    drwxr-xr-x 2 root root 4096 Jul 27 15:42 .
    drwxr-xr-x 3 root root 4096 Jul 27 15:42 ..
    root at debian:/# rmdir /test/stor1/
    root at debian:/# lxc storage create vm dir source=/test/stor1
    error: mkdir /test: read-only file system
    root at debian:/#

It doesn't seem to matter whether the directory exists or not. 
Everything LXC/LXD seems to be running as root, and root owns all the 
directory structure where I'm trying to install things, so I don't think 
it's a POSIX ACL issue.  I even made the parent directory with rwxrwxrwx 
permissions.

I was able to add a storage pool beside the default one

+---------+-------------+--------+------------------------------------------------+---------+
|  NAME   | DESCRIPTION | DRIVER | SOURCE                     | USED BY |
+---------+-------------+--------+------------------------------------------------+---------+
| default |             | dir    | 
/var/snap/lxd/common/lxd/storage-pools/default | 2       |
+---------+-------------+--------+------------------------------------------------+---------+
| vm      |             | dir    | 
/var/snap/lxd/common/lxd/storage-pools/vm      | 0       |
+---------+-------------+--------+------------------------------------------------+---------+

But that doesn't help me.

I'm using a pristine Debian 9 install, and have tried both the stable 
(2.15) and candidate (2.16) LXC versions, installed as snaps.  I have 
tried the same command in the try-it online feature, and it works there.

What am I doing wrong?

Tony


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170728/063089ef/attachment.html>


More information about the lxc-users mailing list