{"id":12885,"date":"2022-11-17T18:38:50","date_gmt":"2022-11-17T23:38:50","guid":{"rendered":"https:\/\/jianmingli.com\/wp\/?p=12885"},"modified":"2022-12-25T11:10:54","modified_gmt":"2022-12-25T16:10:54","slug":"migrate-freenas-from-4-x-2tb-disks-to-2-x-8tb-disks","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=12885","title":{"rendered":"Migrate Freenas from 4 x 2TB Disks to 2 x 8TB Disks"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Overview\">Overview<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Original_Pool\">Original Pool<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Install_New_Disks\">Install New Disks<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Replicate_Pool\">Replicate Pool<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Rename_Pools\">Rename Pools<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Issues\">Issues<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Could_not_start_SMB\">Could not start SMB<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Plugins_and_Jails_Not_Showing\">Plugins and Jails Not Showing<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Appendix\">Appendix<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Before_Status\">Before Status<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#After_Status\">After Status<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Overview\"><h2>Overview<\/h2><\/span>\n<span id=\"Original_Pool\"><h2>Original Pool<\/h2><\/span>\n<pre lang=\"bash\">\r\nvol1                                            ONLINE\r\n\tmirror-0                                      ONLINE\r\n\t\tgptid\/7bec2c8c-0de1-11e8-b0ed-2c4138ab8e32  ONLINE\r\n\t\tgptid\/7cd747b5-0de1-11e8-b0ed-2c4138ab8e32  ONLINE\r\n\tmirror-1                                      ONLINE\r\n\t\tgptid\/d0fdb01c-125d-11e8-a10f-2c4138ab8e32  ONLINE\r\n\t\tgptid\/624776b0-60a0-11ed-97d5-2c4138ab8e32  ONLINE\r\n<\/pre>\n<span id=\"Install_New_Disks\"><h2>Install New Disks<\/h2><\/span>\n<p>* Shutdown freenas<br \/>\n* Add 2x8tb drives:<br \/>\n&#8211; WD plus 8TB, SN CA1VRS9K<br \/>\n&#8211; Ironwolf NAS 8tb, SN WSD8RADV<br \/>\n* Create mirrored zpool from new drives<\/p>\n<pre lang=\"bash\">\r\n\/\/ Lable disks\r\nglabel label -v WDCA1VRS9K \/dev\/ada2\r\nglabel label -v IWWSD8RADV \/dev\/ada5\r\nzpool create newpool mirror \/dev\/label\/WDCA1VRS9K \/dev\/label\/IWWSD8RADV\r\n\r\n<\/pre>\n<span id=\"Replicate_Pool\"><h2>Replicate Pool<\/h2><\/span>\n<p>* Create a full snapshot and replicate to new pool<\/p>\n<pre lang=\"bash\">\r\n\/\/ Create snapshot\r\nzfs snapshot -r vol1@migrate\r\n\r\n\/\/ Replicate to new pool\r\nzfs send -R vol1@migrate | pv | zfs receive -dF newpool\r\n<\/pre>\n<p>* Create a incremental snapshot and replicate to new pool any additional changes<br \/>\n&#8211; since previous full replication which could take a long time<\/p>\n<pre lang=\"bash\">\r\n\/\/ Stop all started services\r\n- SMB\r\n- SMART\r\n\r\n\/\/ Stop jails\r\n- plexmediaserver_1\r\n\r\n\/\/ Stop plugins\r\n- Plexmediaserver\r\n\r\n\/\/ Unmount all pools. Can this step be skipped?\r\nzfs unmount -f \/mnt\/vol1\/jails\/plexmediaserver_1\r\nzfs unmount -a\r\n\r\n\/\/ Create second snapshot\r\nzfs snapshot -r vol1@migrate2\r\n\r\n\/\/ Replicate incrementally to new pool\r\nzfs send -R -I vol1@migrate vol1@migrate2 | pv | zfs receive -dF newpool\r\n<\/pre>\n<span id=\"Rename_Pools\"><h2>Rename Pools<\/h2><\/span>\n<p>* Rename new pool to old pool name<\/p>\n<pre lang=\"bash\">\r\n\/\/ export old pool\r\nzpool export vol1\r\n\r\n\/\/ export new pool\r\nzpool export newpool\r\n\r\n\/\/ import new pool as old pool name, i.e vol1\r\nzpool import newpool vol1\r\n\r\n\/\/ Start all started services that were stopped\r\n- SMB \/\/ needs reboot to start\r\n- SMART\r\n<\/pre>\n<p>* Shutdown system<br \/>\n* Remove old drives<br \/>\n* Start system<\/p>\n<span id=\"Issues\"><h2>Issues<\/h2><\/span>\n<span id=\"Could_not_start_SMB\"><h3>Could not start SMB<\/h3><\/span>\n<p>* Fix:<br \/>\n&#8211; reboot<\/p>\n<span id=\"Plugins_and_Jails_Not_Showing\"><h3>Plugins and Jails Not Showing<\/h3><\/span>\n<p>* Error messages:<br \/>\n&#8211; Plugins: Failed to create dataset vol1\/jails: cannot create &#8216;vol1\/jails&#8217;: dataset already exists<br \/>\n&#8211; Jails: No entry has been found<br \/>\n* Fix:<br \/>\n&#8211; not sure<\/p>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href='https:\/\/www.itsacon.net\/computers\/unix\/reducing-the-number-of-disks-in-a-zfs-pool\/'>Reducing the number of disks in a ZFS pool<\/a><br \/>\n* <a href='https:\/\/blog.victormendonca.com\/2020\/11\/03\/zfs-for-dummies\/'>ZFS for Dummies<\/a><\/p>\n<span id=\"Appendix\"><h2>Appendix<\/h2><\/span>\n<span id=\"Before_Status\"><h3>Before Status<\/h3><\/span>\n<pre lang=\"bash\">\r\n[root@freenas ~]# zpool status                                                                                                      \r\n  pool: freenas-boot                                                                                                                \r\n state: ONLINE                                                                                                                      \r\n  scan: scrub repaired 0 in 0 days 00:01:38 with 0 errors on Mon Nov 14 03:46:38 2022                                               \r\nconfig:  NAME        STATE     READ WRITE CKSUM                                                                                      \r\n        freenas-boot  ONLINE     0     0     \r\n          mirror-0  ONLINE       0     0     \r\n            da1p2   ONLINE       0     0     \r\n            da0p2   ONLINE       0     0     \r\nerrors: No known data errors                                                                                                        \r\n       \r\n  pool: vol1                                                                                                                        \r\n state: ONLINE                                                                                                                      \r\n  scan: resilvered 92.0G in 0 days 00:19:39 with 0 errors on Wed Nov  9 21:58:11 2022                                               \r\nconfig:                                                                                                                             \r\n        NAME                                            STATE     READ WRITE CKSUM                                                  \r\n        vol1                                            ONLINE       0     0     \r\n          mirror-0                                      ONLINE       0     0     \r\n            gptid\/7bec2c8c-0de1-11e8-b0ed-2c4138ab8e32  ONLINE       0     0     \r\n            gptid\/7cd747b5-0de1-11e8-b0ed-2c4138ab8e32  ONLINE       0     0     \r\n          mirror-1                                      ONLINE       0     0     \r\n            gptid\/d0fdb01c-125d-11e8-a10f-2c4138ab8e32  ONLINE       0     0     \r\n            gptid\/624776b0-60a0-11ed-97d5-2c4138ab8e32  ONLINE       0     0     \r\n                                                                                                                                    \r\nerrors: No known data errors                        \r\n<\/pre>\n<span id=\"After_Status\"><h3>After Status<\/h3><\/span>\n<pre lang=\"bash\">\r\n[root@freenas ~]# zpool status|more                                                                                                 \r\n  pool: freenas-boot                                                                                                                \r\n state: ONLINE                                                                                                                      \r\n  scan: scrub repaired 0 in 0 days 00:01:38 with 0 errors on Mon Nov 14 03:46:38 2022                                               \r\nconfig:                                                                                                                             \r\n                                                                                                                                    \r\n        NAME        STATE     READ WRITE CKSUM                                                                                      \r\n        freenas-boot  ONLINE     0     0     0                                                                                    \r\n          mirror-0  ONLINE       0     0     0                                                                                      \r\n            da1p2   ONLINE       0     0     0                                                                                      \r\n            da0p2   ONLINE       0     0     0                                                                                      \r\n                                                                                                                                    \r\nerrors: No known data errors                                                                                                        \r\n                                                                                                                                    \r\n  pool: vol1                                                                                                                        \r\n state: ONLINE                                                                                                                      \r\n  scan: none requested                                                                                                              \r\nconfig:                                                                                                                             \r\n                                                                                                                                    \r\n        NAME                  STATE     READ WRITE CKSUM                                                                            \r\n        vol1                  ONLINE       0     0     0                                                                            \r\n          mirror-0            ONLINE       0     0     0                                                                            \r\n            label\/WDCA1VRS9K  ONLINE       0     0     0                                                                            \r\n            label\/IWWSD8RADV  ONLINE       0     0     0                                                                            \r\n                                                                                                                                    \r\nerrors: No known data errors \r\n\r\n[root@freenas ~]# zpool list vol1                                                                                                   \r\nNAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT                                                           \r\nvol1  7.25T   393G  6.87T         -     0%     5%  1.00x  ONLINE  -     \r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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: &#8211; WD plus 8TB, SN CA1VRS9K &#8211; Ironwolf NAS 8tb, SN WSD8RADV * &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=12885\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[860],"tags":[820],"class_list":["post-12885","post","type-post","status-publish","format-standard","hentry","category-freenas","tag-freenas"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-3lP","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/12885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12885"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/12885\/revisions"}],"predecessor-version":[{"id":12893,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/12885\/revisions\/12893"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}