1

I am trying the new zfs implementation of ubuntu on my docker server. I have made a pool:

sudo zpool create dockerz mirror wwn-0x50014ee6afaf43a6-part1 wwn-0x50014ee0027f52a0-part1 mirror wwn-0x5000c5004dc2a401-part1 wwn-0x50014ee002530b22

2 zfs

 1745  sudo zfs create dockerz/docker
 1746  sudo zfs create dockerz/lxcontainers

uncompress a backup

sudo tar xvpfj /media/nfsmedia/syno/usb9/backup.tar.bz2 -C /dockerz/docker/DOCK/

modify a fstab to load some dir

/dockerz/docker/DOCK/docker/docker     /var/lib/docker         none    bind    0       0
/dockerz/docker/DOCK/boinc-client      /var/lib/boinc-client   none    bind    0       0

and then no more files in my zfs ... just the 2 dir that I have mounted by bind and no files in it either. But still I have the space used:

/dockerz/
├── docker
│   └── DOCK
│       ├── boinc-client
│       └── docker
│           └── docker
│               ├── aufs
│               │   ├── diff
│               │   ├── layers
│               │   └── mnt
│               ├── containers
│               ├── image
│               │   └── aufs
│               │       ├── distribution
│               │       ├── imagedb
│               │       │   ├── content
│               │       │   │   └── sha256
│               │       │   └── metadata
│               │       │       └── sha256
│               │       ├── layerdb
│               │       └── repositories.json
│               ├── network
│               │   └── files
│               │       └── local-kv.db
│               ├── swarm
│               ├── tmp
│               ├── trust
│               └── volumes
│                   └── metadata.db
└── lxcontainers

26 directories, 3 files

$sudo zfs list

dockerz                292G   785G  57,5K  /dockerz
dockerz/docker         292G   785G   292G  /dockerz/docker
dockerz/lxcontainers  57,5K   785G  57,5K  /dockerz/lxcontainers

I can't retrieve my files even when I deactivate in the fstab... I have to destroy the zfs and then recreate then uncompress again the files...

from the cat /proc/mounts, it seems taht only dockerz/lxcontainers is mounting after those modifications to the fstab any ideas why?

vigilian
  • 402
  • 2
  • 4
  • 11
  • What's the reason for the bind mounts? – Michael Hampton Oct 10 '16 at 00:15
  • @MichaelHampton that I can't configure any other directories for these 2 soft. boinc wants to have the data dir in /var/lib/boinc-client and docker wants to have all the data in /var/lib/docker and symbolic links doesn't work because these 2 softs doesn't follow links – vigilian Oct 10 '16 at 04:15
  • 1
    So you set the mountpoint property on the dataset. Bind mounts are unnecessary. – Michael Hampton Oct 10 '16 at 04:18
  • @MichaelHampton so bind mounts are forbidden from zfs? – vigilian Oct 10 '16 at 04:21
  • Michael didn't say that. But the preferred way is to set mountpoints, as bind mounts only cause extra confusion with no benefit. – Tero Kilkanen Oct 10 '16 at 17:21
  • @TeroKilkanen there is still a problem obviously to mount a bind during startup which is on a zfs pool. but okey this is not recommended then I understand – vigilian Oct 19 '16 at 16:47

1 Answers1

0

So still a problem with bind. I have seen another post on that that seems to make problems with ubuntu to mount bind volume from zfs during boot loading.

But then as @MichaelHampton said,I should have done the mount boint directly to the good place to create more zfs filesystem inside the pool. so with zfs create dockerz/boinc for example and mount it to /var/lib/boinc-client

vigilian
  • 402
  • 2
  • 4
  • 11