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

Fajar A. Nugraha list at fajar.net
Fri Jul 28 00:22:45 UTC 2017


On Fri, Jul 28, 2017 at 6:12 AM, Tony Lewis <tony at lewistribe.com> wrote:

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

> 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?
>
>
I'm GUESSing it's the 'snap' fault. /test/stor1 is probably translated into
something else under /var/snap/lxd ? Or perhaps snaps doesn't have acces to
directories outside /var/snap (your 'vm' storage pool says it might be the
case)?

You can also try using packages (not sure if it exists for debian),
building lxd yourself, or switch to ubuntu. I've tested dir (some time ago)
and zfs (my main backend for lxd), both works.

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


More information about the lxc-users mailing list