Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

zfs zpool issue

Status
Not open for further replies.

johngiggs

Technical User
Oct 30, 2002
492
0
0
US
I had a zpool spare disk that failed and was replaced.

pool: diskpool01
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
diskpool01 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c0t0d0 ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c4t0d0 ONLINE 0 0 0
c6t0d0 ONLINE 0 0 0
c7t0d0 ONLINE 0 0 0
c5t1d0 ONLINE 0 0 0
c0t1d0 ONLINE 0 0 0
c0t7d0 ONLINE 0 0 0
spares
c0t7d0 UNAVAIL cannot open
c5t7d0 AVAIL
c4t7d0 AVAIL

errors: No known data errors

The disk was physically replaced and is shared among other zfs pools. In my attempts to replace it I ended up running zpool remove diskpool01 c0t7d0 because my attempts at running zpool detach, zpool replace, etc. failed.

After removing it from the zfs pools I meant to add it back as a spare to each of the pools, but I mistyped and forgot to put spare on the line, so I ran:

zpool add -f diskpool01 c0t7d0

Now I have a diskpool that is 500 GB larger than it was before. I need to remove the disk from that zpool and add it back as a spare.

Any help would be greatly appreciated.

Thanks,

John
 
Hi John,

Follow the below procedure


zpool offline diskpool01 c0t7d0


zpool status --> verify disk is offline or not



zpool detach diskpool01 c0t7d0

zpool status

zpool add -f diskpool01 spare c0t7d0 --> add disk c0t7d0 as spare to pool diskpool01.

If you have any questions plz let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top