Setup wizard share overwrote my dataset with the same name

Status
Not open for further replies.

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
I recently moved to some new hardware, install latest 9.3.1 as of 09/26/2015), run through the setup wizard, notice quick option to add a new share, and name it 'media' (same name as my dataset since it's where my media is). Now my dataset has been seemingly replaced by this new 'media' dataset though my data is somewhere still on my harddrives because the pool still reports my usage correctly. Take note, I didn't destroy my dataset. All I did was try to set up a CIFS share from the setup wizard where nowhere does it say "this will create a new dataset or destroy one with the same name."

I've done searching and no one else seems to have this issue.
Will reimporting an old config or reinstalling/reimporting return my old dataset or am I hosed?

Thanks in advance.

UPDATE - lessons learned and conclusion:
- I was able to get my data back, but I had backups anyways.
-
I may have been able to avoid the risk of losing data by unmounting the newly created dataset instead of thinking of destroying the new dataset instead would bring the old dataset back (or at least mountable). Thankfully it did.

- Making a share should not trigger making a dataset, or if it the default behavior is really desired, the name of the dataset being created should be checked against what already exists.

I am a software developer and believe that this was simply an oversight. It happens. I will happily give the devs my forethought and thinking into why I made my choices. Please let me be the only person who has this problem in the future.
 
Last edited:

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Will reimporting an old config or reinstalling/reimporting return my old dataset or am I hosed?
  1. If you have the original boot device unaltered and/or changed, just go back to square one and start again.
  2. I personally don't use the wizard, I just skip that and load up the previous config from my saved file.
  3. Best practice, ALWAYS save a copy of the config BEFORE making ANY changes... and when doing a
fresh install, place the original boot drive aside to be able to revert back if things go south.
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
Problem is I'm moving off of ESXi to raw hardware but I still have the config. I'll give it a try.
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Problem is I'm moving off of ESXi to raw hardware but I still have the config. I'll give it a try.
THAT is beyond my understanding, sorry.
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
I had plans to use this ESXi host, those plans didn't really fall through so I chose to buy new hardware and migrate FreeNas from the host to this new hardware. Freshly installed on new everything (minus zfs drives and m1015 in IT mode). Went through the wizard to create a new share instead of restoring config because the network interfaces were having some issues (the fresh install fixed this). Saw quick option to create a new share while going through the wizard. Created a share and noticed that my data is no longer showing up and this new media dataset has KB of usage instead of TB though the pool states that 9ish TB are still being used.

I concluded that my data is still there but under a different uuid or something.

The other drives were just passthrough to ESXi. It's just this dataset was created with using the Setup Wizard producing this behavior. Nothing on here is critical. It's just my movies and tv shows. Just 9TB that I'd have to go get again from backups and I just gave a copy of it to a friend. I was hoping for a quicker fix than copying it all back over.

The config is restoring so I'll let this thread know how it goes.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
if you do 'zfs unmount /mnt/pool/media' it should fix your problem. You created a new dataset and mounted it over the top of your old dataset.
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
About 10s before I got that response, I deleted the new one thinking that it would just unmount the new one as well. Disk space usage hasn't changed so it's all still safe.

Trying to mount /mnt/main/media shows the error "invalid dataset name".
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
don't ever use a delete or destroy command unless you are ok with everything going away forever. try 'zfs mount -a' maybe? I'm not sure that flag exists.
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
Still hasn't shown up but the flag exists. Usage still remains the same.
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
I'm just going to copy all my media from my friend again. None of this was critical data anyways.

Thanks guys.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
before you do that try rebooting to see if it just mounts automatically again.
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I've not heard of this issue before today. Do y'all think a note added to the manual might be helpful?
See example thumbnail. Wizard-suggestion.gif
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
It just came back...not sure how or why but everything is back. I had just looked on the local box too.

Thanks again guys!
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Making a share should not trigger making a dataset, or if it the default behavior is really desired, the name of the dataset being created should be checked against what already exists.
It's actually recommended to have each share be its own dataset. The problem appears to be that you had an existing directory (not dataset) called media. ZFS allows you to create a dataset with the name of an existing directory. If it's then mounted at the default location, it appears to replace your directory, and the contents of that directory seem to disappear. You can restore them to visibility by unmounting the dataset (or destroying it, but then you'd lose any data in the dataset).

FreeNAS has "seatbelts" in the web GUI that ordinarily prevent you from making a dataset over the top of an existing directory. For example, if you go to Storage -> select volume -> Create Dataset and enter the name of an existing directory, it'll fail and tell you "The path /mnt/tank/media already exists". However, those "seatbelts" don't appear to stop the wizard from doing this. This sounds like a bug to me, so I've reported it as bug # 11691.
 

centuriond

Dabbler
Joined
Nov 27, 2012
Messages
12
Perhaps so but when I push "create dataset", it seems misleading to simply call it a folder even though that's what the function ends up doing. I knew destroying the new dataset probably wouldn't destroy the old one since they're different UUIDs or whatever Freenas uses.

It's definitely a bug. Thanks for reporting it.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
This sounds like a bug to me, so I've reported it as bug # 11691.
This bug is marked private, as they do seem to be by default, possibly because people are invited to include a debug file with potentially confidential info in it. If you haven't got anything confidential there, you could untick 'private' so we can follow it.
 
Last edited:
Status
Not open for further replies.
Top