Share overwritten by Dataset

Status
Not open for further replies.

CTbot

Cadet
Joined
Oct 28, 2015
Messages
9
I had a SMB share with about 100 GB of data for a small business. A dataset was created with same name as the share and overwrote all of the data. Is there any way this can be reversed? I am running 11.2
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,995
Post the output of zfs list. Place in code brackets. Also tell us the name of the dataset in question.
 

CTbot

Cadet
Joined
Oct 28, 2015
Messages
9
Post the output of zfs list. Place in code brackets. Also tell us the name of the dataset in question.
Code:
[root@freenas:~ # zfs list
NAME																  USED  AVAI							 L  REFER  MOUNTPOINT
HomeNAS															  9.81T  4.22							 T  60.9G  /mnt/HomeNAS
HomeNAS/.system													  98.2M  4.22							 T   920K  legacy
HomeNAS/.system-b266e48b											 1.58G  4.22							 T  1.58G  /mnt/HomeNAS/.system-b266e48b
HomeNAS/.system/configs-5ece5c906a8f4df886779fae5cade8a5			 90.2M  4.22							 T  90.2M  legacy
HomeNAS/.system/cores												1.95M  4.22							 T  1.95M  legacy
HomeNAS/.system/rrd-5ece5c906a8f4df886779fae5cade8a5				  153K  4.22							 T   153K  legacy
HomeNAS/.system/samba4											   1.84M  4.22							 T  1.84M  legacy
HomeNAS/.system/syslog-5ece5c906a8f4df886779fae5cade8a5			  3.00M  4.22							 T  3.00M  legacy
HomeNAS/.system/webui												 141K  4.22							 T   141K  legacy
HomeNAS/.vm_cache													45.6M  4.22							 T   141K  /mnt/HomeNAS/.vm_cache
HomeNAS/.vm_cache/boot2docker										45.4M  4.22							 T   141K  /mnt/HomeNAS/.vm_cache/boot2docker
HomeNAS/.vm_cache/boot2docker/initrd								 41.7M  4.22							 T  41.7M  /mnt/HomeNAS/.vm_cache/boot2docker/initrd
HomeNAS/.vm_cache/boot2docker/vmlinuz64							  3.63M  4.22							 T  3.63M  /mnt/HomeNAS/.vm_cache/boot2docker/vmlinuz64
HomeNAS/APPZ														  730G  4.22							 T   730G  /mnt/HomeNAS/APPZ
HomeNAS/Business Model												204K  4.22							 T   204K  /mnt/HomeNAS/Business Model
HomeNAS/Crafts														195G  4.22							 T   195G  /mnt/HomeNAS/Crafts
HomeNAS/Kids														  466G  4.22							 T   466G  /mnt/HomeNAS/Kids
HomeNAS/Movie														7.97T  4.22							 T  7.97T  /mnt/HomeNAS/Movie
HomeNAS/StudioBott													959K  4.22							 T   959K  /mnt/HomeNAS/StudioBott
HomeNAS/Wifey														 413G  4.22							 T   413G  /mnt/HomeNAS/Wifey
HomeNAS/iocage													   2.30G  4.22							 T  3.48M  /mnt/iocage
HomeNAS/iocage/download											   260M  4.22							 T   141K  /mnt/iocage/download
HomeNAS/iocage/download/11.1-RELEASE								  260M  4.22							 T   260M  /mnt/iocage/download/11.1-RELEASE
HomeNAS/iocage/images												 141K  4.22							 T   141K  /mnt/iocage/images
HomeNAS/iocage/jails												  847M  4.22							 T   141K  /mnt/iocage/jails
HomeNAS/iocage/jails/plex											 847M  4.22							 T   262K  /mnt/iocage/jails/plex
HomeNAS/iocage/jails/plex/root										846M  4.22							 T  1.69G  /mnt/iocage/jails/plex/root
HomeNAS/iocage/log													147K  4.22							 T   147K  /mnt/iocage/log
HomeNAS/iocage/releases											  1.21G  4.22							 T   141K  /mnt/iocage/releases
HomeNAS/iocage/releases/11.1-RELEASE								 1.21G  4.22							 T   141K  /mnt/iocage/releases/11.1-RELEASE
HomeNAS/iocage/releases/11.1-RELEASE/root							1.21G  4.22							 T  1.21G  /mnt/iocage/releases/11.1-RELEASE/root
HomeNAS/iocage/templates											  141K  4.22							 T   141K  /mnt/iocage/templates
HomeNAS/jails														2.71G  4.22							 T   192K  /mnt/HomeNAS/jails
HomeNAS/jails/.warden-template-pluginjail-9.3-x64					 526M  4.22							 T   526M  /mnt/HomeNAS/jails/.warden-template-pluginjail-9.3-x64
HomeNAS/jails/.warden-template-standard-9.3-x64					  2.20G  4.22							 T  2.20G  /mnt/HomeNAS/jails/.warden-template-standard-9.3-x64
HomeNAS/jails_2													  7.84G  4.22							 T   211K  /mnt/HomeNAS/jails_2
HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64				  625M  4.22							 T   625M  /mnt/HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64
HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-20180217212723   625M  4.22							 T   625M  /mnt/HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-201802172127							 23
HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-20180301203030   625M  4.22							 T   625M  /mnt/HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-201803012030							 30
HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-20180322204021   625M  4.22							 T   625M  /mnt/HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-201803222040							 21
HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-20180328202314   625M  4.22							 T   625M  /mnt/HomeNAS/jails_2/.warden-template-pluginjail-11.0-x64-201803282023							 14
HomeNAS/jails_2/plexmediaserver_1									4.79G  4.22							 T  5.39G  /mnt/HomeNAS/jails_2/plexmediaserver_1
HomeNAS/vm															141K  4.22							 T   141K  /mnt/HomeNAS/vm
freenas-boot														 3.31G  10.6							 G	64K  none
freenas-boot/ROOT													3.29G  10.6							 G	29K  none
freenas-boot/ROOT/11.1-U5											7.39M  10.6							 G   846M  /
freenas-boot/ROOT/11.2-BETA1										 7.61M  10.6							 G   885M  /
freenas-boot/ROOT/11.2-BETA2										 3.27G  10.6							 G   877M  /
freenas-boot/ROOT/Initial-Install									   1K  10.6							 G   735M  legacy
freenas-boot/ROOT/default											6.85M  10.6							 G   741M  legacy
freenas-boot/grub													6.84M  10.6							 G  6.84M  legacy]

The dataset is HomeNAS/Business Model
 
Last edited by a moderator:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,995
Thankfully I can edit your posting and added the code brackets to make the posting human readable.

So, you had an SMB share called "Business Model", where was it mapped to? That is where your data should be. SMB does not create a dataset. FreeNAS should not be able to create a duplicate dataset and since you were using SMB, you are not in a situation like this. I wanted to see your datasets to ensure you didn't have two datasets with the same name but using a different mix of uppercase/lowercase or spaces, etc...
 

CTbot

Cadet
Joined
Oct 28, 2015
Messages
9
Thankfully I can edit your posting and added the code brackets to make the posting human readable.

So, you had an SMB share called "Business Model", where was it mapped to? That is where your data should be. SMB does not create a dataset. FreeNAS should not be able to create a duplicate dataset and since you were using SMB, you are not in a situation like this. I wanted to see your datasets to ensure you didn't have two datasets with the same name but using a different mix of uppercase/lowercase or spaces, etc...

It was mapped to HomeNAS/Business Model. The dataset was created after by another admin. They did not check for the preexisting SMB. So the new dataset appears to have overwritten the SMB share.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,995
That should not be possible, or should I say that the previous dataset would have had to been destroyed before a new dataset of the same name could be created. I don't see a way to recover your data. This is one of the reasons we heavily promote making routing backups of your data. Mainly we push this due to hardware failure not human error. If this data is very important you could ship your hard drives to a data recovery company but realize it is not cheap. Sorry to give you the bad news.

Last note, if you search hard you will find one person here who was able to recover all thier data, the situation was differnent but you could try to find it and see what they did.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
If the new data set is empty, delete it and see if the files are still there. My guess is that FreeNAS simply mounted the dataset to the existing folder. Worst case scenario, roll back to a snapshot or restore from backup... you have all that setup.. right?
Mainly we push this due to hardware failure not human error.
Don't lie. ;)
 

CTbot

Cadet
Joined
Oct 28, 2015
Messages
9
If the new data set is empty, delete it and see if the files are still there. My guess is that FreeNAS simply mounted the dataset to the existing folder. Worst case scenario, roll back to a snapshot or restore from backup... you have all that setup.. right?

Don't lie. ;)

Unable to delete the dataset, gives me a busy error. I am rebooting to try it again. Also this is a new NAS, so no snapshot setup yet. Yes I know lesson learned if what you said does not work.
 

CTbot

Cadet
Joined
Oct 28, 2015
Messages
9
Unable to delete the dataset, gives me a busy error. I am rebooting to try it again. Also this is a new NAS, so no snapshot setup yet. Yes I know lesson learned if what you said does not work.

THAT WORKED! Data is back. Now to setup a dataset the correct way with a snapshot. Thank you all!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,995
THAT WORKED! Data is back. Now to setup a dataset the correct way with a snapshot. Thank you all!
Okay, time for me to learn something new. Why are the files back if the dataset was deleted? The SMB share would point to no where. Teach me why this worked.

I'm glad you got your data back. I'd like to see how your SMB was mapped. I'm confused. I can only think that the SMB and Dataset just have the same name but the SMB is actually pointing to another location. Help me understand @kdragon75
 

CTbot

Cadet
Joined
Oct 28, 2015
Messages
9
Okay, time for me to learn something new. Why are the files back if the dataset was deleted? The SMB share would point to no where. Teach me why this worked.

I'm glad you got your data back. I'd like to see how your SMB was mapped. I'm confused. I can only think that the SMB and Dataset just have the same name but the SMB is actually pointing to another location. Help me understand @kdragon75

The SMB was created first before the dataset. I was able to do this in the GUI of 11.2. So for some reason the dataset did not overwrite the previous mount point, but just hid it. Once I deleted the dataset, the SMB mount still appeared with data intact.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
So he had a folder not a dataset that he created in "/mnt/pool/". When the new dataset was created, the system just mounted to that path. The new volume (dataset) was empty so that's what we saw. If you looked at the pool consumption you would still see that data is there but that path is just pointing to an empty volume. dis-mout (or delete) the volume and the old files reappear. People tend to forget that datasets are essentially just mounted filesystems.
 
Status
Not open for further replies.
Top