ZFS Mirror - HDD Replacement

Status
Not open for further replies.

JLueken

Cadet
Joined
Aug 25, 2011
Messages
4
Hey guys, I know this has probably been asked 100 times in different ways but I've searched the internet for 2 days now and I cannot find a clear, concise answer...

I have 2 500GB drives in a ZFS mirror...in the event that a drive crashes, what exactly do I need to do to replace it with a new one? I'd appreciate directions for FreeNAS 8 and 7 if possible as I'm dealing with both at the moment...many thanks!
 

area51tazz

Cadet
Joined
Aug 30, 2011
Messages
6
Replacing Devices in a Storage Pool

You can replace a device in a storage pool by using the zpool replace command.

# zpool replace tank c1t1d0 c1t2d0

In this example, the previous device, c1t1d0, is replaced by c1t2d0.

The replacement device must be greater than or equal to the minimum size of all the devices in a mirror or RAID-Z configuration. If the replacement device is larger, the pool size in an unmirrored or non RAID-Z configuration is increased when the replacement is complete.


From: http://docs.huihoo.com/opensolaris/solaris-zfs-administration-guide/html/ch04s04.html
 

JLueken

Cadet
Joined
Aug 25, 2011
Messages
4
Many thanks tazz! I was somewhat confused because I noticed that when I:

1. removed the drive (ad4)
2. waited until the mirror was marked as degraded
3. added a few test files
4. re-inserted the drive

it seemed to pick it up automatically and begin re-silvering...I just wasn't sure if it was because the drive was the exact same and thus retained the dev ID ad4 or not. A new drive would not necessarily have this same ID (ad4), correct? Thus necessitating the replace command?
 

area51tazz

Cadet
Joined
Aug 30, 2011
Messages
6
I believe it runs based on the ports it's plugged into. So far, I've only played in VirtialBox...I'm still saving up to order my NAS parts in the next month or so. :)
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
I think since FreeNAS8-BETA2 or BETA1 the ports doesn't matter, each HDD has an unique ID.
 
Status
Not open for further replies.
Top