Below we will show you an example on how to do it through the using of madmin and unix diskset tools like format etc. 1. split the mirror with: lockfs -af and then metadetach mirror submirror 2. madmin to replace the new disk: Entered madmin menu : root@localhost # madmin Machine Administration Menu 1. Hardware Configuration 2. Hardware Monitoring Information 3. RCI-related Settings 4. System Control Administration 5. extended System Control Facility (XSCF) Administration 6. Log Data 7. Hot Swapping Guide 8. FJVTS Diagnostic Program 9. Remote Customer Support System (REMCS) Setup 10. Hardware Control Program (HCP) Administration 11. Option Menu 12. Version Information 13. Exit Select(1-13,q,h):7 Hot Swapping Guide 1. The Faulty Hard Disk Drive Replacement (Hot Swap) 2. Preventive Maintenance of the Hard Disk Drive (Hot Swap) 3. Include the Hard Disk Drive after the Cold Maintenance 4. Power Supply Unit of Main Cabinet 5. Fan Unit of Main Cabinet 6. Power Supply Unit of Expansion Cabinet 7. Fan Unit of Expansion Cabinet Select(1-7,q,b,t,h): 2 Preventive Replacement for Disk Input the disk name to be replaced. One of the following notation can be used:
Instance Name(sdX) Device Special File Name(cXtXdXsX) Unit Name(PCI#X-ID#X, SCSI#X-ID#X, etc.) L: Select from a list. Select (name,l,q,b,t,h):c1t0d0s2 Preventive Replacement for Disk Disk name: /dev/rdsk/c1t0d0s0 (sd16: SCSI#1-PORT#0-ID#0) Disk error statistics information: Date Error count Nov 13 2010 : 1 Jan 10 2011 : 1 Are you going to replace this disk? Select (y,q,b,t,h):y Preventive Replacement for Disk Disk name: /dev/rdsk/c1t0d0s0 (sd16: SCSI#1-PORT#0-ID#0) This disk is going to be logically excluded. Input y to continue. Select (y,q,b,t,h):y Disk to be replaced /dev/rdsk/c1t0d0s0 (sd16: SCSI#1-PORT#0-ID#0) Are you sure to start replacement by hot swap?(y,n):y Target disk can be located by LED.Please change disk. (At this point the engineer physically replaces the disk.)
1: disk change has finished. 2: disk change has been aborted. Please enter 1 or 2. 1 Completed Hit return key. Hot Swapping Guide 1. The Faulty Hard Disk Drive Replacement (Hot Swap) 2. Preventive Maintenance of the Hard Disk Drive (Hot Swap) 3. Include the Hard Disk Drive after the Cold Maintenance 4. Power Supply Unit of Main Cabinet 5. Fan Unit of Main Cabinet 6. Power Supply Unit of Expansion Cabinet 7. Fan Unit of Expansion Cabinet Select(1-7,q,b,t,h):q Machine Administration Menu 1. Hardware Configuration 2. Hardware Monitoring Information 3. RCI-related Settings 4. System Control Administration 5. extended System Control Facility (XSCF) Administration 6. Log Data 7. Hot Swapping Guide 8. FJVTS Diagnostic Program 9. Remote Customer Support System (REMCS) Setup 10. Hardware Control Program (HCP) Administration 11. Option Menu 12. Version Information 13. Exit Select(1-13,q,h):q 3. format the new disk 1. c1t0d0 <FUJITSU-MAW3073NC-3701 cyl 24345 alt 2 hd 8 sec 737> /pci@83,4000/fjsv,ulsa@2/sd@0,0 Specify disk (enter its number): 1 selecting c1t0d0 [disk formatted] FORMAT MENU:
disk select a disk type select (define) a disk type partition select (define) a partition table current describe the current disk format format and analyze the disk repair repair a defective sector label write label to the disk analyze surface analysis defect defect list management backup search for backup labels verify read and display labels save save new disk/partition definitions inquiry show vendor, product and revision volname set 8-character volume name!<cmd> execute <cmd>, then return quit format> partition PARTITION MENU: 0 change `0 partition 1 change `1 partition 2 change `2 partition 3 change `3 partition 4 change `4 partition 5 change `5 partition 6 change `6 partition 7 change `7 partition select select a predefined table modify modify a predefined partition table name name the current table print display the current table label write partition map and label to the disk!<cmd> execute <cmd>, then return quit partition> print Current partition table (original): Total disk cylinders available: 24345 + 2 (reserved cylinders) 0 root wm 1423-4268 8.00GB (2846/0/0) 16780016 1 swap wu 0-1422 4.00GB (1423/0/0) 8390008
2 backup wm 0 24344 68.44GB (24345/0/0) 143538120 3 unassigned wm 4269-4442 500.93MB (174/0/0) 1025904 4 unassigned wm 4443-6577 6.00GB (2135/0/0) 12587960 5 var wm 6578-8712 6.00GB (2135/0/0) 12587960 6 unassigned wm 8713 24337 43.93GB (15625/0/0) 92125000 7 unassigned wm 24338 24344 20.15MB (7/0/0) 41272 partition> 0 0 root wm 0-5334 15.00GB (5335/0/0) 31455160 Enter partition id tag[root]: Enter partition permission flags[wm]: Enter new starting cyl[0]: Enter partition size[31455160b, 5335c, 15358.96mb, 15.00gb]: 5336c partition> 1 1 swap wu 5336 12093 19.00GB (6758/0/0) 39845168 Enter partition id tag[swap]: Enter partition permission flags[wu]: Enter new starting cyl[5336]: Enter partition size[39845168b, 6758c, 19455.65mb, 19.00gb]: 1423c partition> 3 3 unassigned wm 4269-4442 500.93MB (174/0/0) 1025904 Enter partition id tag[unassigned]: var Enter partition permission flags[wm]: Enter new starting cyl[4269]: 6759
Enter partition size[1025904b, 174c, 500.93mb, 0.49gb]: 1779c partition> 4 4 unassigned wm 4443-6577 6.00GB (2135/0/0) 12587960 Enter partition id tag[unassigned]: stand Enter partition permission flags[wm]: wu Enter new starting cyl[4443]: 8538 Enter partition size[12587960b, 2135c, 6146.46mb, 6.00gb]: 1779c partition> 5 5 var wm 6578-8712 6.00GB (2135/0/0) 12587960 Enter partition id tag[var]: stand Enter partition permission flags[wm]: Enter partition size[12587960b, 2135c, 6146.46mb, 6.00gb]: 1779c partition> 6 6 unassigned wm 8713 24337 43.93GB (15625/0/0) 92125000 Enter partition id tag[unassigned]: stand Enter partition permission flags[wm]: Enter new starting cyl[8713]: 12096 Enter partition size[72220104b, 12249c, 35263.72mb, 34.44gb]: 12231c partition> 7 7 unassigned wm 24338 24344 20.15MB (7/0/0) 41272
Enter partition id tag[unassigned]: stand Enter partition permission flags[wm]: Enter new starting cyl[24338]: 24327 Enter partition size[41272b, 7c, 20.15mb, 0.02gb]: 18c partition> print Current partition table (unnamed): Total disk cylinders available: 24345 + 2 (reserved cylinders) 0 root wm 0-5335 15.00GB (5336/0/0) 31461056 1 swap wu 5336-6758 4.00GB (1423/0/0) 8390008 2 backup wm 0 24344 68.44GB (24345/0/0) 143538120 3 var wm 6759-8537 5.00GB (1779/0/0) 10488984 4 stand wu 8538 10316 5.00GB (1779/0/0) 10488984 5 stand wm 10317 12095 5.00GB (1779/0/0) 10488984 6 stand wm 12096 24326 34.39GB (12231/0/0) 72113976 7 stand wm 24327 24344 51.82MB (18/0/0) 106128 partition> label Ready to label disk, continue? y partition> print Current partition table (unnamed): Total disk cylinders available: 24345 + 2 (reserved cylinders) 0 root wm 0-5335 15.00GB (5336/0/0) 31461056 1 swap wu 5336-6758 4.00GB (1423/0/0) 8390008 2 backup wm 0 24344 68.44GB (24345/0/0) 143538120 3 var wm 6759-8537 5.00GB (1779/0/0) 10488984 4 stand wu 8538 10316 5.00GB (1779/0/0) 10488984 5 stand wm 10317 12095 5.00GB (1779/0/0) 10488984 6 stand wm 12096 24326 34.39GB (12231/0/0) 72113976 7 stand wm 24327 24344 51.82MB (18/0/0) 106128 partition> quit 4. rebuild the mirror
metattach mirror submirror if mirror already exits. metattach d0 d20 (only this step needed) if newly build one mirror. metainit d14 1 1 c1t0d0s4 metainit d4 -m d14 metattach d4 d24 Ref partition> p Current partition table (original): Total disk cylinders available: 24345 + 2 (reserved cylinders) 0 root wm 0-5335 15.00GB (5336/0/0) 31461056 1 swap wu 5336-6758 4.00GB (1423/0/0) 8390008 2 backup wm 0 24344 68.44GB (24345/0/0) 143538120 3 var wm 6759-8537 5.00GB (1779/0/0) 10488984 4 stand wu 8538 10316 5.00GB (1779/0/0) 10488984 5 stand wm 10317 12095 5.00GB (1779/0/0) 10488984 6 stand wm 12096 24326 34.39GB (12231/0/0) 72113976 7 stand wu 24327 24344 51.82MB (18/0/0) 106128 root@localhost # metastat -p d0 -m d20 1 d20 1 1 c0t0d0s0 d1 -m d21 1 d21 1 1 c0t0d0s1 d3 -m d23 1 d23 1 1 c0t0d0s3 d4 -m d14 1 d14 1 1 c1t0d0s4 d5 -m d25 1 d25 1 1 c0t0d0s5 d6 -m d26 1 d26 1 1 c0t0d0s6 d10 1 1 c1t0d0s0 d11 1 1 c1t0d0s1 d13 1 1 c1t0d0s3 d15 1 1 c1t0d0s5 d16 1 1 c1t0d0s6
d24 1 1 c0t0d0s4 Change dump device so that it isn t using c1t0d0: root@localhost # dumpadm -d /dev/dsk/c0t0d0s4 Dump content: kernel pages Dump device: /dev/dsk/c0t0d0s4 (dedicated) Savecore directory: /var/crash/localhost Savecore enabled: yes root@localhost # dumpadm Dump content: kernel pages Dump device: /dev/dsk/c0t0d0s4 (dedicated) Savecore directory: /var/crash/localhost Savecore enabled: yes Remove metadevices d4, d14 and d24: root@localhost # metaclear -r d4 d4: Mirror is cleared d14: Concat/Stripe is cleared root@localhost # metaclear d24 Remove metadb replicas from c1t0d0: root@localhost # metadb -d /dev/dsk/c1t0d0s7 root@localhost # metadb -i flags first blk block count a m p luo 16 1034 /dev/dsk/c0t0d0s7 a p luo 1050 1034 /dev/dsk/c0t0d0s7 a p luo 2084 1034 /dev/dsk/c0t0d0s7 o replica active prior to last mddb configuration change u replica is up to date l locator for this replica was read successfully c replica s location was in /etc/lvm/mddb.cf p replica s location was patched in kernel m replica is master, this is replica selected as input
W replica has device write errors a replica is active, commits are occurring to this replica M replica had problem with master blocks D replica had problem with data blocks F replica had format problems S replica is too small to hold current data base R replica had device read errors