migrating from 2x2TB mirrored disks to 1x4TB mirrored

stillka

Explorer
Joined
Nov 15, 2014
Messages
55
Hello,

my 4TB pool is configured with 2+2TB disks mirrored to 2+2TB disks (4x 2TB disk total).
I want replace all old 2TB disks but I want use 1x 4TB mirrored disk as replacement (2x 4TBdisks total).

So, I have un-mirrored 2x2TB disks from pool, removed them and connected instead them 2x4TB.
Now I have 4TB non-mirrored pool (2x2TB) and 2x 4TB free disks ready for use.

What is the best way to migrate data to 4TB disk? Can I attach 4TB disk as mirror to 2x2TB? Or what is the best procedure to migrate to new 4TB drive(s)?

Thanks.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
my 4TB pool is configured with 2+2TB disks mirrored to 2+2TB disks (4x 2TB disk total).
Actually it's 1 mirror of 2 2TB disks and another mirror of 2 2TB disks striped together. (you're describing a mirror of stripes, but ZFS will only do a stripe of mirrors)

Can I attach 4TB disk as mirror to 2x2TB?
Not easily... some folks would refer you to using GELI for it, but I would stay away from that if it were me.

Ignore the point about "bigger" and the process here should cover you in terms of the zfs send | recv and the renaming.

 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Quick toughs: You haven't provided your server specs.

Depending you the number of SATA (assume) ports you could create a new pool without removing the old disks and move the data.
 

stillka

Explorer
Joined
Nov 15, 2014
Messages
55
Quick toughs: You haven't provided your server specs.

Depending you the number of SATA (assume) ports you could create a new pool without removing the old disks and move the data.

Hi, unfortunately, I have only 4 ports on my box...thats why I removed 2x2TB disks and have no mirror now....
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,462
thats why I removed 2x2TB disks and have no mirror now....
Not really the best answer. Instead:
  • Replace one of the 2TB disks with a 4TB disk
  • Replace the other 2TB disk in the same mirrored pair with the other 4TB disk
  • Remove the remaining 2TB mirror vdev from the pool
All of this can easily be done through the GUI in TrueNAS. If you're using an earlier release, it may not be possible.
 

stillka

Explorer
Joined
Nov 15, 2014
Messages
55
Not really the best answer. Instead:
  • Replace one of the 2TB disks with a 4TB disk
  • Replace the other 2TB disk in the same mirrored pair with the other 4TB disk
  • Remove the remaining 2TB mirror vdev from the pool
All of this can easily be done through the GUI in TrueNAS. If you're using an earlier release, it may not be possible.

Hi,
I understand but it allow me to remove 2TB disks? There will be data on the 2TB disks which are not on 4TB disks....it will move the data to 4TB disk?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,462
it will move the data to 4TB disk?
Yes. Use the GUI to remove that vdev, and a resilver operation will start, which will move the data to the other vdev. Once that finishes (and only once it finishes), you can take those disks out of the server.
 

stillka

Explorer
Joined
Nov 15, 2014
Messages
55
Yes. Use the GUI to remove that vdev, and a resilver operation will start, which will move the data to the other vdev. Once that finishes (and only once it finishes), you can take those disks out of the server.

hi, it works just like you said, easy :smile:

big thanks!
 

stillka

Explorer
Joined
Nov 15, 2014
Messages
55
Actually it's 1 mirror of 2 2TB disks and another mirror of 2 2TB disks striped together. (you're describing a mirror of stripes, but ZFS will only do a stripe of mirrors)


Not easily... some folks would refer you to using GELI for it, but I would stay away from that if it were me.

Ignore the point about "bigger" and the process here should cover you in terms of the zfs send | recv and the renaming.


Hi,
fortunately, simple method described by danb35 worked like charm:
  • Replace one of the 2TB disks with a 4TB disk
  • Replace the other 2TB disk in the same mirrored pair with the other 4TB disk
  • Remove the remaining 2TB mirror vdev from the pool - I have done this using CLI command:
    "zpool remove <2TB_device_name>", this caused "evacuating" action after which vdev on remaining 2TB disks has been removed from pool:
pool: vg_data
state: ONLINE
remove: Removal of vdev 1 copied 1.75T in 9h48m, completed on Sun Oct 17 04:26:34 2021
11.3M memory used for removed device mappings config:

NAME STATE READ WRITE CKSUM
vg_data ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/f0c5d3ee-2e88-11ec-a3e2-008e25710367 ONLINE 0 0 0
gptid/4bd5fe3e-2e64-11ec-8c8c-008e25710367 ONLINE 0 0 0

So, only 4TB luns remain in the pool (in mirror).
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,462
Remove the remaining 2TB mirror vdev from the pool - I have done this using CLI command:
Why? You can do this through the GUI as well, and really, any actions that can be done in the GUI, should be done in the GUI.
only 4TB luns
What do you mean by LUNs? These aren't connected to some kind of RAID controller, are they?
 

stillka

Explorer
Joined
Nov 15, 2014
Messages
55
Why? You can do this through the GUI as well, and really, any actions that can be done in the GUI, should be done in the GUI.
I like work with CLI but GUI is safer, that's true...
What do you mean by LUNs? These aren't connected to some kind of RAID controller, are they?
heh no, I have used word LUNs by mistake.
 
Top