Need help very urgent!!! my data lost by mistake

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
I 'm using FreeNAS-9.10-RELEASE with Raid5 and share folder with windows client.
By mistake during I install jail, I choose target to my data folder.
After installation finished, I found jail folder replace my data.
And my all data disappear.
Anyone can give me suggestion how to get my data back.
My boss will kill me. Please help.
 

Attachments

  • Capture.JPG
    Capture.JPG
    55.3 KB · Views: 281

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,829
If you're serious about your boss, please seek a safe place now. If not, please don't use that kind of language.

I'd turn off the jail to prevent further writes to the pool in question. Unfortunately, I don't know what the jail program will do as part of the installation process. Have you tried sysutils/ddrescue?

I hope you had a good set of backups. Your experience underscores why I always run two separate backups every time I do any major work on my FreeNAS. Good luck!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Were you running periodic snapshots? In that case, your data may still be there in the last snapshot before you did the install.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
There's also the chance that the jail dataset is just mounted on top of your data.
Does 'zpool list' or 'zfs list -o space' show reasonable sizes that indicate your data is still there?
 

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
Were you running periodic snapshots? In that case, your data may still be there in the last snapshot before you did the install.
This is my snapshot but I never run it before.
 

Attachments

  • Capture.JPG
    Capture.JPG
    33.1 KB · Views: 288

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
There's also the chance that the jail dataset is just mounted on top of your data.
Does 'zpool list' or 'zfs list -o space' show reasonable sizes that indicate your data is still there?
It's look like my data still there but I do not know how to get it back.
Do you have any idea? Please advise.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
according to the screenshot there is 4 TiB of data on the pool, so there are snapshots of the data or two datasets sharing the same mountpoint
 

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
There's also the chance that the jail dataset is just mounted on top of your data.
Does 'zpool list' or 'zfs list -o space' show reasonable sizes that indicate your data is still there?
 

Attachments

  • Capture.JPG
    Capture.JPG
    25.8 KB · Views: 298

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
according to the screenshot there is 4 TiB of data on the pool, so there are snapshots of the data or two datasets sharing the same mountpoint
Can you give me instruction? I will follow you to get the data back.
Thank you in advance.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
you can first use zfs set snapdir=visible hdd1/AfterQCOK

You would then see a directory .zfs there and it will contain another called snapshot... under that, you should see the files as they were before.

When you're done, you can use zfs set snapdir=hidden hdd1/AfterQCOK
 

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
you can first use zfs set snapdir=visible hdd1/AfterQCOK

You would then see a directory .zfs there and it will contain another called snapshot... under that, you should see the files as they were before.

When you're done, you can use zfs set snapdir=hidden hdd1/AfterQCOK
Please find picture.
I have not much knowledge in FreeNAS. Any suggestion.
 

Attachments

  • Capture.JPG
    Capture.JPG
    57.6 KB · Views: 286

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
It's completely possible that your snapshot isn't of the dataset that contains your lost data..., but I also see that we shoudl have been one level deeper:

zfs set snapdir=visible hdd1/AfterQCOK/.warden-template-standard

I suggest you go down the road suggested by @fracai

You still haven't shown us a zfs list output.

Also it would be useful to see if you have a look under /mnt/hdd1 to see if you have an empty recycle directory.

Where were the files originally?
 

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
It's completely possible that your snapshot isn't of the dataset that contains your lost data..., but I also see that we shoudl have been one level deeper:

zfs set snapdir=visible hdd1/AfterQCOK/.warden-template-standard

I suggest you go down the road suggested by @fracai

You still haven't shown us a zfs list output.

Also it would be useful to see if you have a look under /mnt/hdd1 to see if you have an empty recycle directory.

Where were the files originally?
My recycle folder is an empty. zfs list as attached pictures.
 

Attachments

  • Capture1.JPG
    Capture1.JPG
    61.7 KB · Views: 275
  • Capture2.JPG
    Capture2.JPG
    84.2 KB · Views: 274

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You have a directory there called clean, which would be the snapshot you showed, so look around in there a bit.

It's still not clear to me where the data was originally, so it's hard to help you to find it, but there's a very clear sign that you have a directory named the same as a dataset somewhere at the root of hdd1, since there's 2.85TB of used space there and including child datasets, the total used is more-or-less the same.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Most likely you have a folder /mnt/hdd1/AfterQCOK/ that contains most of your data (4 TiB) and now you have a dataset mounted on that folder. You need to unmount that dataset and select another location for your jails. To unmount a dataset you do zfs umount hdd1/AfterQCOK. Then I would rename the folder and remount the dataset. Move the jail dataset to a better location and then clean up shares and what ever is used on this system. Also, set up a decent backup.. there are many many ways of loosing data..
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Most likely you have a folder /mnt/hdd1/AfterQCOK/ that contains most of your data (4 TiB) and now you have a dataset mounted on that folder.
You got it right.

I had an offline conversation with the OP and it was exactly that.

The jail root had been set to that directory and with the first jail install had been mounted over the top of a directory at the /mnt/hdd1 level, hiding the contents.

With the jail removed and the mount forced offline with zfs umount -f hdd1/AfterQCOK the original showed up again.
 

keyshort

Cadet
Joined
Apr 8, 2019
Messages
9
You got it right.

I had an offline conversation with the OP and it was exactly that.

The jail root had been set to that directory and with the first jail install had been mounted over the top of a directory at the /mnt/hdd1 level, hiding the contents.

With the jail removed and the mount forced offline with zfs umount -f hdd1/AfterQCOK the original showed up again.
He is correct and problem was solved.
Thank you and very appreciate about your help, Sretalla.
 

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,829
OK, good. Now get your backups set up.How you want to implement them is up to you. I'd suggest multiple encrypted disks that you can cycle off-site as often as you need. If it's a busy environment, perhaps nightly. My rotations are a lot slower than that, but this is just a home environment.

Remember: FreeNAS can only do so much to protect your data! Even after you set up backups, make sure they actually work as intended.
 
Top