Migrate Freenas from 4 x 2TB Disks to 2 x 8TB Disks

 

Overview

Original Pool

vol1                                            ONLINE
	mirror-0                                      ONLINE
		gptid/7bec2c8c-0de1-11e8-b0ed-2c4138ab8e32  ONLINE
		gptid/7cd747b5-0de1-11e8-b0ed-2c4138ab8e32  ONLINE
	mirror-1                                      ONLINE
		gptid/d0fdb01c-125d-11e8-a10f-2c4138ab8e32  ONLINE
		gptid/624776b0-60a0-11ed-97d5-2c4138ab8e32  ONLINE

Install New Disks

* Shutdown freenas
* Add 2x8tb drives:
– WD plus 8TB, SN CA1VRS9K
– Ironwolf NAS 8tb, SN WSD8RADV
* Create mirrored zpool from new drives

// Lable disks
glabel label -v WDCA1VRS9K /dev/ada2
glabel label -v IWWSD8RADV /dev/ada5
zpool create newpool mirror /dev/label/WDCA1VRS9K /dev/label/IWWSD8RADV

Replicate Pool

* Create a full snapshot and replicate to new pool

// Create snapshot
zfs snapshot -r vol1@migrate
 
// Replicate to new pool
zfs send -R vol1@migrate | pv | zfs receive -dF newpool

* Create a incremental snapshot and replicate to new pool any additional changes
– since previous full replication which could take a long time

// Stop all started services
- SMB
- SMART
 
// Stop jails
- plexmediaserver_1
 
// Stop plugins
- Plexmediaserver
 
// Unmount all pools. Can this step be skipped?
zfs unmount -f /mnt/vol1/jails/plexmediaserver_1
zfs unmount -a
 
// Create second snapshot
zfs snapshot -r vol1@migrate2
 
// Replicate incrementally to new pool
zfs send -R -I vol1@migrate vol1@migrate2 | pv | zfs receive -dF newpool

Rename Pools

* Rename new pool to old pool name

// export old pool
zpool export vol1
 
// export new pool
zpool export newpool
 
// import new pool as old pool name, i.e vol1
zpool import newpool vol1
 
// Start all started services that were stopped
- SMB // needs reboot to start
- SMART

* Shutdown system
* Remove old drives
* Start system

Issues

Could not start SMB

* Fix:
– reboot

Plugins and Jails Not Showing

* Error messages:
– Plugins: Failed to create dataset vol1/jails: cannot create ‘vol1/jails’: dataset already exists
– Jails: No entry has been found
* Fix:
– not sure

References

* Reducing the number of disks in a ZFS pool
* ZFS for Dummies

Appendix

Before Status

[root@freenas ~]# zpool status                                                                                                      
  pool: freenas-boot                                                                                                                
 state: ONLINE                                                                                                                      
  scan: scrub repaired 0 in 0 days 00:01:38 with 0 errors on Mon Nov 14 03:46:38 2022                                               
config:  NAME        STATE     READ WRITE CKSUM                                                                                      
        freenas-boot  ONLINE     0     0     
          mirror-0  ONLINE       0     0     
            da1p2   ONLINE       0     0     
            da0p2   ONLINE       0     0     
errors: No known data errors                                                                                                        
 
  pool: vol1                                                                                                                        
 state: ONLINE                                                                                                                      
  scan: resilvered 92.0G in 0 days 00:19:39 with 0 errors on Wed Nov  9 21:58:11 2022                                               
config:                                                                                                                             
        NAME                                            STATE     READ WRITE CKSUM                                                  
        vol1                                            ONLINE       0     0     
          mirror-0                                      ONLINE       0     0     
            gptid/7bec2c8c-0de1-11e8-b0ed-2c4138ab8e32  ONLINE       0     0     
            gptid/7cd747b5-0de1-11e8-b0ed-2c4138ab8e32  ONLINE       0     0     
          mirror-1                                      ONLINE       0     0     
            gptid/d0fdb01c-125d-11e8-a10f-2c4138ab8e32  ONLINE       0     0     
            gptid/624776b0-60a0-11ed-97d5-2c4138ab8e32  ONLINE       0     0     
 
errors: No known data errors

After Status

[root@freenas ~]# zpool status|more                                                                                                 
  pool: freenas-boot                                                                                                                
 state: ONLINE                                                                                                                      
  scan: scrub repaired 0 in 0 days 00:01:38 with 0 errors on Mon Nov 14 03:46:38 2022                                               
config:                                                                                                                             
 
        NAME        STATE     READ WRITE CKSUM                                                                                      
        freenas-boot  ONLINE     0     0     0                                                                                    
          mirror-0  ONLINE       0     0     0                                                                                      
            da1p2   ONLINE       0     0     0                                                                                      
            da0p2   ONLINE       0     0     0                                                                                      
 
errors: No known data errors                                                                                                        
 
  pool: vol1                                                                                                                        
 state: ONLINE                                                                                                                      
  scan: none requested                                                                                                              
config:                                                                                                                             
 
        NAME                  STATE     READ WRITE CKSUM                                                                            
        vol1                  ONLINE       0     0     0                                                                            
          mirror-0            ONLINE       0     0     0                                                                            
            label/WDCA1VRS9K  ONLINE       0     0     0                                                                            
            label/IWWSD8RADV  ONLINE       0     0     0                                                                            
 
errors: No known data errors 
 
[root@freenas ~]# zpool list vol1                                                                                                   
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT                                                           
vol1  7.25T   393G  6.87T         -     0%     5%  1.00x  ONLINE  -
This entry was posted in freenas and tagged . Bookmark the permalink.