[lxc-users] Using a mounted drive to handle storage pool

Lai Wei-Hwa whlai at robco.com
Tue Nov 21 23:33:52 UTC 2017


That seems to work!

I still get the message:
error: Unable to talk to LXD: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: no such file or directory

But if I run it again, it inits.  Thanks, Ron.

Thanks! 
Lai

----- Original Message -----
From: "Ron Kelley" <rkelleyrtp at gmail.com>
To: "lxc-users" <lxc-users at lists.linuxcontainers.org>
Sent: Tuesday, November 21, 2017 6:26:30 PM
Subject: Re: [lxc-users] Using a mounted drive to handle storage pool

Perhaps you should use “bind” mount instead of symbolic links here?

mount -o bind /storage/lxd /var/snap/lxd

You probably also need to make sure survives a reboot.  



-Ron




> On Nov 21, 2017, at 5:47 PM, Lai Wei-Hwa <whlai at robco.com> wrote:
> 
> In the following scenario, I:
> 
> $ sudo mount /dev/sdb /storage
> 
> Then, when I do:
> 
> $ sudo ln -s /storage/lxd lxd
> $ snap install lxd
> $ sudo lxd init
> error: Unable to talk to LXD: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: no such file or directory
> 
> 
> 
> Thanks! 
> Lai
> 
> From: "Lai Wei-Hwa" <whlai at robco.com>
> To: "lxc-users" <lxc-users at lists.linuxcontainers.org>
> Sent: Tuesday, November 21, 2017 1:37:18 PM
> Subject: [lxc-users] Using a mounted drive to handle storage pool
> 
> I've currently migrated LXD from canonical PPA to Snap. 
> 
> I have 2 RAIDS:
> 	• /dev/sda - ext4 (this is root device)
> 	• /dev/sdb - brtfs (where I want my pool to be with the containers and snapshots)
> How/where should I mount my btrfs device? What's the best practice in having the pool be in a non-root device? 
> 
> There are a few approaches I can see
> 	• mount /dev/sdb to /var/snap/lxd (or /var/lib/lxd - if you're using PPA) ... then: lxd init
> 	• mount /dev/sdb to /storage and: ln -s /storage/lxd /var/snap/lxd ... then: lxd init
> 	• lxd init and choose existing block device /dev/sdb
> Whats the best practice and why?
> 
> Also, I'd love it if LXD could make this a little easier and let users more easily define where the storage pool will be located. 
> 
> Best Regards,
> 
> Lai 
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

_______________________________________________
lxc-users mailing list
lxc-users at lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list