Adding new drive as a spare to zpool.

I'm new to freebsd. I have inserted a new drive to add as simply a spare to zpool. What is the command to achieve this? Thanks
 
I'm new to freebsd. I have inserted a new drive to add as simply a spare to zpool. What is the command to achieve this? Thanks
What exactly do you consider a 'spare'? What are you trying to achieve here?

The reason I ask is because spares are only useful when you're using a mirror or a raidz setup. And I would imagine that you'd knew what disks are being used if you set one of those up already.

Alas, can you share the output of zpool status? That should provide enough information for this.
 
"zpool list" will provide a list of pools that your system knows about. There may be multiple ways of identifying your newly-inserted drive, but a combination of checking kernel output ("dmesg") and accounting for existing ones ("zpool status") usually works for me. The /dev/ part of the path to the device node can be omitted.
 
I ejected and re inserted the spare drive and the system ID'd as da7. Thank you for the list command, got the pool name.
It seems to have added it as a spare at the bottom. It is a raidz setup. I am simply trying to add a spare in case one of the drives fails so I can resilver it.
Anyway I used the zpool add command with the result below. My only question is why are some of the other drive names not da.... but that percentage stuff?
 

Attachments

  • zpool status output.jpg
    zpool status output.jpg
    1,013.2 KB · Views: 428
Drives can be located based on how the kernel enumerates them, or by the disk's own identifier. The latter can sometimes be handy when someone sneaks into your data center and randomly swaps all your drives, but is less important for ZFS which can recognise its own components for itself. I don't know why it has been set up with a mix - you can use zpool history to get some clues.
 
Back
Top