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

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


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 


    1. mount /dev/sdb to /var/snap/lxd (or /var/lib/lxd - if you're using PPA) ... then: lxd init 
    2. mount /dev/sdb to /storage and: ln -s /storage/lxd /var/snap/lxd ... then: lxd init 
    3. 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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20171121/ac7aa70a/attachment.html>


More information about the lxc-users mailing list