免费注册 查看新帖 |

Chinaunix

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

两块大小略有不同的硬盘如何分片做zfs mirror [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-18 08:56 |只看该作者 |倒序浏览
10可用积分
两块硬盘,第一快略小一点,现在想把第二快添加为镜像,但不知道怎么分片,用

prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2

提示:
fmthard: Partition 0 overlaps partition 2. Overlap is allowed
        only on partition on the full disk partition).

请各位指教。







bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>  solaris
          /pci@400/pci@0/pci@8/scsi@0/sd@0,0
       1. c1t1d0 <SEAGATE-ST914603SSUN146G-0768-136.73GB>
          /pci@400/pci@0/pci@8/scsi@0/sd@1,0
       2. c4t60060160C3311E00A077C625AE54DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e00a077c625ae54de11
       3. c4t60060160C3311E00F6A0A1DCC855DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e00f6a0a1dcc855de11
       4. c4t60060160C3311E001A60CBE8C855DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e001a60cbe8c855de11
       5. c4t60060160C3311E001E09B5BA9D54DE11d0 <DGC-RAID5-0326 cyl 61438 alt 2 hd 1 sec 10>
          /scsi_vhci/ssd@g60060160c3311e001e09b5ba9d54de11
       6. c4t60060160C3311E005827E0229E54DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e005827e0229e54de11
       7. c4t60060160C3311E0032315E169E54DE11d0 <DGC-RAID5-0326 cyl 61438 alt 2 hd 1 sec 10>
          /scsi_vhci/ssd@g60060160c3311e0032315e169e54de11
Specify disk (enter its number): 0
selecting c1t0d0: solaris
[disk formatted]
/dev/dsk/c1t0d0s2 is part of active ZFS pool rpool. Please see zpool(1M).


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

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 14086      136.71GB    (14087/0/0) 286698624
  1 unassigned    wm       0                0         (0/0/0)             0
  2     backup    wm       0 - 14086      136.71GB    (14087/0/0) 286698624
  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    wm       0                0         (0/0/0)             0

partition> quit


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> disk


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>  solaris
          /pci@400/pci@0/pci@8/scsi@0/sd@0,0
       1. c1t1d0 <SEAGATE-ST914603SSUN146G-0768-136.73GB>
          /pci@400/pci@0/pci@8/scsi@0/sd@1,0
       2. c4t60060160C3311E00A077C625AE54DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e00a077c625ae54de11
       3. c4t60060160C3311E00F6A0A1DCC855DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e00f6a0a1dcc855de11
       4. c4t60060160C3311E001A60CBE8C855DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e001a60cbe8c855de11
       5. c4t60060160C3311E001E09B5BA9D54DE11d0 <DGC-RAID5-0326 cyl 61438 alt 2 hd 1 sec 10>
          /scsi_vhci/ssd@g60060160c3311e001e09b5ba9d54de11
       6. c4t60060160C3311E005827E0229E54DE11d0 <DGC-RAID5-0326 cyl 51198 alt 2 hd 256 sec 16>
          /scsi_vhci/ssd@g60060160c3311e005827e0229e54de11
       7. c4t60060160C3311E0032315E169E54DE11d0 <DGC-RAID5-0326 cyl 61438 alt 2 hd 1 sec 10>
          /scsi_vhci/ssd@g60060160c3311e0032315e169e54de11
Specify disk (enter its number)[0]: 1
selecting c1t1d0
[disk formatted]
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
        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 sectors available: 286722911 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
  0        usr    wm               256      136.72GB          286722911   
  1 unassigned    wm                 0           0               0   
  2 unassigned    wm                 0           0               0   
  3 unassigned    wm                 0           0               0   
  4 unassigned    wm                 0           0               0   
  5 unassigned    wm                 0           0               0   
  6 unassigned    wm                 0           0               0   
  8   reserved    wm         286722912        8.00MB          286739295   

partition>  ^C
bash-3.00# zpool status
  池:rpool
状态:ONLINE
清理:未请求
配置:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t0d0s0  ONLINE       0     0     0

错误:无已知的数据错误
bash-3.00#

最佳答案

查看完整内容

执行format -e选c1t1d0盘号1,进去后执行label,选择SMI,也就是默认的0,你这个被人家用EFI格式化过了。bash-3.00# format -eSearching for disks...doneAVAILABLE DISK SELECTIONS: 0. c0t0d0 /pci@1f,0/ide@d/dad@0,0 1. c0t2d0 /pci@1f,0/ide@d/dad@2,0Specify disk (enter its number): 1selecting c0t2d0[disk formatted, no defect list found]/dev/dsk/c0t2d0s6 contains an SVM mdb. Ple ...

论坛徽章:
0
2 [报告]
发表于 2009-11-18 08:56 |只看该作者
执行format -e
选c1t1d0盘号1,进去后执行label,选择SMI,也就是默认的0,你这个被人家用EFI格式化过了。
bash-3.00# format -e
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <ST380011A cyl 38307 alt 2 hd 16 sec 255>
          /pci@1f,0/ide@d/dad@0,0
       1. c0t2d0 <ST380011A cyl 38307 alt 2 hd 16 sec 255>
          /pci@1f,0/ide@d/dad@2,0
Specify disk (enter its number): 1
selecting c0t2d0
[disk formatted, no defect list found]
/dev/dsk/c0t2d0s6 contains an SVM mdb. Please see metadb(1M).


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
        show       - translate a disk address
        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
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]:

论坛徽章:
0
3 [报告]
发表于 2009-11-18 09:01 |只看该作者
晕,你又是这个问题,

论坛徽章:
0
4 [报告]
发表于 2009-11-18 09:04 |只看该作者
完了后你再去执行prtvtoc  |fmthard 这个命令。应该就可以了。

论坛徽章:
0
5 [报告]
发表于 2009-11-18 09:06 |只看该作者
3楼正解

论坛徽章:
0
6 [报告]
发表于 2009-11-18 09:11 |只看该作者
硬盘要么就一样大小 要么就小很多,没有说差一点的 所以你这肯定是格式化不同。。

论坛徽章:
0
7 [报告]
发表于 2009-11-18 13:55 |只看该作者
问题解决,多谢各位。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP