Replace disks in mirrored pool

Status
Not open for further replies.

rhinok

Dabbler
Joined
Mar 22, 2013
Messages
18
Hi,

I want to replace my current disks with 2 others. The current setup is mirror-0 with 2x1 TB disks and mirror-1 with 2x0.5 TB disks.

Code:
[root@stormstone] ~# zpool status
  pool: tank
state: ONLINE
  scan: scrub repaired 0 in 2h27m with 0 errors on Thu Nov  7 02:27:24 2013
config:
 
    NAME                                            STATE    READ WRITE CKSUM
    tank                                            ONLINE      0    0    0
      mirror-0                                      ONLINE      0    0    0
        gptid/284b318d-8e65-11e2-ae29-6805ca120ec5  ONLINE      0    0    0
        gptid/28919cb8-8e65-11e2-ae29-6805ca120ec5  ONLINE      0    0    0
      mirror-1                                      ONLINE      0    0    0
        ada0                                        ONLINE      0    0    0
        ada1                                        ONLINE      0    0    0
 
errors: No known data errors
[root@stormstone] ~#


FreeNAS build is:
Code:
FreeNAS-8.3.1-RELEASE-x64 (r13452)


The replacement disks are 2x3 TB.

Is it possible to replace these 4 disks with the other 2 (without restoring from a backup)? If yes, how to do that?

Thank you,
rhinok
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yes, Please see the FreeNAS manual for replacing a "bad" disk. Your disks aren't bad, but its the same steps.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Is it possible to replace these 4 disks with the other 2 (without restoring from a backup)? If yes, how to do that?
No, you can't do that. You can either replace the two disks in the mirror-o or the two disks in mirror-1. However, it is not possible to reduce the number of drives in your setup and keep redundancy as it is not possible to remove a vdev from a pool. It would be possible, but I strongly discourage you from doing it, to "replace" both mirror-0 drives with one of the new drives and both mirror-1 drives with the other one (as it is possible to detach a drive from a mirror vdev) -- the result would be a 6TB pool without any redundancy consisting of two single drive vdevs.
If your desired result is to have a 3TB mirror your only option is to create a new pool out of the new drives and copy the data over.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Doh, good catch. I thought he was saying he wanted to replace 2 disks in his mirror with 2 disks he had as spares.

Word of warning rhinok... you didn't add the mirror-1 disks per the manual. It's obvious since ada0 and ada1 are listed instead of gptids. Be warned that certain configuration changes may make your pool unmountable since you didn't follow the manual for adding disks...
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
What you could do if you do your homework, is:

1. Make a new pool with your 2 new disks.
2. Use ZFS replication or rsync to copy your files from one pool to the other.
3. Detach both pools
4. Rename your "new" pool to match the old pool.
5. Reboot and import the "new" pool in the FreeNAS WebGUI.
 

rhinok

Dabbler
Joined
Mar 22, 2013
Messages
18
Indeed, I want a 3TB mirror. I want to get rid of the existing 4 disks (1 re3, 1 ultrastar, 2 caviar blacks) and replace them with more efficient drives (2 reds).

Maybe the best way to go will be to destroy the pool and recreate it as I have backups for my data. Also, I'm planning to upgrade to FreeNAS 9 so it may be better to start fresh (and clean).

I will try what you suggested cyberjock, and see how it goes.
 

rhinok

Dabbler
Joined
Mar 22, 2013
Messages
18
First, thank you guys for feedback.

Considering the wrong setup I decided to destroy the existing pool and to create a new one using only the 2 wd reds.

I installed and configured 9.1.1 without any problems, but I have noticed a change - write speeds halved after changing the disks - ~30MB/s down from ~60 - 70MB/s. I was using 4GB and 2GB files. I switched back to 8.x, but the write speed stays the same.
This is the penalty I get because of the difference in HDD RPM? Reviews lists sequential writes at an average of 100MB/s for these drives, but the copy tests never exceeded 30 MB/s.
Could you guys give me a hint as to what may be wrong?

The NAS box: Intel H67 chipset (Asus mini-ITX), 16 GB RAM, Intel Core i3 3225 3.3GHz, Intel NIC.
Client is connnected using NFS.
I didn't tested CIFS or AFP speeds, as I don't use these anyway.
 
Status
Not open for further replies.
Top