Help finding the disks that made a zpool

Status
Not open for further replies.

Javierus

Dabbler
Joined
Feb 16, 2014
Messages
13
Hi, I'm in trouble...

I have a working 6-HD Z2 zpool (freenas 9.3), but now the disks are on my table, scrambled with 4 disks from other, broken zpools, and the USB was formatted.

Is possible finding wich of these hard disks are the ones that make my zpool?

Any help will be highly appreciated........
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Install FreeNAS on a clean USB stick and install 6 of the drives into your machine (assuming you only have 6 SATA ports available--if you have more, install as many disks as you have ports). Boot from the USB, go into the shell, and run 'zpool import'. Since you're guaranteed to have at least two of the pool disks installed (you're installing at least six, and there are only four that aren't part of the pool you're looking for), it should find the desired pool, and it will list the gptids of the disks that are currently connected and are part of the pool. From that information, you can use @Bidule0hm's scripts to figure out the serial numbers, and from that information, you can determine which of the physical disks are part of the pool. Power down the system, remove the disks that aren't part of the desired pool, mark them (even if just with a post-it), replace them with other disks, and repeat. You should be able to determine all of the correct disks with just a couple of iterations.
 

Javierus

Dabbler
Joined
Feb 16, 2014
Messages
13
Didn't worked... Identified the disks, imported them successfully (-f needed), but pool does not showed in GUI.
So exported it, and imported from GUI... wich makes freenas reboot the computer.

Any ideas? would be very appreciated!

This was a zpool status after importing from shell, prior to exporting and importing from GUI->reboot.
[root@freenas] ~# zpool status Totalis
pool: Totalis
state: ONLINE
status: One or more devices are configured to use a non-native block size.
Expect reduced performance.
action: Replace affected devices with devices that support the
configured block size, or migrate data to a properly configured
pool.
scan: scrub repaired 0 in 16h2m with 0 errors on Sun Jun 21 16:02:44 2015
config:

NAME STATE READ WRITE CKSUM
Totalis ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
gptid/d1957852-9730-11e3-8a51-902b343716e4 ONLINE 0 0 0 block size: 512B configured, 4096B native
gptid/de5f4a20-4bb5-11e4-96d0-902b343716e4 ONLINE 0 0 0 block size: 512B configured, 4096B native
gptid/ed52479a-ea80-11e3-96e1-902b343716e4 ONLINE 0 0 0 block size: 512B configured, 4096B native
gptid/3c0d03c7-37eb-11e4-ba03-902b343716e4 ONLINE 0 0 0 block size: 512B configured, 4096B native
gptid/74cc3990-5302-11e3-b6c9-902b343716e4 ONLINE 0 0 0 block size: 512B configured, 4096B native
gptid/9097b150-1cdb-11e4-886f-902b343716e4 ONLINE 0 0 0 block size: 512B configured, 4096B native

errors: No known data errors
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Freenas should not reboot when importing a pool. How much memory do you have and what other hardware are you using
 

Javierus

Dabbler
Joined
Feb 16, 2014
Messages
13
Thanks all, I'm recovering the data.
Import from the GUI didn't worked, but could import from CLI as readonly. Once imported, I could access the data from CLI, so using WinSCP started backing up. As it was too slow, I removed one of the 6 disks on the pool, inserted a new disk, and on reboot imported again the pool as readonly. Formatted the new disk as UFS, mounted it, and copied data there using CLI. Repeated this a couple times and I have all the data on UFS disks.

Next step is making a new Freenas install, new zpool, and recover the data from the UFS disks.

NOTE: The hardware is consumer-grade, Intel i7, 32GB DRR3 non-ECC, with 6xWD Red NAS SATA hd's. The network card is a Realtek integrated on motherboard. I know it's not the best hardware, but it's a home server, and that's the hardware I have available for it, It has worked for around 4 years without problems, other than changing HDs as soon as they showed any problem.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Do you have dedup turned on? Your hardware is but great but meets minimum requirements. The reboots are from some hardware problem, you should figure out why before trusting your data with that machine.
 

Javierus

Dabbler
Joined
Feb 16, 2014
Messages
13
Do you have dedup turned on?
No dedup, no compression, no encription.

The reboots are from some hardware problem, you should figure out why before trusting your data with that machine.
I don't think it's hardware-related; I believe it's software based; from other symptons, I'm guessing something is wrong on the zfs structures on that pool, with snapshot corruption.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Didn't worked... Identified the disks, imported them successfully (-f needed), but pool does not showed in GUI.
You should not need the -f option, which makes me wonder if you found all the correct drives.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
-f and -F are completely different options. zpool import -f imports a pool that was last used on a different machine, and wasn't exported. zpool import -F attempts to import a borked pool by rolling back transactions. The -F flag wouldn't help if too many disks were missing.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Seeing as he had other broken ZFS drives in the mix, wouldn't you want to only import the drives that don't require -f (or -F)? Although maybe if the the pools were different names, you could tell that you were importing the right pool.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Again, if the desired pool had most recently been used on a different system, and had not been properly exported, it's entirely possible that the -f flag would be needed to import the pool.
 
Status
Not open for further replies.
Top