Thursday, January 23, 2014

how to expand LUN and replace a smaller LUN with it?

there is an article on how to mirror the rpool, that is how I am going to replace this smaller LUN.  I sized all my rpool way to small(64G), a lot of growing pain, or fun, depending on how you look at it.

here is that article.

I wanted to use another 64G LUN on a testing server to try out the procedure, but 64G is bit too small, so I needed to grow it, so I need to expand the LUN.

To grow the LUN is easy in the SAN, but back in the OS, the "format" recognized the change in that LUN, and told me to use "expand" under partition to grow it, so I followed those instruction, only it didn't work for me, I can't label it.

I went through this before.  I need to erase the label and make the new size come to light.

format -e, I tried to relabel the disk from SMI to EFI, then from EFI to SMI, that worked for me before, but not this time, for some reason.

so I got out of format and did a "zpool create test new_disk", zpool create will make a EFI labeled disks automatically, I read it somewhere and used it often to make sure disks are good.

after that I destroyed the test zpool, then went back to format -e, and label it SMI, and it worked this time.

then I added the disk to the testing server, ldm add-vdisk

I forgot to expand the LUN in the test server, I just followed the link above and resilvered the new disk, then detached the disk.  that's when I realized that the zpool still has the old size.

zpool set autoexpand = on rpool

which expanded the disk to the new size.




No comments:

Post a Comment