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@debian:/# mkdir /test
   root@debian:/# mkdir /test/stor1
   root@debian:/# lxc storage create vm dir source=/test/stor1
   error: mkdir /test: read-only file system
   root@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@debian:/# rmdir /test/stor1/
   root@debian:/# lxc storage create vm dir source=/test/stor1
   error: mkdir /test: read-only file system
   root@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


_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to