Problem Importing volume UFS

Status
Not open for further replies.

Cédric

Dabbler
Joined
Jun 17, 2014
Messages
18
Hello

I'm french, sorry for my english :p

Following a USB key problem, I reinstalled FreeNAS 9.2.1.9.

I imported all my hdd ufs except one. a seagate 8To.

After several hours on the web I understood that it was necessary to use gpart and fsck but I do not understand the result.

Can you help me to recover my data

Thank you

Code:
[root@freenas ~]# gpart show /dev/ada4																							
=>		 34  15628053101  ada4  GPT  (7.3T)																					  
		   34		   94		- free -  (47k)																				  
		  128	  4194304	 1  freebsd-swap  (2.0G)																			
	  4194432  15623858696	 2  freebsd-ufs  (7.3T)																			  
  15628053128			7		- free -  (3.5k)

[root@freenas ~]# gpart show /dev/ada4p2																							
gpart: No such geom: /dev/ada4p2.
 
Last edited by a moderator:

rs225

Guru
Joined
Jun 28, 2014
Messages
878
There may not be any sub-partition to show, so the error message would be correct.

Your next step would be to run fsck /dev/ada4p2 or to try mounting the partition.
 
Last edited by a moderator:

Cédric

Dabbler
Joined
Jun 17, 2014
Messages
18
Hello

Thank you for answering me.

Here is the result of the order.

Code:
[root@nas ~]# fsck /dev/ada4p2																							   fsck: Could not determine filesystem type


I thank you again for your help.

I have no solution.
 
Last edited by a moderator:

Cédric

Dabbler
Joined
Jun 17, 2014
Messages
18
He

Code:
[root@nas ~]# fsck_ffs /dev/ada4p2											
** /dev/ada4p2																
Cannot find file system superblock											
ioctl (GCINFO): Inappropriate ioctl for device								
fsck_ffs: /dev/ada4p2: can't read disk label



Here is the result.
what I do?

thx
 
Last edited by a moderator:

rs225

Guru
Joined
Jun 28, 2014
Messages
878
Have you made any changes to the partition table on this drive?

Please post the output of 'head -c90000 /dev/ada4p2 | hexdump -C |head -n25'
Before pasting, click the code button.
 

Cédric

Dabbler
Joined
Jun 17, 2014
Messages
18
I wanted to install the latest version of FreeNAS. I did not know it was incompatible with UFS and I erroneously created a zfs partition on the remaining free space.

Code:
[root@nas ~]# head -c90000 /dev/ada4p2 | hexdump -C |head -n25																	
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|													
*																																 
00003fd0  00 00 00 00 00 00 00 00  11 7a 0c b1 7a da 10 02  |.........z..z...|													
00003fe0  3f 2a 6e 7f 80 8f f4 97  fc ce aa 58 16 9f 90 af  |?*n........X....|													
00003ff0  8b b4 6d ff 57 ea d1 cb  ab 5f 46 0d db 92 c6 6e  |..m.W...._F....n|													
00004000  01 01 00 00 00 00 00 00  00 00 00 01 00 00 00 24  |...............$|													
00004010  00 00 00 20 00 00 00 07  76 65 72 73 69 6f 6e 00  |... ....version.|													
00004020  00 00 00 08 00 00 00 01  00 00 00 00 00 00 13 88  |................|													
00004030  00 00 00 24 00 00 00 20  00 00 00 04 6e 61 6d 65  |...$... ....name|													
00004040  00 00 00 09 00 00 00 01  00 00 00 05 48 44 38 54  |............HD8T|													
00004050  6f 00 00 00 00 00 00 24  00 00 00 20 00 00 00 05  |o......$... ....|													
00004060  73 74 61 74 65 00 00 00  00 00 00 08 00 00 00 01  |state...........|													
00004070  00 00 00 00 00 00 00 00  00 00 00 20 00 00 00 20  |........... ... |													
00004080  00 00 00 03 74 78 67 00  00 00 00 08 00 00 00 01  |....txg.........|													
00004090  00 00 00 00 00 00 02 bc  00 00 00 28 00 00 00 28  |...........(...(|													
000040a0  00 00 00 09 70 6f 6f 6c  5f 67 75 69 64 00 00 00  |....pool_guid...|													
000040b0  00 00 00 08 00 00 00 01  f2 49 b7 67 9e c2 8a 74  |.........I.g...t|													
000040c0  00 00 00 24 00 00 00 20  00 00 00 06 68 6f 73 74  |...$... ....host|													
000040d0  69 64 00 00 00 00 00 08  00 00 00 01 00 00 00 00  |id..............|													
000040e0  a4 2e d5 67 00 00 00 2c  00 00 00 30 00 00 00 08  |...g...,...0....|													
000040f0  68 6f 73 74 6e 61 6d 65  00 00 00 09 00 00 00 01  |hostname........|													
00004100  00 00 00 09 6e 61 73 2e  6c 6f 63 61 6c 00 00 00  |....nas.local...|													
00004110  00 00 00 24 00 00 00 28  00 00 00 08 74 6f 70 5f  |...$...(....top_|													
00004120  67 75 69 64 00 00 00 08  00 00 00 01 a5 c6 22 8e  |guid..........".|													
00004130  fe ad 7b a6 00 00 00 20  00 00 00 20 00 00 00 04  |..{.... ... ....|  
 
Last edited by a moderator:

rs225

Guru
Joined
Jun 28, 2014
Messages
878
well, then the partition table will have to be rebuilt, and hope that enough of the UFS has survived to recover data. If not, there is a program for Windows called UFS Explorer that does a great job recovering data from damaged UFS filesystems. I'll post more later.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
I wanted to install the latest version of FreeNAS. I did not know it was incompatible with UFS
If you want to save any of the data on that disk, please stop writing to it. Use your backups. Don't have a backup? Then copy the whole disk to another drive with dd and work with the copy.

I erroneously created a zfs partition on the remaining free space
What, exactly, do you mean by "the remaining free space"? The partition table shows it occupying the whole drive.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
If you have a backup, use the backup.

If you can make a copy of the whole disk, make a copy of the whole disk, because the next steps have a good chance to make things worse. If you can't make an image of the whole disk, then proceed to try UFS Explorer on Windows, but you will still need somewhere to copy data.

OK, unfortunately, it does appear that ZFS does a lot of damage to UFS. You can try these commands, but they might make the situation worse, which is why you should either make a copy of the whole disk, or just use UFS Explorer.

OK, I don't recommend even trying the next steps, because they probably won't work, and will make things worse.

newfs -N /dev/ada4p2 | head

This command will show you some numbers for super-block backups. For example, 192, 393472, 786752, 1180032.

Next you try fsck_ffs -b 192 /dev/ada4p2 until one of the numbers works.
Answer yes to most questions, but not to a question to remove. This could go on forever, which is why UFS Explorer is a good idea.

When done, run fsck_ffs /dev/ada4p2 again. When done, try mounting the drive. In my tests, a lot was damaged.
 

Cédric

Dabbler
Joined
Jun 17, 2014
Messages
18
Hello
The zfs import has to crush my ufs partition. I used UFS Explorer, it took 3 days, but I recovered everything.

Thanks rs225 for your help and you too wblock.
 
Status
Not open for further replies.
Top