Title:
Adding a meta device with soft partitions to Main Mirror in
Solaris SVM.
Scenario:
Storage LUN (c4t60000970000297000217533030373445d0s0) is under control
of metadevice d888 which is having two soft partitions d890 and d891. Customer
want to mirror this LUN to another LUN from different storage. For mirroring,
we need to add both the LUNs under a Main Mirror in SVM. However, the source
LUN is having soft partitions so we cannot simply add this LUN under main
mirror.
Resolution:
1. Remove the Soft
partitions from the meta device and note down the starting and ending block
details.
2. Add the Meta
Device under the control of Main Mirror.
3. Create the Soft
partitions on the Main Mirror.
4. Create Meta Device
on new LUN and add it under Main Mirror.
Note: This process
involves downtime because the mount points needs to be unmounted which are
using the soft partitions. Before initiating with the procedure, take latest
backup of these mount points.
Procedure:
1. Note down the
MetaDevice and soft partition details from the output of metastat –p command.
d888 1 1
c4t60000970000297000217533030373445d0s0
d891 -p d888 -o 104861504 -b
102760448
d890 -p d888 -o 3872 -b 104857600
Here d888 is the Meta Device and d890 and d891 are the soft
partitions and they are mounted on the server as below:
/dev/md/dsk/d890
49G 1.0G 48G
3% /test1
/dev/md/dsk/d891
48G 49M 48G
1% /test2
2. Unmount the mount
points
3. Clear the Soft
Partitions
root@test # metaclear d890
d890: Soft Partition is cleared
root@test # metaclear d891
d891: Soft Partition is cleared
4. Add the metadevice
d888 to Main Mirror d880
root@test # metainit d880 -m d888
d880: Mirror is setup
5. Verify the Main
Mirror Properties of d880
root@gnnems25 # metastat d880
d880: Mirror
Submirror 0: d888
State: Okay
Pass: 1
Read
option: roundrobin (default)
Write
option: parallel (default)
Size:
209710080 blocks (99 GB)
d888: Submirror of d880
State:
Okay
Size:
209710080 blocks (99 GB)
Stripe
0:
Device
Start Block Dbase State Reloc
Hot Spare
c4t60000970000297000217533030373445d0s0
0
No
Okay Yes
6. Create the soft
partitions on the Main Mirror referring the output of metastat –p in step 1.
root@test # metainit d891 -p d880 -o
104861504 -b 102760448
d891: Soft Partition is setup
root@test # metainit d890 -p d880 -o
3872 -b 104857600
d890: Soft Partition is setup
7. Mount the Soft
partitions to verify the data integrity.
root@test # mount /dev/md/dsk/d890
/test1
root@test # mount /dev/md/dsk/d891
/test2
Verify the Size details in df –h, which will be same as
earlier and data will be accessible.
/dev/md/dsk/d890
49G 1.0G 48G 3%
/test1
/dev/md/dsk/d891
48G 49M
48G 1% /test2
8. Create MetaDevice
on the new LUN and add the new MetaDevice under main mirror d880 using
standard procedure.