存储 频道

镜像系统的硬盘扩容方案(10)

 
附录
 
说明:附录中记录的是本次操作中的一些失误,和一些容易产生错误应该多注意的地方。
 
1.       分区柱面交叉时建立镜像会抱错
 
第一次在用73硬盘更换了0号盘并分区后,因为当时的疏忽将分区的起始柱面算差,导致3个分区( / swap s6)的柱面出现交叉,但在没有作镜像前,系统没有报错,但在与另一个73G硬盘作同步分区表及建立metadb时均报错,具体情况如下:
 
root@xz_netman # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c33883a9,0
       1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): 0
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> 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       root    wm       0 - 12426       60.30GB    (12427/0/0) 126457152
 1       swap    wu   12426 - 14074        8.00GB    (1649/0/0)   16780224
 2     backup    wu       0 - 14086       68.35GB    (14087/0/0) 143349312
 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   14066 - 14086      104.34MB    (21/0/0)       213696
 7 unassigned    wm       0                0         (0/0/0)             0
partition> ^D
 
注:
1.此时的分区有2个地方出现交叉
 
a. / 分区的结束柱面与swap分区的开始柱面是相同的
 
b. Swap分区的结束柱面结束柱面14074 > 14066(s6分区的开始柱面)
 
2.       同步分区表时的报错:
 
root@xz_netman # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard: Partition 1 overlaps partition 0. Overlap is allowed
        only on partition on the full disk partition).
         3.若在分区柱面交叉没有解决的情况下进行镜像则会有如下报错:
root@xz_netman # metadb -afc 3 c1t0d0s6
root@xz_netman # metadb -afc 3 c1t1d0s6
root@xz_netman # metainit -f d11 1 1 c1t0d0s0
d11: Concat/Stripe is setup
root@xz_netman # metainit d12 1 1 c1t1d0s0 //d11和12没有报错是因为0号分区没有重叠柱面
d12: Concat/Stripe is setup
root@xz_netman # metainit -f d21 1 1 c1t0d0s1  
metainit: xz_netman: c1t0d0s1: overlaps with device in metadevice state database
//上面这个报错信息就是在有柱面重叠的情况下,建立镜像时的报错。
 
解决办法:可以在单用户状态下对swap分区和s6在线(系统运行的状态)进行分区调整,而不会破坏系统,因为系统文件不在这两个分区上。一旦柱面交叉的问题解决,prtvtoc复制分区表及建立镜像就都恢复正常了。
0
相关文章