Accidentally deleted folders

Status
Not open for further replies.

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
I have deleted some folders and when I tried to roll back a recent snapshot I realized that I had not re-activated the snapshots after I had a problem with it a while back. So I realize the stuff is most probably done. But I still wanted to try the trick whereby you detach the volume and then re-import it with the - as cyberjock had suggested here. But when I tried that, I got an error message: cannot import '-nfFX': name must begin with a letter.
Here is the info I receive when I do 'zpool import'. Can somebody please tell me what the right CLI command would be? Thanks

[root@freenas ~]# zpool import
pool: StephanNAS
id: 9220674615556878615
state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
config:

StephanNAS ONLINE
mirror-0 ONLINE
gptid/d65eb91c-5201-11e2-87a9-3085a943b0e3 ONLINE
gptid/d6bde0bf-5201-11e2-87a9-3085a943b0e3 ONLINE
mirror-1 ONLINE
gptid/ebe6f24f-59ae-11e3-a143-3085a943b0e3 ONLINE
gptid/98526e0f-526e-11e2-bbec-3085a943b0e3 ONLINE
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
There you go. For starters, those comands are pointless for your situation. They *may* even cause problems, so be glad it didn't work. I can't remember the exact commands, but you should unmount you pool now.

Then, google how to rollback transactions. There's a way to determine some transactions from, say, last week, that you could mount temporarily to get the data. I'd provide the commands but I'm a bit strapped for time right now. Google should give you the answers. Make sure any parameters you use from Google actually are compatible with FreeBSD. Many solaris guides don't work quite the same on FreeBSD.

But definitely keep the pool unmounted until you've done the rollback or you've given up.
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
I looked at this one: http://freebsd.1045724.n5.nabble.co...ver-a-destroyed-ZFS-filesystem-td5827982.html
zpool import -N -o readonly=on -f -R /pool StephanNAS (name of my pool) works. That mounts the pool as read-only, which sounds safe.
When i then do a zpool status I see this
Code:
 
[Stephan@freenas] /% zpool status
  pool: StephanNAS
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0 in 12h28m with 0 errors on Sun Jan 12 12:28:09 2014
config:
 
        NAME                                            STATE     READ WRITE CKSUM
        StephanNAS                                      ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/d65eb91c-5201-11e2-87a9-3085a943b0e3  ONLINE       0     0     0
            gptid/d6bde0bf-5201-11e2-87a9-3085a943b0e3  ONLINE       0     0     0
          mirror-1                                      ONLINE       0     0     0
            gptid/ebe6f24f-59ae-11e3-a143-3085a943b0e3  ONLINE       0     0     0
            gptid/98526e0f-526e-11e2-bbec-3085a943b0e3  ONLINE       0     0     0
 
errors: No known data errors
 


The next step he says I should take is zdb -ul <vdev>. But where do I find the name of my vdev? I have 4 physical disks set up in 2 mirrored vdevs. From what I see here I thought their names were mirror-0 and mirror-1. But when I try that I get the following.
Code:
[Stephan@freenas] /% zdb -ul mirror-0
cannot open 'mirror-0': No such file or directory
[Stephan@freenas] /% zdb -ul mirror-1
cannot open 'mirror-1': No such file or directory


Any ideas?

Thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Sorry, when it comes to zpool recovery, I don't do that on forums/IRC. Nobody else really does either.

Many steps are undoable if you don't know what you are doing, so I keep that kind of thing to my consultation services. I just don't want to feel guilty or be held responsible if things go wrong. Not to mention the countless hours that can be spent trying to recover a pool.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You do "start a new conversation" and type in my name. I sent you a PM though.
 
Status
Not open for further replies.
Top