Is possible recovering a deleted file, after clearing the snapshots?

Status
Not open for further replies.

Javierus

Dabbler
Joined
Feb 16, 2014
Messages
13
I have a FreeNAS 9.2.1 box that works perfectly with 6 3TB HDDs in RaidZ2. No problems with the box: hardware side runs smooth.

All the stuff on it was moved to another server 4 months ago, and today I intended to use it as a backup storage for the other server.
However, I forgot one VM was still using the FreeNAS as iSCSI server.
So, I deleted 4 datasets full of nothing useful, and 4 of the extents on the dataset that was holding the Extents for the iSCSI service. Left 2 of them, just in case.
Then I wiped all the snapshots, to recover the space.
To make it worse, made a new dataset, called "BACKUP", and started copying there the 2 extents I had left on the old dataset.

And, ofcourse, then found I had dumped one critical file, one used as Extent for iSCSI, wich was used as safe storage for another computer.

No, there are no backups, because this was supposedly just a backup.

Using zdb history -il shows me the txg prior to the deletion of datasets and snapshots, but trying to mount it with
Code:
zpool import -T 123456 -fFX -o readonly=on -R /mnt TANK

fails:
Code:
cannot import 'TANK': one or more devices is currently unavailable


if I try -nfFX, says nothing, but -fFX fails.

At this point I guess it's game over, but just wanted to ask, in case there is something I could try
One additional thing: one of the six disks is down; as it's a Z2, all is working fine anyway.

Any help or desperate idea??
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You generally can't mount from arbitrary txgs. You'll need to look at the superblock to see what is/isn't available. ;)

BUT, if your datasets/zvols had multiple TB of data, you'll almost certainly be unable to rollback.
 

Javierus

Dabbler
Joined
Feb 16, 2014
Messages
13
cyberjock, thanks for your help.
The zpool had 10TB, and the lost file had 2TB.

This was part of the output of zdb history -li DATOS (where DATOS is my zpool name).
The snapshots prior to 8:31 have what I need. I've tried some of these txgs... Might you point me to any place I could learn about the superblocks, other than google "zfs superblock"?

Theanks in advance :)

Code:
2016-04-12.08:30:54 zfs destroy DATOS/iSCSI@auto-20160411.2000-6d
2016-04-12.08:30:54 [txg:13478368] destroy DATOS/iSCSI@auto-20160412.0100-1m (102842)
2016-04-12.08:30:57 ioctl destroy_snaps
    input:
        snaps:
            DATOS/iSCSI@auto-20160412.0100-1m

2016-04-12.08:30:57 zfs destroy DATOS/iSCSI@auto-20160412.0100-1m
2016-04-12.08:30:57 [txg:13478370] destroy DATOS/iSCSI@auto-20160412.0800-6d (102864)
2016-04-12.08:31:05 ioctl destroy_snaps
    input:
        snaps:
            DATOS/iSCSI@auto-20160412.0800-6d

2016-04-12.08:31:05 zfs destroy DATOS/iSCSI@auto-20160412.0800-6d
2016-04-12.08:31:05 [txg:13478372] snapshot DATOS/iSCSI@auto-20160412.0831-6d (102886)
2016-04-12.08:31:13 ioctl snapshot
    input:
        snaps:
            DATOS/iSCSI@auto-20160412.0831-6d
        props:

2016-04-12.08:31:13 zfs snapshot -r DATOS/iSCSI@auto-20160412.0831-6d
2016-04-12.08:37:35 [txg:13478434] destroy DATOS/iSCSI@auto-20160412.0831-6d (102886)
2016-04-12.08:37:43 ioctl destroy_snaps
    input:
        snaps:
            DATOS/iSCSI@auto-20160412.0831-6d
 
Status
Not open for further replies.
Top