ZFS The best way to move zpool to other disks

Giteh

Member

Reaction score: 1
Messages: 30

Hi,

I need to move zpool to faster SSD disks. I'm new to ZFS so I may be wrong but I assume that the best way to do this is to create zpool on new disks again and then send 'zroot' over 'zfs send' command. Am I right?
My zpool status output:
Code:
        NAME          STATE     READ WRITE CKSUM
        zroot         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            ada0p4    ONLINE       0     0     0
            ada1p4    ONLINE       0     0     0
          mirror-1    ONLINE       0     0     0
            ada2p4    ONLINE       0     0     0
            ada3p4    ONLINE       0     0     0
        logs
          mirror-2    ONLINE       0     0     0
            gpt/zil0  ONLINE       0     0     0
            gpt/zil1  ONLINE       0     0     0
        cache
          gpt/l2arc0  ONLINE       0     0     0
          gpt/l2arc1  ONLINE       0     0     0
Best regards,
Patryk
 

m0nkey_

Member

Reaction score: 15
Messages: 38

Depends on the size of the original disks and new SSDs. If the new SSDs are larger than the existing drives, then you can do zpool replace [pool] [device] [new device] for each disk, waiting for one to complete before doing the next. Otherwise, just create a new pool with the new disks, take a snapshot of the original pool and use zfs send and zfs recv to copy the data.

Edit: If you're replacing with larger drives, you might want set autoexpand to on on the pool before replacing the disks. This way the pool will grow to the size of the new drives.
 
Top