Chinaunix

标题: 用了ZFS后。。。。已解决 [打印本页]

作者: terryhux    时间: 2009-05-11 23:10
标题: 用了ZFS后。。。。已解决
在一台机器上的一个新硬盘使用了ZFS,然后format中看到
Current partition table (original):
Total disk sectors available: 71116541 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector        Size        Last Sector
  0        usr    wm               256      33.91GB         71116541
  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          71116542       8.00MB         71132925

part7不见了,不知道怎样才能恢复以前那样,就是part0~7那样的,请教高手,谢谢!

[ 本帖最后由 terryhux 于 2009-5-12 11:30 编辑 ]
作者: longe    时间: 2009-05-11 23:15
format里重新type,label试试
作者: terryhux    时间: 2009-05-11 23:16
本来是2块盘做好了mirror的,我想弄一块盘来玩玩ZFS,玩是玩爽了,可是现在恢复不了以前的mirror了,实在是郁闷啊
作者: terryhux    时间: 2009-05-11 23:21
原帖由 longe 于 2009-5-11 23:15 发表
format里重新type,label试试

没用啊,现在是怎么弄都恢复不了了。。。。
作者: terryhux    时间: 2009-05-11 23:24
format> par


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

这里都没有part7的选项,part8也没有,完全不能操作
作者: terryhux    时间: 2009-05-11 23:29
现在这块盘能newfs后mount,就是不能恢复以前的mirror了,而且在format下面看到的这东西太囧了,ZFS啊。。。怎么搞的
作者: longe    时间: 2009-05-11 23:31
你要是2块盘,可以用第一块盘的分区覆盖第二块盘。
prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
假设c0t0d0是源系统盘,c0t1d0是zfs过的盘,注意别写反了
作者: terryhux    时间: 2009-05-11 23:34
原帖由 longe 于 2009-5-11 23:31 发表
你要是2块盘,可以用第一块盘的分区覆盖第二块盘。
prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
假设c0t0d0是源系统盘,c0t1d0是zfs过的盘,注意别写反了

这个我早就试过了,不行的,我一般做mirror的第一件事就是这样来一下

# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
fmthard: Partition 0 overlaps partition 2. Overlap is allowed
        only on partition on the full disk partition).
作者: terryhux    时间: 2009-05-12 00:19
现在这块盘连系统都不能装在上面了。。。。
作者: terryhux    时间: 2009-05-12 00:50
ZFS太强了。。。这块盘算是完了吗?
作者: terryhux    时间: 2009-05-12 09:43
求解啊。。。。。。。。。。。。。。。。。。。。。
作者: heroesray    时间: 2009-05-12 09:46
format -e ,选择smi标号。
作者: killer911    时间: 2009-05-12 09:47
format -e 恢复成SMI格式的label
作者: terryhux    时间: 2009-05-12 10:15
原帖由 killer911 于 2009-5-12 09:47 发表
format -e 恢复成SMI格式的label

format -e后
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
        inquiry    - show vendor, product and revision
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
多了几个选项,请问怎么恢复成SMI格式的label?
作者: killer911    时间: 2009-05-12 10:27
选盘,然后label
作者: sunshiene    时间: 2009-05-12 11:11
楼主应该已经搞好了吧
作者: terryhux    时间: 2009-05-12 11:26
原帖由 sunshiene 于 2009-5-12 11:11 发表
楼主应该已经搞好了吧

谢谢,刚刚才弄好,开始的时候不知道是用lab,被我用format,然后又被我强制中断,最后重启系统format后总算是好了
作者: zhangleo    时间: 2009-05-12 11:37
format -e一下  几OK
作者: 风之幻想    时间: 2009-05-12 16:40
学习。。。。。。。。。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2