SUMMARY : Updating a mirror metadevice size

From: Sebastien DAUBIGNE <>
Date: Tue Mar 07 2006 - 04:31:45 EST
Thanks to Aaon, Petri, Mohammed, Rob, Darren, Jose.

Some suggested using growfs but the problem was on the metadevice mirror 
first (growfs comes after this).
Some suggested clearing/recreating the metadevice, but it was not an 
option because it can't be done online (unmountable filesystem).
Petri suggested to read nfodoc# 77190: "Grow Mirrored root under 
Disksuite 4.x or Solaris Volume Manager"  (but I have no Sun support 
contract to get acces to it).

Finally Rob and Darren provided the magic command :  "metattach d30".
This will tell SDS/SVM to just "reevaluate" its size according to 
underlying submirrors, and yes it worked, the mirror size has been updated.
Running "Metaroot" is not necessary.

Now for growing root filesystem online using growfs, Rob strongly 
recommended NOT to do it, because it CAN (although it not necessary 
WILL) hang the system .
I suppose it is due to the filesystem locking involved in the growing 
operation : maybe locking the root filesystem can prevent some critical 
system component to work.
As stated in growfs manpage : " The following conditions prevent  you  
from  expanding  file systems:  [...] When the file system is root (/), 
/usr, or swap. "

Well, best solution is to do it offline : This makes me think boot disk 
management and LVM integration is probably the biggest Solaris weakness 
(compared to AIX for instance that has early-boot and restore LVM native 

Sebastien DAUBIGNE a icrit :
> Hi,
> I try to grow a root metadevice online.
> As I had contiguous space after root partition on the disk, I did the 
> following :
> 1. Detach and clear one submirror (metadetach/metaclear)
> 2. Grow the partition under the detached/cleared submirror (format)
> 3. Recreate and attach the bigger submirror (metainit/metattach)
> 4. Detach and clear the other submirror (metadetach/metaclear)
> 5. Grow the partition under the detached/cleared submirror (format)
> 6. Recreate and attach the submirror (metainit/metattach)
> Now I've planned to  :
> 7. Grow the root filesystem (growfs)
> 8. Update boot information (metaroot)
> Unfortunately, SDS did not update the mirror size : It kept the original 
> size although both subimmrors are bigger. So I'm unable to grow the root 
> filesystem.
> I though that the mirror size would be updated according to the smallest 
> submirror (in this case, both are identical and have a bigger size)
> Is there any way to update the mirror size online or should I consider 
> to reboot  ?
> Here is metastat output  (d30 is the root metadevice) :
> d30: Mirror
>     Submirror 0: d10
>       State: Okay
>     Submirror 1: d20
>       State: Okay
>     Pass: 1
>     Read option: roundrobin (default)
>     Write option: parallel (default)
>     Size: 2981448 blocks
> d10: Submirror of d30
>     State: Okay
>     Size: 10487070 blocks
>     Stripe 0:
>         Device              Start Block  Dbase State        Hot Spare
>         c1t0d0s0                   0     No    Okay
> d20: Submirror of d30
>     State: Okay
>     Size: 10487070 blocks
>     Stripe 0:
>         Device              Start Block  Dbase State        Hot Spare
>         c1t1d0s0                   0     No    Okay
> Thanks for help.

Sebastien DAUBIGNE - +33(0)
AtosOrigin Infogerance - IMS/ERP/Pessac
sunmanagers mailing list
Received on Tue Mar 7 04:33:07 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:56 EST