This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Replacing faulty drive in ZPool

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
curacaoflip
NewUser
NewUser
Posts: 6
Joined: 28 Jan 2013 22:55
Status: Offline

Replacing faulty drive in ZPool

Post by curacaoflip »

Hi,

after some struggling I found out how to identify a faulty drive in my ZFS Pool (sudden performance drop). Seems to be a dying WD Caviar Black 2Tb. Luckily I got a 5 year warranty on it.

I bought a new WD Green drive today and want to swap it with the dying Caviar Black.

But ... I started scrubbing my pool and because of the dying Caviar Black it gives me an estimate of 500+ hours left. Is it Okay to just shut the system down and replace the drive with the new one?
I already found out that I just have to use the replace command and that N4F makes the resilvering start.

Also: Since the server is running 24/7 and the power down for the drives is set to 'never' I'm wondering if it's not better to have it power don the drives after a threshold of about 2 hours. It has been an issue in the past but how does N4F handle that in this version (9.1.0.1)

Questions:
Can I abort the scrub by powering down?
Do I have to use the re import drives command?
Do I have to use the clear command in the pool utilities
Can I safely use the drive setting to power down the HDD's after inactivity of 2 hrs? Will this not push the system in a comatose state? (All SATA and one PATA drives, no SSD) .

Hopefully you can help me on this so I can start reviving my ZFS pool and therefore my N4F server.

Regards, Flip

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Replacing faulty drive in ZPool

Post by chrisf4lc0n »

Stop scrubing first, SSH to your machine, then:

Code: Select all

ps ax
look for the scrubing process number (PID),

Code: Select all

kill -9 "here goes the number of the scrubing process"
Then I would do it in a possible safest way:

Code: Select all

zpool replace -f "your pool name" "old disk name" "new disk name"
on my server it would be:

Code: Select all

zpool replace -f ZFS_RAID ada0 ada1
then check with:

Code: Select all

zpool status
Chris.
Watercooling is just the beginning ;)

curacaoflip
NewUser
NewUser
Posts: 6
Joined: 28 Jan 2013 22:55
Status: Offline

Re: Replacing faulty drive in ZPool

Post by curacaoflip »

Chris,

thanks but I get a long list of processes on the ps ax command, none of them give an indication what the scrub process is. It is running though but how do I recognise the scrub?
Killing a random of the list seems to be wrong.

Used the zpool -s <poolname> command and the scrub had stopped.
Powered down and am replacing the drive.

Thanks for the advise!

Flip

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Replacing faulty drive in ZPool

Post by chrisf4lc0n »

I normally favor killing process over just stopping it but if you cannot find the right one then:

Code: Select all

zfs scrub -s "name of your pool"
Watercooling is just the beginning ;)

curacaoflip
NewUser
NewUser
Posts: 6
Joined: 28 Jan 2013 22:55
Status: Offline

Re: Replacing faulty drive in ZPool

Post by curacaoflip »

The Scrub -s command did the Job. But then .......
I replaced the drive and as expected the ZFS pool reported degraded.
The replace command in the GUI doesn't work, doesn't recognise the drive.
At first in management emptied config and reimported the drives, this showed my new drive.
ZFS tools replace doesn't see it so nothing to replce there.
Cli (or SSH) none whatsoever. N4F gave back can't replace no such device.
Then I remembered the pool status where N4F told me that the removed drive was ADA3 (and not 8 what it actualy was and the new drive is ada8 again) The command Zpool replace ada3 ada8 did the Job.
Now the status tells me that it found ada8 and is resilvering.

Thanks for your help, it pushed me in the right direction.

Cheers, Flip
Takes a bit of googling and trying (thanks for MSX and DOS in the 1980's) to get it done.

User avatar
Lee Sharp
Advanced User
Advanced User
Posts: 251
Joined: 13 May 2013 21:12
Contact:
Status: Offline

Re: Replacing faulty drive in ZPool

Post by Lee Sharp »

Use another system to run wdidle on that Green drive before you add it. Trust me...

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Replacing faulty drive in ZPool

Post by chrisf4lc0n »

Glad you sorted it out!
Watercooling is just the beginning ;)

Post Reply

Return to “ZFS (only!)”