<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">I’m busy discovering LXD v2.0.9 on Ubuntu 16.04</div><div class="">I’m trying to access the (ZFS) snapshots data from within containers.</div><div class=""><br class=""></div><div class="">I’ve shared the “.zfs/snapshot” directory with the associated container like this: </div><div class=""><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);"><span class="" style="font-variant-ligatures: no-common-ligatures;">lxc config device add obliging-panda snapshot disk path=/snapshot source=/var/lib/lxd/containers/obliging-panda.zfs/.zfs/snapshot</span></div></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">From inside the container, I see the list of snapshots:</div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">root@obliging-panda:/snapshot# ls -l /snapshot/</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">total 2</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x 4 root   root    5 May 23 09:12 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">snapshot-2017_06_12_08h56</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x 4 root   root    5 May 23 09:12 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">snapshot-2017_06_13_09h06</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x 4 root   root    5 May 23 09:12 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">snapshot-abcd</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">dr-xr-xr-x 1 nobody nogroup 0 Jun 13 07:11 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">snapshot-newsnap</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x 4 root   root    5 May 23 09:12 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">snapshot-test</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class=""><br class=""></span></div></div><div class="">But they all look inaccessible:</div></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">root@obliging-panda:/snapshot# ls -l /snapshot/snapshot-newsnap/rootfs</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">ls: cannot access '</span>/snapshot/snapshot-newsnap/rootfs': Object is remote</div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">…until you list them in the main Server </div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><span style="font-family: Monaco; font-size: 10px;" class=""><br class=""></span></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><span style="font-family: Monaco; font-size: 10px;" class="">ls</span><span style="font-family: Monaco; font-size: 10px;" class="">  </span><span style="font-family: Monaco; font-size: 10px;" class="">/var/lib/lxd/containers/obliging-panda.zfs/.zfs/snapshot/snapshot-newsnap/rootfs/</span></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><span style="font-family: Monaco; font-size: 10px;" class=""><br class=""></span></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">Then they appear in the container:</div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><span style="font-family: Monaco; font-size: 10px;" class=""><br class=""></span></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">root@obliging-panda:/snapshot# ls -l snapshot-newsnap/rootfs</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">total 99</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x  2 root root 173 Jun 12 12:01 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">bin</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x  3 root root   3 May 16 14:19 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">boot</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">drwxr-xr-x  5 root root  91 May 16 14:18 </span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">dev</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">...</span></div></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">The funny thing, is that this same weird behaviour  happened a long time ago in Solaris zones… so I imagine this has to do with ZFS…</div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">Is there another more “standard" way to access snapshots?</div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><span class="" style="font-variant-ligatures: no-common-ligatures;">I saw there is a  /snap (empty) directory in the containers. Is it meant to access snapshots? if yes how do you have them mounted?</span></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">Sorry if there is something obvious I’m missing. I’m new to Ubuntu/LXD (coming from Solaris & SmartOS zones).</div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">Thanks.</div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);">Michel</div></body></html>