I was first time to use zfs as storage pool for my lxd cluster.
I manually create the zpool「zfs-vda」 and the storage pool「data」, and launch an instance:
[root@lxd-server-100-23 ~]# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zfs-vda 14.5G 1.01G 13.5G - - 0% 6% 1.00x ONLINE -
[root@lxd-server-100-23 containers]# lxc storage show data
config: {}
description: ""
name: data
driver: zfs
used_by:
- /1.0/images/9a04aa57d48d12a3a82eb71587eeef726924c3088a84a3acc62d84f02c11f32e?target=lxd-server-100-23
- /1.0/instances/u1?target=lxd-server-100-23
status: Created
locations:
- lxd-server-100-23
- lxd-server-100-8
[root@lxd-server-100-23 ~]# lxc list u1
+------+---------+------+------+-----------+-----------+-------------------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+------+---------+------+------+-----------+-----------+-------------------+
| u1 | RUNNING | | | CONTAINER | 0 | lxd-server-100-23 |
+------+---------+------+------+-----------+-----------+-------------------+
[root@lxd-server-100-23 ~]# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zfs-vda 1.01G 13.0G 24K legacy
zfs-vda/containers 35.2M 13.0G 24K legacy
zfs-vda/containers/u1 35.2M 13.0G 1.00G legacy
zfs-vda/custom 24K 13.0G 24K legacy
zfs-vda/deleted 120K 13.0G 24K legacy
zfs-vda/deleted/containers 24K 13.0G 24K legacy
zfs-vda/deleted/custom 24K 13.0G 24K legacy
zfs-vda/deleted/images 24K 13.0G 24K legacy
zfs-vda/deleted/virtual-machines 24K 13.0G 24K legacy
zfs-vda/images 1001M 13.0G 24K legacy
zfs-vda/images/9a04aa57d48d12a3a82eb71587eeef726924c3088a84a3acc62d84f02c11f32e 1001M 13.0G 1001M legacy
zfs-vda/virtual-machines 24K 13.0G 24K legacy
I can see the instance 「u1」 is using the zpool「zfs-vda」, I want to mount it and checkout the file, but failed:
[root@lxd-server-100-23 ~]# zfs set mountpoint=/data/u1 zfs-vda/containers/u1
[root@lxd-server-100-23 ~]# zfs mount -a
[root@lxd-server-100-23 ~]# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zfs-vda 1.01G 13.0G 24K legacy
zfs-vda/containers 35.2M 13.0G 24K legacy
zfs-vda/containers/u1 35.2M 13.0G 1.00G /data/u1
zfs-vda/custom 24K 13.0G 24K legacy
zfs-vda/deleted 120K 13.0G 24K legacy
zfs-vda/deleted/containers 24K 13.0G 24K legacy
zfs-vda/deleted/custom 24K 13.0G 24K legacy
zfs-vda/deleted/images 24K 13.0G 24K legacy
zfs-vda/deleted/virtual-machines 24K 13.0G 24K legacy
zfs-vda/images 1001M 13.0G 24K legacy
zfs-vda/images/9a04aa57d48d12a3a82eb71587eeef726924c3088a84a3acc62d84f02c11f32e 1001M 13.0G 1001M legacy
zfs-vda/virtual-machines 24K 13.0G 24K legacy
[root@lxd-server-100-23 ~]# ll /data/u1/
total 0
[root@lxd-server-100-23 ~]#
How can I access the instance file?