免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 7239 | 回复: 22
打印 上一主题 下一主题

V880 内部磁盘SVM+Raid5 更换笔录 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-23 13:50 |只看该作者 |倒序浏览
最近刚刚换了V880磁盘,把过程整理了下,供全国兄弟们审核。{:3_198:}



root@Master_DR # metastat d60
d60: RAID
    State: Need Maintenance   
    Interlace: 32 blocks
    Size: 430007232 blocks (205 GB)
Original device:
    Size: 430016352 blocks (205 GB)
        Device     Start Block  Dbase        State Reloc  Hot Spare
        c1t1d0s2      10506        No         Okay   Yes
        c1t2d0s2      10506        No         Okay   Yes
        c1t4d0s2      10506        No         Okay   Yes
        c1t5d0s2      10506        No    Maintenance   Yes  ------------c1t5d0s2-磁盘故障

Device Relocation Information:
Device   Reloc  Device ID
c1t1d0   Yes    id1,ssd@w20000011c6a8cbab
c1t2d0   Yes    id1,ssd@w20000011c6ac59c6
c1t4d0   Yes    id1,ssd@w20000011c6a887eb
c1t5d0   Yes    id1,ssd@w20000011c647186a



root@Master_DR # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a8fda1,0
       1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a8cbab,0
       2. c1t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6ac59c6,0
       3. c1t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6ac4cf7,0
       4. c1t4d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a887eb,0
       5. c1t5d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c647186a,0
       6. test <drive type unknown>
          /pseudo/md@0

root@Master_DR # luxadm probe                  ---------探测阵列信息
Found Enclosure:
SUNWGS INT FCBPL   Name:FCloop   Node WWN:50800200001fd5b8   Logical Path:/dev/es/ses0

Found Fibre Channel device(s):
  Node WWN:500104f00061c4c2  Device Type:Tape device
    Logical Path:/dev/rmt/0n
  Node WWN:500104f00061c4bc  Device Type:Tape device
    Logical Path:/dev/rmt/1n
  Node WWN:500104f00061c4b9  Device Type:Tape device
    Logical Path:/dev/rmt/2n
  Node WWN:500104f00061c4b6  Device Type:Tape device
Logical Path:/dev/rmt/3n
------------------------------------------------------------------------

论坛徽章:
0
2 [报告]
发表于 2010-06-23 13:51 |只看该作者
root@Master_DR # luxadm display /dev/rdsk/c1t5d0s2    ------查看故障磁盘信息,下一个方法也可行
DEVICE PROPERTIES for disk: /dev/rdsk/c1t5d0s2
  Status(Port A):       O.K.
  Vendor:               SEAGATE
  Product ID:           ST373307FSUN72G
  WWN(Node):            20000011c647186a
  WWN(Port A):          21000011c647186a
  Revision:             0307
  Serial Num:           3HZ9NA4N0000
  Unformatted capacity: 70007.195 MBytes
  Read Cache:           Enabled
    Minimum prefetch:   0x0
    Maximum prefetch:   0xffff
  Location:             In slot 5 in the enclosure named: FCloop
  Device Type:          Disk device
  Path(s):
  /dev/rdsk/c1t5d0s2
  /devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c647186a,0:c,raw

root@Master_DR # luxadm disp FCloop

                SUNWGS INT FCBPL
                 DISK STATUS
SLOT   DISKS             (Node WWN)         
0      On (O.K.)         20000011c6a8fda1   
1      On (O.K.)         20000011c6a8cbab   
2      On (O.K.)         20000011c6ac59c6   
3      On (O.K.)         20000011c6ac4cf7   
4      On (O.K.)         20000011c6a887eb   
5      On (O.K.)         20000011c647186a   
6      On (Login failed)                     
7      On (Login failed)                     
8      On (Login failed)                     
9      On (Login failed)                     
10     On (Login failed)                     
11     On (Login failed)                     
                SUBSYSTEM STATUS
FW Revision:922A   Box ID:0
  Node WWN:50800200001fd5b8   Enclosure Name:FCloop
SSC100's - 0=Base Bkpln, 1=Base LoopB, 2=Exp Bkpln, 3=Exp LoopB
    SSC100 #0:    O.K.(922A/ 8D3C)
    SSC100 #1:    O.K.(922A/ 8D3C)
    SSC100 #2:    Not Installed
    SSC100 #3:    Not Installed
          Temperature Sensors - 0 Base, 1 Expansion                       
          0:25篊
                1Not Installed
Backplanes - A=Base, B=Expansion                                
        A: O.K.
        B: Not Installed
Default Language is USA English, ASCII                          
you have mail in /var/mail/root

论坛徽章:
0
3 [报告]
发表于 2010-06-23 13:52 |只看该作者
root@Master_DR # luxadm disp FCloop,s5
DEVICE PROPERTIES for disk: FCloop,s5
  Status(Port A):       O.K.
  Vendor:               SEAGATE
  Product ID:           ST373307FSUN72G
  WWN(Node):            20000011c647186a
  WWN(Port A):          21000011c647186a
  Revision:             0307
  Serial Num:           3HZ9NA4N0000
  Unformatted capacity: 70007.195 MBytes
  Read Cache:           Enabled
    Minimum prefetch:   0x0
    Maximum prefetch:   0xffff
  Location:             In slot 5 in the enclosure named: FCloop
  Device Type:          Disk device
  Path(s):
  /dev/rdsk/c1t5d0s2
  /devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c647186a,0:c,raw

-----------------------------------------------------------------------------------------------------------准备开始更换了

root@Master_DR # df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d10      10327372 5160025 5064074     51%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
/dev/md/dsk/d30      8263373  661682 7519058      9%    /var
swap                 28363072     200 28362872     1%    /var/run
swap                 28367432    4560 28362872     1%    /tmp
/dev/md/dsk/d40      12397228 4016501 8256755    33%    /opt
/dev/md/dsk/d50      8263373 2645944 5534796    33%    /export/home
/dev/md/dsk/d60      211757965 160893795 48746591    77%    /catalog

root@Master_DR # fuser -cu /catalog              ------------查看是否有进程使用文件系统,如果有当然是需要杀掉,呵呵
/catalog:


root@Master_DR # luxadm remove_device /dev/rdsk/c1t5d0s2     或者 luxadm remove_device FCloop,s5

WARNING!!! Please ensure that no filesystems are mounted on these device(s).
All data on these devices should have been backed up.


The list of devices which will be removed is:
  1: Box Name:    "FCloop" slot 5
     Node WWN:    20000011c647186a
     Device Typeisk device
     Device Paths:
      /dev/rdsk/c1t5d0s2


Please verify the above list of devices and
then enter 'c' or <CR> to Continue or 'q' to Quit. [Default: c]:
stopping:  Drive in "FCloop" slot 5....Done
offlining: Drive in "FCloop" slot 5....Done

Hit <Return> after removing the device(s).
Drive in Box Name "FCloop" slot 5
  Logical Nodes being removed under /dev/dsk/ and /dev/rdsk:
  Logical Nodes being removed under /dev/dsk/ and /dev/rdsk:
        c1t5d0s0
        c1t5d0s1
        c1t5d0s2
        c1t5d0s3
        c1t5d0s4
        c1t5d0s5
        c1t5d0s6
        c1t5d0s7

论坛徽章:
0
4 [报告]
发表于 2010-06-23 13:54 |只看该作者
root@Master_DR # luxadm insert_device FCloop,s5         
The list of devices which will be inserted is:
  1: Box Name:    "FCloop" slot 5       


Please verify the above list of devices and
then enter 'c' or <CR> to Continue or 'q' to Quit. [Default: c]:

Hit <Return> after inserting the device(s).

  Drive in Box Name "FCloop" slot 5
  Waiting for the logical node to be created:.................................

root@Master_DR # format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a8fda1,0
       1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a8cbab,0
       2. c1t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6ac59c6,0
       3. c1t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6ac4cf7,0
       4. c1t4d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a887eb,0
       5. c1t5d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010a73891,0

       6. test <drive type unknown>
          /pseudo/md@0

root@Master_DR # luxadm disp FCloop

                SUNWGS INT FCBPL
                 DISK STATUS
SLOT   DISKS             (Node WWN)         
0      On (O.K.)         20000011c6a8fda1   
1      On (O.K.)         20000011c6a8cbab   
2      On (O.K.)         20000011c6ac59c6   
3      On (O.K.)         20000011c6ac4cf7   
4      On (O.K.)         20000011c6a887eb   
5      On (O.K.)         500000e010a73890   
6      On (Login failed)                     
7      On (Login failed)                     
8      On (Login failed)                     
9      On (Login failed)                     
10     On (Login failed)                     
11     On (Login failed)                     
                SUBSYSTEM STATUS
FW Revision:922A   Box ID:0
  Node WWN:50800200001fd5b8   Enclosure Name:FCloop
SSC100's - 0=Base Bkpln, 1=Base LoopB, 2=Exp Bkpln, 3=Exp LoopB
    SSC100 #0:    O.K.(922A/ 8D3C)
    SSC100 #1:    O.K.(922A/ 8D3C)
    SSC100 #2:    Not Installed
    SSC100 #3:    Not Installed
          Temperature Sensors - 0 Base, 1 Expansion                       
          0:25篊
                1Not Installed
Backplanes - A=Base, B=Expansion                                
        A: O.K.
        B: Not Installed
Default Language is USA English, ASCII

论坛徽章:
0
5 [报告]
发表于 2010-06-23 13:55 |只看该作者
root@Master_DR #metastat

-------------------------------------------------
d60: RAID
    State: Okay         
    Interlace: 32 blocks
    Size: 430007232 blocks (205 GB)
Original device:
    Size: 430016352 blocks (205 GB)
        Device     Start Block  Dbase        State Reloc  Hot Spare
        c1t1d0s2      10506        No         Okay   Yes
        c1t2d0s2      10506        No         Okay   Yes
        c1t4d0s2      10506        No         Okay   Yes
        c1t5d0s2      10506        No         Okay   Yes

Device Relocation Information:
Device   Reloc  Device ID
c1t3d0   Yes    id1,ssd@w20000011c6ac4cf7
c1t0d0   Yes    id1,ssd@w20000011c6a8fda1
c1t1d0   Yes    id1,ssd@w20000011c6a8cbab
c1t2d0   Yes    id1,ssd@w20000011c6ac59c6
c1t4d0   Yes    id1,ssd@w20000011c6a887eb
c1t5d0   Yes    id1,ssd@w20000011c647186a

此时虽更换了系统磁盘,但是SVM并未更新相关信息,数据也并未同步。需要手工available

论坛徽章:
0
6 [报告]
发表于 2010-06-23 13:58 |只看该作者
root@Master_DR # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a8fda1,0
       1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a8cbab,0
       2. c1t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6ac59c6,0
       3. c1t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6ac4cf7,0
       4. c1t4d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a887eb,0
       5. c1t5d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010a73891,0

       6. test <drive type unknown>
          /pseudo/md@0
Specify disk (enter its number): 5
selecting c1t5d0
[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> p


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> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0        usr    wm       1 - 14086       68.35GB    (14086/0/0) 143339136           注:由于磁盘原使用vxvm做过卷,其2号分区并非Solaris
  1 unassigned    wm       0                0         (0/0/0)             0              类型磁盘。需要手工对其进行重新分区,当然此处也可
  2 unassigned    wm       0                0         (0/0/0)             0             使用:prtvtoc和fmthard实现
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7        usr    wu       0 -     0        4.97MB    (1/0/0)         10176

partition> 0
Part      Tag    Flag     Cylinders         Size            Blocks
  0        usr    wm       1 - 14086       68.35GB    (14086/0/0) 143339136

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting cyl[1]: 0
Enter partition size[143339136b, 14086c, 14085e, 69989.81mb, 68.35gb]: 0
partition> p
Current partition table (unnamed):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders     Size            Blocks
  0 unassigned    wm       0            0         (0/0/0)     0
  1 unassigned    wm       0            0         (0/0/0)     0
  2 unassigned    wm       0            0         (0/0/0)     0
  3 unassigned    wm       0            0         (0/0/0)     0
  4 unassigned    wm       0            0         (0/0/0)     0
  5 unassigned    wm       0            0         (0/0/0)     0
  6 unassigned    wm       0            0         (0/0/0)     0
  7        usr    wu       0 - 0        4.97MB    (1/0/0) 10176

partition> 7
Part      Tag    Flag     Cylinders     Size            Blocks
  7        usr    wu       0 - 0        4.97MB    (1/0/0) 10176

Enter partition id tag[usr]:
Enter partition permission flags[wu]:
Enter new starting cyl[0]: 0
Enter partition size[10176b, 1c, 0e, 4.97mb, 0.00gb]: 0
partition> p
Current partition table (unnamed):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders     Size            Blocks
  0 unassigned    wm       0            0         (0/0/0) 0
  1 unassigned    wm       0            0         (0/0/0) 0
  2 unassigned    wm       0            0         (0/0/0) 0
  3 unassigned    wm       0            0         (0/0/0) 0
  4 unassigned    wm       0            0         (0/0/0) 0
  5 unassigned    wm       0            0         (0/0/0) 0
  6 unassigned    wm       0            0         (0/0/0) 0
  7 unassigned    wu       0            0         (0/0/0) 0

partition> 2
Part      Tag    Flag     Cylinders     Size            Blocks
  2 unassigned    wm       0            0         (0/0/0) 0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:      
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 14087c
partition> p
Current partition table (unnamed):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)             0
  1 unassigned    wm       0                0         (0/0/0)             0
2 unassigned    wm       0 - 14086       68.35GB    (14086/0/0) 143339136
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wu       0                0         (0/0/0)             0
partition> l
Ready to label disk, continue? y

partition> q

论坛徽章:
0
7 [报告]
发表于 2010-06-23 14:00 |只看该作者
root@Master_DR # metareplace -e d60 c1t5d0s2              --------手工available和resync
d60: device c1t5d0s2 is replaced with c1t5d0s2

root@Master_DR # metastat
---------------------------------
d60: RAID
    State: Resyncing   
    Resync in progress:  0.0% done                        --------------  已经开始同步了    Interlace: 32 blocks
    Size: 430007232 blocks (205 GB)
Original device:
    Size: 430016352 blocks (205 GB)
        Device     Start Block  Dbase        State Reloc  Hot Spare
        c1t1d0s2      10506        No         Okay   Yes
        c1t2d0s2      10506        No         Okay   Yes
        c1t4d0s2      10506        No         Okay   Yes
       c1t5d0s2      10506        No    Resyncing   Yes


Device Relocation Information:
Device   Reloc  Device ID
c1t3d0   Yes    id1,ssd@w20000011c6ac4cf7
c1t0d0   Yes    id1,ssd@w20000011c6a8fda1
c1t1d0   Yes    id1,ssd@w20000011c6a8cbab
c1t2d0   Yes    id1,ssd@w20000011c6ac59c6
c1t4d0   Yes    id1,ssd@w20000011c6a887eb
c1t5d0   Yes    id1,ssd@w500000e010a73890


root@Master_DR # mount /dev/md/dsk/d60 /catalog               -----------------挂载文件系统
root@Master_DR # df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d10      10327372 5160027 5064072    51%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
/dev/md/dsk/d30      8263373  661700 7519040     9%    /var
swap                 28358856     200 28358656     1%    /var/run
swap                 28363216    4560 28358656     1%    /tmp
/dev/md/dsk/d40      12397228 4016501 8256755    33%    /opt
/dev/md/dsk/d50      8263373 2646227 5534513    33%    /export/home
/dev/md/dsk/d60      211757965 160893795 48746591    77%    /catalog

root@Master_DR # iostat -xnDpz 2 10
                    extended device statistics
r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
    0.0    1.5    0.0    3.0  0.0  0.0    2.7   11.5   0   1 d50
    0.0    1.5    0.0    3.0  0.0  0.0    0.0    9.7   0   1 d51
    0.0    1.5    0.0    3.0  0.0  0.0    0.0   10.6   0   1 d52
    8.0    0.0 8157.4    0.0  0.0  0.1    0.0   10.6   0   8 c1t4d0
    8.0    0.0 8157.4    0.0  0.0  0.1    0.0   10.6   0   8 c1t4d0s2
    8.0    0.0 8157.4    0.0  0.0  0.1    0.0   10.6   0   8 c1t1d0
    8.0    0.0 8157.4    0.0  0.0  0.1    0.0   10.6   0   8 c1t1d0s2
    0.0    3.0    0.0    3.7  0.0  0.0    0.0    7.9   0   2 c1t0d0
    0.0    1.5    0.0    3.0  0.0  0.0    0.0    9.7   0   1 c1t0d0s5
    0.0    1.5    0.0    0.7  0.0  0.0    0.0    6.1   0   1 c1t0d0s7
    8.0    0.0 8157.3    0.0  0.0  0.1    0.0   10.6   0   8 c1t2d0
    8.0    0.0 8157.3    0.0  0.0  0.1    0.0   10.6   0   8 c1t2d0s2
    0.0    3.0    0.0    3.7  0.0  0.0    0.0    8.9   0   2 c1t3d0
    0.0    1.5    0.0    3.0  0.0  0.0    0.0   10.5   0   1 c1t3d0s5
    0.0    1.5    0.0    0.7  0.0  0.0    0.0    7.2   0   1 c1t3d0s7
    0.0    8.0    0.0 8157.2  0.0  0.2    0.0   21.0   0  17 c1t5d0                  ------------速度8M/s,漫长等待


-----------------------------------------------完毕------------------------------------------------------------------------------------

论坛徽章:
0
8 [报告]
发表于 2010-06-23 14:03 |只看该作者
自己顶一下。

论坛徽章:
0
9 [报告]
发表于 2010-06-23 14:18 |只看该作者
辛苦了,

不过不用umount也行

论坛徽章:
0
10 [报告]
发表于 2010-06-23 14:36 |只看该作者
辛苦了兄弟,我代表全国兄弟们来围观。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP