Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [130]EOFL@freenas:~$ gpart show da0
- => 40 7814037088 da0 GPT (3.6T)
- 40 88 - free - (44K)
- 128 7814036992 1 freebsd-zfs (3.6T)
- 7814037120 8 - free - (4.0K)
- EOFL@freenas:~$ sudo dd if=/dev/da0 of=~/da0lastsectors.bin skip=7814036000
- Password:
- 1168+0 records in
- 1168+0 records out
- 598016 bytes transferred in 15.721707 secs (38038 bytes/sec)
- #This is the actual good pool (on partition 1)
- EOFL@freenas:~$ sudo zdb -l /dev/da0p1
- ------------------------------------
- LABEL 0
- ------------------------------------
- version: 5000
- name: 'RaidZ-4TBx3'
- state: 0
- txg: 13958374
- pool_guid: 3025141855217507971 <-------------
- #Convert to hex
- 3025141855217507971 == 29fb767d4b67de83
- #run xxd (linux) or hd (BSD) = (hexdump)
- EOFL@freenas:~$ xxd da0lastsectors.bin
- 000010a0: 0000 0028 0000 0009 706f 6f6c 5f67 7569 ...(....pool_gui
- 000010b0: 6400 0000 0000 0008 0000 0001 29fb 767d d...........).v} <--- 29fb 767d
- 000010c0: 4b67 de83 0000 0024 0000 0020 0000 0006 Kg.....$... .... <--- 4b67 de83
- #GUID = last 2 bytes of line2, first 2 of line 3.
- #This is the broken remnant pool (with the same name) (on wholedisk/mbr?)
- EOFL@freenas:~$ sudo zdb -l /dev/da0
- ------------------------------------
- LABEL 0
- ------------------------------------
- failed to unpack label 0
- ------------------------------------
- LABEL 1
- ------------------------------------
- failed to unpack label 1
- ------------------------------------
- LABEL 2
- ------------------------------------
- version: 5000
- name: 'RaidZ-4TBx3'
- state: 2
- txg: 162
- pool_guid: 1085295563579971048 <-------------
- #Convert to hex
- 1085295563579971048 == F0FBE909F7DD5E8 == 0f0f be90 9f7d d5e8 (leading zero)
- # FOUND! at the very beginning of the sector dump. (grep for "0f0f be90" or other pairs, may be newline/split)
- # manually translate hex to sector numbers/offsets.
- # manually erased with targeted dd ~4 sectors. (real pool has to be exported first because ZFS locks the dev)
Add Comment
Please, Sign In to add comment