ZFS Nested Data Set

Status
Not open for further replies.

mskenderian

Contributor
Joined
May 24, 2013
Messages
100
So i have a zfs pool called Data.
I have the following datasets:
/Data/Storage
/Data/Backup

inside storage i have a few folders (Apps, Graphics, Media). So I created a nested dataset within Data/Storage. called Media. keep in mind i also have a Folder called Media. when i created this all my files and folders inside Media got lost. I lost everything. then i deleted the Media dataset that was in Data/Storage. my files all came back.

Is this a normal behavior?

Thanks in advance.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Is this a normal behavior?
Sure, if the administrator normally mounts a filesystem on top of a folder that is being used and contains data. ;) If you want to create a new dataset than rename the existing folder first.
 
Joined
Feb 6, 2014
Messages
9
Ok, I have done almost the same exact thing but am having trouble! I accidentally named my new dataset Media, the same name as my shared media folder and now all my media no longer shows up. I will NOT delete this dataset until I know that all my media is safe because my backup drive failed completely 2 days ago. I need to know how to undo this without loss of files if this is possible!
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
I will NOT delete this dataset until I know that all my media is safe because my backup drive failed completely 2 days ago. I need to know how to undo this without loss of files if this is possible!
So then try to first unmount the dataset. Run "zfs unmount <dataset>" and verify that your media files are there.
 
Joined
Feb 6, 2014
Messages
9
The problem I am encountering is that I can't access the stored data after the dataset overwrote my media folder. I may just not know where to look, that is why I posted hoping to gain some insight I was missing.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
It did not overwrite anything. You just mounted it over your media directory. As it seems you are scared to destroy the dataset I suggested you unmount it first which will make your files visible in the media directory again.
 
Joined
Feb 6, 2014
Messages
9
Thank you Dusan, that is the sort of thing I was missing. I find it odd that when I try to umount it says dataset does not exist, yet I am looking right at it in the web gui.
 
Joined
Feb 6, 2014
Messages
9
And sorry, the post I wrote about the overwrite was typed and sent without refreshing, you must have replied before I sent it.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
You are probably not entering the entire dataset name. Please post output of "zfs list" (or screenshot of your datasets).
 
Joined
Feb 6, 2014
Messages
9
Haha, I got it! It was a simple matter of remembering to capitalize the M in media. Dataset unmounted, files all showing again and being backed up on several smaller drives as I type this! Thank you Dusan for the very useful help!
 

JohnnyFreeNAS

Dabbler
Joined
Feb 11, 2016
Messages
24
So i have a zfs pool called Data.
I have the following datasets:
/Data/Storage
/Data/Backup

inside storage i have a few folders (Apps, Graphics, Media). So I created a nested dataset within Data/Storage. called Media. keep in mind i also have a Folder called Media. when i created this all my files and folders inside Media got lost. I lost everything. then i deleted the Media dataset that was in Data/Storage. my files all came back.

Is this a normal behavior?

Thanks in advance.
So i have a zfs pool called Data.
I have the following datasets:
/Data/Storage
/Data/Backup

inside storage i have a few folders (Apps, Graphics, Media). So I created a nested dataset within Data/Storage. called Media. keep in mind i also have a Folder called Media. when i created this all my files and folders inside Media got lost. I lost everything. then i deleted the Media dataset that was in Data/Storage. my files all came back.

Is this a normal behavior?

Thanks in advance.
This is normal behavior. what you did was created a mount point then populated it with files and then mounted something on top of it. the files are still in the original mount point. when you drop the additional mount point the original files will appear. also those files that were hidden by the mount were also still taking up disk space.

also note that this is not a FreeNas issue this happens in all flavors of linux/Unix
 
Status
Not open for further replies.
Top