{"id":432,"date":"2013-08-30T14:02:11","date_gmt":"2013-08-30T21:02:11","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=432"},"modified":"2013-08-30T14:41:02","modified_gmt":"2013-08-30T21:41:02","slug":"growing-a-solaris-ldom-rpool","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/growing-a-solaris-ldom-rpool\/","title":{"rendered":"Growing a Solaris LDOM rpool"},"content":{"rendered":"

This is a procedure that might be useful if you ever have to grow a Solaris VTOC \/SMI partition containing a rpool.<\/p>\n

Change zfs volume from 20G to 25G<\/strong><\/p>\n

\r\n# zfs set volsize=25G rpool\/ldoms\/sol11_gold\/disk0\r\n# zfs get volsize rpool\/ldoms\/sol11_gold\/disk0\r\nNAME PROPERTY VALUE SOURCE\r\nrpool\/ldoms\/sol11_gold\/disk0 volsize 25G local\r\n<\/pre>\n

Procedure if existing label is a VTOC \/ SMI<\/strong><\/span><\/h2>\n

Inside the guest record the current VTOC. You could possibly recover using fmthard.<\/strong><\/p>\n

\r\nroot@solaris:\/root# prtvtoc \/dev\/rdsk\/c2d1s0\r\n\r\n* \/dev\/rdsk\/c2d1s0 partition map\r\n*\r\n* Dimensions:\r\n* 512 bytes\/sector\r\n* 768 sectors\/track\r\n* 96 tracks\/cylinder\r\n* 73728 sectors\/cylinder\r\n* 568 cylinders\r\n* 566 accessible cylinders\r\n*\r\n* Flags:\r\n* 1: unmountable\r\n* 10: read-only\r\n*\r\n* Unallocated space:\r\n* First Sector Last\r\n* Sector Count Sector\r\n* 0 73728 73727\r\n*\r\n* First Sector Last\r\n* Partition Tag Flags Sector Count Sector Mount Directory\r\n0 2 00 73728 41656320 41730047\r\n2 5 01 0 41730048 41730047\r\n<\/pre>\n

Use format > verify and record the output<\/strong><\/p>\n

\r\nPrimary label contents:\r\n\r\nVolume name = <        >\r\nascii name  =\r\npcyl        =  568\r\nncyl        =  566\r\nacyl        =    2\r\nnhead       =   96\r\nnsect       =  768\r\nPart      Tag    Flag     Cylinders       Size            Blocks\r\n  0       root    wm       1 - 565       19.86GB    (565\/0\/0) 41656320\r\n  1 unassigned    wm       0              0         (0\/0\/0)          0\r\n  2     backup    wu       0 - 565       19.90GB    (566\/0\/0) 41730048\r\n  3 unassigned    wm       0              0         (0\/0\/0)          0\r\n  4 unassigned    wm       0              0         (0\/0\/0)          0\r\n  5 unassigned    wm       0              0         (0\/0\/0)          0\r\n  6 unassigned    wm       0              0         (0\/0\/0)          0\r\n  7 unassigned    wm       0              0         (0\/0\/0)          0\r\n\r\n<\/pre>\n

Change label to EFI using format -e<\/span><\/strong><\/p>\n

\r\nroot@solaris:\/root# format -e\r\nformat> label\r\n[0] SMI Label\r\n[1] EFI Label\r\nSpecify Label type[0]: 1\r\nWarning: This disk has an SMI label. Changing to EFI label will erase all\r\ncurrent partitions.\r\nContinue? y\r\n<\/pre>\n

Change label back using format -e<\/strong><\/p>\n

\r\nformat> label\r\n[0] SMI Label\r\n[1] EFI Label\r\nSpecify Label type[1]: 0\r\n<\/pre>\n

Next recreate the initial partitions. Check that the cylinder size of the disk geometry hasn't changed.<\/span> If it has changed then you will be unable to recreate the initial partitions.<\/strong><\/p>\n

Run format > verify and check that \"nhead<\/span>\" and \"nsect<\/span>\" are the same as before the geometry was changed (from the format > verify output that was initially saved)<\/p>\n

Partition table before fixing it<\/strong><\/p>\n

\r\nformat> verify\r\nWarning: Primary label on disk appears to be different from\r\ncurrent label.\r\n\r\nWarning: Check the current partitioning and 'label' the disk or use the\r\n         'backup' command.\r\n\r\nPrimary label contents:\r\n\r\nVolume name = <        >\r\nascii name  =\r\npcyl        =  711\r\nncyl        =  709\r\nacyl        =    2\r\nnhead       =   96\r\nnsect       =  768\r\nPart      Tag    Flag     Cylinders       Size            Blocks\r\n  0       root    wm       0 -   3      144.00MB    (4\/0\/0)     294912\r\n  1       swap    wu       4 -   7      144.00MB    (4\/0\/0)     294912\r\n  2     backup    wu       0 - 708       24.93GB    (709\/0\/0) 52273152\r\n  3 unassigned    wm       0              0         (0\/0\/0)          0\r\n  4 unassigned    wm       0              0         (0\/0\/0)          0\r\n  5 unassigned    wm       0              0         (0\/0\/0)          0\r\n  6        usr    wm       8 - 708       24.64GB    (701\/0\/0) 51683328\r\n  7 unassigned    wm       0              0         (0\/0\/0)          0\r\n<\/pre>\n

Recreate the partition table based on your original verify. \u00a0Leave slice 2 as is.<\/strong><\/p>\n

\r\npartition > pr\r\n\r\nCurrent partition table (unnamed):\r\nTotal disk cylinders available: 709 + 2 (reserved cylinders)\r\n\r\nPart Tag Flag Cylinders Size Blocks\r\n0 root wm 1 - 565 19.86GB (565\/0\/0) 41656320\r\n1 unassigned wu 0 0 (0\/0\/0) 0\r\n2 backup wu 0 - 708 24.93GB (709\/0\/0) 52273152\r\n3 unassigned wm 0 0 (0\/0\/0) 0\r\n4 unassigned wm 0 0 (0\/0\/0) 0\r\n5 unassigned wm 0 0 (0\/0\/0) 0\r\n6 unassigned wm 0 0 (0\/0\/0) 0\r\n7 unassigned wm 0 0 (0\/0\/0) 0\r\n\r\npartition > label\r\nReady to label disk, continue? y\r\npartition > q\r\n<\/pre>\n

**** I think I should have made slice the full 24G not the original 19G. \u00a0I will verify his is a future test.<\/strong><\/p>\n

\r\nroot@solaris:\/root# sync\r\nroot@solaris:\/root# reboot\r\n<\/pre>\n

**** Could not get the rpool to see the larger slice. \u00a0Booted DVD and changed slice to the full size 24GB \u00a0of the disk. \u00a0That still did not fix it so l<\/strong>ets try booting a Solaris 11 DVD and import\/export the rpool.<\/strong><\/p>\n

\r\nroot@solaris:\/root# zpool import rpool\r\nroot@solaris:\/root# zpool status\r\npool: rpool\r\nstate: ONLINE\r\nscan: none requested\r\nconfig:\r\n\r\nNAME STATE READ WRITE CKSUM\r\nrpool ONLINE 0 0 0\r\nc2d1s0 ONLINE 0 0 0\r\n\r\nerrors: No known data errors\r\n\r\nroot@solaris:\/root# zpool list\r\nNAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT\r\nrpool 24.9G 5.32G 19.6G 21% 1.00x ONLINE -\r\n\r\nroot@solaris:\/root# zpool export rpool\r\n<\/pre>\n

Reboot and guest is seeing larger rpool<\/strong><\/p>\n

\r\nroot@solaris:~# zpool list\r\nNAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT\r\nrpool 24.9G 5.32G 19.6G 21% 1.00x ONLINE -\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

This is a procedure that might be useful if you ever have to grow a Solaris VTOC \/SMI partition containing<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-432","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=432"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/432\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}