ZFS Dataset mount points corrupted

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Here is a list of my specific zfs dataset

#zfs list tank/ZFS-Snapshots/Proxmox 1.31G 22.0T 1.31G /mnt

Why is it mounted at the /mnt mountpoint? How can I change this? I set the dataset up with the GUI. I can't access the dataset on the command line or remount it or frankly even access the dataset...for example. I can't delete it on the FreeNas GUI

# zfs set mountpoint=/mnt/tank/ZFS-Snapshots/Proxmox tank/ZFS-Snapshots/Proxmox
cannot unmount '/mnt': Device busy
Screen Shot 2019-02-28 at 6.18.54 PM.png
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Why is it mounted at the /mnt mountpoint?
That is where FreeNAS mounts all storage pools.
How can I change this?
You can't, as long as you are using FreeNAS. Why would you even think about it?
You are trying to do something so totally wrong that I can't even understand what you are trying to do.

Please try to explain yourself so we can tell you what you are supposed to be doing because this is wrong.
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Yes I know it's very very wrong

I have one zpool --- tank.
Within tank I have multiple datasets. I created the datasets with the GUI
One of the datasets I created with the GUI was tank/ZFS-Snapshots/Proxmox. You can see this listed in the picture above. My belief is that this should be mounted at /mnt/tank/ZFS-Snapshots/Proxmox.

The problem is that Freenas or zfs or some process screwed up. I wasn't creating anything on the command line. Unfortunately the tank/ZFS-Snapshots/Proxmox datapoint is now mounted as /mnt.

Code:
root@freenas:/boot # zfs mount
freenas-boot/ROOT/11.2-U2       /
tank/ZFS-Snapshots/Proxmox      /mnt
tank                            /mnt/tank
tank/TimeMachine                /mnt/tank/TimeMachine
tank/ZFS-Snapshots              /mnt/tank/ZFS-Snapshots


This configuration makes no sense. I want to either delete or remove or change where tank/ZFS-Snapshots/Proxmox is mounted. In fact I can just delete the dataset -- if I could. I can't do anything now with the dataset because of the mountpoint. I can't delete it within the GUI or change the mountpoint, or even do these things at the command line. I have no idea how /mnt was assigned as the mountpoint -- clearly there is a problem because the GUI above doesn't reflect what the command line is showing in terms of mountpoint.

Here is my zpool list

Code:
# zpool list
NAME           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
freenas-boot  59.5G  10.2G  49.3G        -         -      -    17%  1.00x  ONLINE  -
tank          43.5T  5.36T  38.1T        -         -     6%    12%  1.00x  ONLINE  /mnt
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
The problem is that Freenas or zfs or some process screwed up. I wasn't creating anything on the command line. Unfortunately the tank/ZFS-Snapshots/Proxmox datapoint is now mounted as /mnt.
Did you do a ZFS send to push a snapshot from somewhere else into this Proxmox dataset?

Before you try this, make sure nothing is actively trying to access your storage.

Have you tried exporting the pool?
https://www.ixsystems.com/documentation/freenas/11.2/storage.html#export-disconnect-a-pool
It is possible, that exporting the pool (do not clear it) will allow you to import it again:
https://www.ixsystems.com/documentation/freenas/11.2/storage.html#importing-a-pool
This could clear up the incorrect mount location. If it doesn't, it may free the lock so the zfs set mountpoint command will work from the command line.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
PS. also, do not delete the share configuration. If you export the pool without deleting share config, you just stop and start the SMB service to get the share back working.
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
PS. also, do not delete the share configuration. If you export the pool without deleting share config, you just stop and start the SMB service to get the share back working.

I see what you are talking about -- this is my main pool. There is no other pool. Is this what you want me to do? And how do I reconnect the pool?


Screen Shot 2019-02-28 at 7.39.32 PM.png
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Ok -- I exported and reimported the pool, however its at the same point. Still mounted at /mnt. I tried the zfs set mountpoint command however keep getting the error:
cannot unmount '/mnt': Device busy
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Alright -- mucho thanks for mounting me in the right direction. With some trying alot of options this is what I did:

Code:
# zfs set canmount=off tank/ZFS-Snapshots/Proxmox  <---Which disables auto-mounting


I then exported and then re-imported the pool as you described

Code:
# zfs set mountpoint=/tank/ZFS-Snapshots/Proxmox tank/ZFS-Snapshots/Proxmox
# zfs set canmount=on tank/ZFS-Snapshots/Proxmox
# zfs mount tank/ZFS-Snapshots/Proxmox


And surprisingly all the data was still there!!!

Here is the original zfs replicate command I sent from the Proxmox box:
Code:
# zfs send -Rv rpool/ROOT/pve-1@initproxmox | ssh FreeNAS zfs recv -F tank/ZFS-Snapshots/Proxmox


What did I do wrong?
 
Top