possible to add removed drive back to pool?

Status
Not open for further replies.

jaaassh

Dabbler
Joined
Apr 23, 2015
Messages
49
Old, non ECC build here (yea, i know, moving on...). I had a 3x 3TB pool, and a drive started showing SMART alerts. So I followed the steps to replace the drive.

First, I went into the UI and clicked 'offline', and grabbed the serial number.
Then, I powered down, removed the correct drive and added a new one in its place. Then powered back on.
Next thing I know, the system won't boot, and is hanging on importing this volume, which is before sshd comes up, so its fairly difficult to investigate things.

By booting into a fresh install I managed to import the volume in readonly mode (zpool import -o readonly=on) and verify backups etc. However, there appears to be some corrupt files I can't get to anymore. They weren't corrupt before offlining that drive.

As far as I can tell, the original 'bad' drive hasn't been touched (it's been out of the system). Also, the two other drives that I've successfully mounted readonly, shouldn't be changed much(?) either, right? So... is it possible to add the Offline'd drive back to the pool in a way that it's like it was before offlining it in the hopes that maybe, just maybe, I can restore some of these corrupted files? Or, do all 'add' operations destroy everything on the new disk?

Really got nothing to lose here... and yea. ECC. got it. new build is in progress.

Cheers! Thanks! :)
 

jaaassh

Dabbler
Joined
Apr 23, 2015
Messages
49
As an aside, since noticing the failed import, I removed the new drive from the system and have been booting to a readonly state with just the original 2 of 3 good drives. So it's not that drive mucking things up.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
You should be able to reconnect the old drive, and then on-line it. When was the last scrub? If you get all drives online, then a scrub might stabilize your pool so you can do a replace of whatever drive is actually in worst shape.
 

jaaassh

Dabbler
Joined
Apr 23, 2015
Messages
49
You should be able to reconnect the old drive, and then on-line it. When was the last scrub? If you get all drives online, then a scrub might stabilize your pool so you can do a replace of whatever drive is actually in worst shape.

How do I add it back in a non-destructive manner?
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
Ah, I see your problem.

It sounds like you will have to do this from the command line, and hope the pool will import from the command-line without using readonly mode. If that works, you should be able to online the old drive, and then start a scrub.

You may need a fresh install on another USB stick that is not going to try to import the pool at startup.
 

jaaassh

Dabbler
Joined
Apr 23, 2015
Messages
49
@rs225 Yes, I can get it booted, but no, it refuses to import without readonly=on. While it is imported (readonly) the command 'zpool import raidZ ada4' fails with a message like: 'ada4 does not exist in the pool'
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
It would be something like zpool online poolName ada4p2

Not sure if that works in readonly mode though.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I think you can just put the drive back in and reboot. It will be added back to the pool. You can also online the drive in the gui.
 
Status
Not open for further replies.
Top