Replace disk from GUI vs. replace using command line

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
I recently replaced a drive with some bad sectors (although zpool status was happy with everything) using the command line because the GUI appeared to be messed up (but I found out later it was a problem with the chrome browser):

zpool replace MyPool diskX diskY

and zpool status continued to show everything was OK and diskX (and perhaps also diskY?? -- I don't recall clearly now) ONLINE the whole time.

I am now replacing another drive from the GUI following the instructions, which tell me to first OFFLINE the drive to be replaced, then REPLACE it by the new drive -- and now zpool status shows diskX as OFFLINE (obviously) and the pool as DEGRADED. It's a RAIDZ2 pool so it can still survive another drive failure, but was the pool not "safer" using the command line to replace a drive?

Should I have used the REPLACE option without first offlining the drive to be replaced? Are the instructions correct?

Edit (addition):

And what if I were trying to expand a pool by replacing each drive in turn by a larger one? Would I really want to leave it in a DEGRADED state at each stage of the upgrade?

Are the instructions assuming that the drive being replaced has actually failed already, and not appropriate in cases where a drive is being replaced for other reasons?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The instructions here certainly say it's OK to do it (even suggests that it's better) not to offline a disk if the purpose of replacing the disk is to grow the pool:

I guess you can interpret that a drive starting to throw errors is a risk to the stable operation of the resilver if it starts with a disk that won't be there through the whole process (although it should not risk the integrity of the data, nor the quality of the final result, so do what you like).
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
The instructions here certainly say it's OK to do it (even suggests that it's better) not to offline a disk if the purpose of replacing the disk is to grow the pool:

I guess you can interpret that a drive starting to throw errors is a risk to the stable operation of the resilver if it starts with a disk that won't be there through the whole process (although it should not risk the integrity of the data, nor the quality of the final result, so do what you like).
May I suggest that the instructions should suggest selecting just REPLACE rather than OFFLINE + REPLACE if replacing a drive that has not yet failed (or that FreeNAS does not yet consider to have failed)?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
May I suggest that the instructions should suggest selecting just REPLACE rather than OFFLINE + REPLACE if replacing a drive that has not yet failed (or that FreeNAS does not yet consider to have failed)?
Go head and suggest it... raise a jira ticket. (from the Report a bug link at the top of this page)

I'm not sure it will be accepted as you're effectively saying you know the disk is going bad, but you want to leave it in there anyway.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Go head and suggest it... raise a jira ticket. (from the Report a bug link at the top of this page)

I'm not sure it will be accepted as you're effectively saying you know the disk is going bad, but you want to leave it in there anyway.
I'm only leaving it there as long as it takes for its replacement to take over -- for resilvering to finish.
 
Top