0

When i export a zfs pool, the folder where the the pool was mounted still exists with only some of the datasets the pool has contained before.

Before re-importing I delete the directory where the pool was mounted via

sudo rm -rf /tank

Then the directory seems to be deleted. But after a short amount of time the directory shows up again with the exact same datasets, that were there right after export.

The pool was created via...

sudo zpool create tank mirror sda sdb

Output of zpool status:

config@ubuntu-nas:/tank$ zpool status
  pool: storage
 state: ONLINE
  scan: scrub repaired 0B in 0 days 00:39:53 with 0 errors on Sun Jun 28 19:23:35 2020
config:

        NAME                                 STATE     READ WRITE CKSUM
        storage                              ONLINE       0     0     0
          mirror-0                           ONLINE       0     0     0
            ata-ST2000VN004-2E4164_Z529RBWZ  ONLINE       0     0     0
            ata-ST2000VN004-2E4164_Z529RDW1  ONLINE       0     0     0

errors: No known data errors

  pool: torrent_media
 state: ONLINE
  scan: none requested
config:

        NAME           STATE     READ WRITE CKSUM
        torrent_media  ONLINE       0     0     0
          sda          ONLINE       0     0     0
          sdb          ONLINE       0     0     0

errors: No known data errors

I tried to umount the pool:

sudo umount /tank
umount: /tank: not mounted.

I tried to zfs unmount the pool

sudo zfs unmount tank
cannot open 'tank': dataset does not exist

Output of sudo mount
only entries containing zfs
and in the output there were no entries containing "tank"

/torrent_media on /torrent_media type zfs (rw,xattr,noacl)

/storage/docker on /docker type zfs (rw,xattr,noacl)
/storage on /storage type zfs (rw,xattr,noacl)
/storage/nextcloud on /storage/nextcloud type zfs (rw,xattr,noacl)
/storage/torrent_media on /storage/torrent_media type zfs (rw,xattr,noacl)
/storage/sam_personal on /storage/sam_personal type zfs (rw,xattr,noacl)

Thank you for any help!

3
  • "But after a short amount of time the directory shows up again with the exact same datasets" - are you sure? or is it just the hierarchy that is re-created, perhaps by some service writing files there...? When the pool is not present (i.e: not shown in the output of zpool status), use df -hT "${dir}" to see what filesystem a particular directory is on. I suspect it'll be your rootfs.
    – Attie
    Jul 4, 2020 at 22:52
  • "in the output there were no entries containing "tank"" - note that your pool is called storage... not tank... Is this a different pool that we should be ignoring?
    – Attie
    Jul 4, 2020 at 22:53
  • I re-imported the pool (former tank) as storage to access my files... but i still cant remove the folder /tank
    – Sammy
    Jul 5, 2020 at 7:43

1 Answer 1

0

Attie is right!

Blockquote or is it just the hierarchy that is re-created, perhaps by some service writing files there...?

Thank you! I feel kinda dumb, I didn't see that.

i ran:

sudo systemctl stop docker

to kill all my containers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .