ZFS- Add a new disk as hot spare

sandiphw

New Member
May 27, 2011
5
0
1
I have installed Proxmox 3.4 version and configured storage as zfs RAID 1 of two 1TB SATA HDD from GUI installer. Now I want to add another one 1 TB hdd as hot spare. I know how to add a hot spare in solaris zfs system using zfs add pool spare device id command. But here I am confused as in the existing pool HDD are showing as something else. Please see the attachment for related outputs:

New HDD has been detected as /dev/sdc

What is the right way to add this disk in the rpool as hot spare?

Thanks in advance.


Regards,


Sandip
 

Attachments

Thanks for prompt reply.

After adding the third disk as hot spare by command
HTML:
zpool add rpool spare /dev/sdc
, the pool looks like,

pool: rpool
state: ONLINE
scan: none requested
config:


NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-HGST_HTS721010A9E630_JR10006P2H1X1F-part2 ONLINE 0 0 0
ata-HGST_HTS721010A9E630_JR10006P2H65RF-part2 ONLINE 0 0 0
spares
sdc AVAIL


Is is what we expect after adding sdc in the pool? I can not the part-2 partition of the sdc. Please see the gdisk output of sda & sdc in the attached file.

Do I missing something or this configuration will work as desired.

Regards,

Sandip
 

Attachments

Can you please suggest how an I add boot manager in this disk also?

Create a grub-boot partition at the start of the disk. Do not modify existing partitions.
Then install grub with

# dpkg-reconfigure grub-pc

(select all grub partition).

ZFS people still think there is no need to install boot partitions, so this is still a manual task :-/
 
Can you please clarify the followings:
  • In zfs raid, why HDDs are not showing as /dev/sda, /dev/sdb etc? Instead it is showing only part-2 partitions of the HDDs. Is that means only part-2 partitions are in part of ZFA RAID?
  • After adding sdc as hot spare, I could not see the part2 partition in it through gdisk -l command. Do i need to manually create this partition or it will be automatically created while be used in RAID from spare?

Thanks,

Sandip
 
Can you please clarify the followings:
  • In zfs raid, why HDDs are not showing as /dev/sda, /dev/sdb etc? Instead it is showing only part-2 partitions of the HDDs. Is that means only part-2 partitions are in part of ZFA RAID?

that is zfs magic - they hide partitions when they think they can use the 'whole-disk'

  • After adding sdc as hot spare, I could not see the part2 partition in it through gdisk -l command. Do i need to manually create this partition or it will be automatically created while be used in RAID from spare?

partitions numbers are not really important.
 
Just used this old thread to add a spare to my already running zfs file system... thanks much!