免费注册 查看新帖 |

Chinaunix

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

metainit遇到there are no existing databases [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-08-30 16:37 |只看该作者 |倒序浏览
Solaris 系统遇到如下问题,请高手指教!!!


情况说明: 原来磁盘已经被分区作为裸设备使用,但是想空间利用率不高,想使用另一种方式创建裸设备
  原来的裸设备方式: 一个分区作为一个裸设备
  现在的想法: 创建一个分区,在该分区上建11块分别为200M的裸设备

操作如下:

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

AVAILABLE DISK SELECTIONS:
  0. c0d0 <SUN-DiskImage-30GB cyl 851 alt 2 hd 96 sec 768>
  /virtual-devices@100/channel-devices@200/disk@0
  1. c0d1 <SUN-DiskImage-30GB cyl 851 alt 2 hd 96 sec 768>
  /virtual-devices@100/channel-devices@200/disk@1
  2. c0d2 <SUN-DiskImage-30GB cyl 851 alt 2 hd 96 sec 768>
  /virtual-devices@100/channel-devices@200/disk@2
Specify disk (enter its number): 1
selecting c0d1
[disk formatted, no defect list found]
  

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> 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: 851 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
  0 unassigned wm 1 - 6 216.00MB (6/0/0) 442368
  1 unassigned wm 7 - 12 216.00MB (6/0/0) 442368
  2 backup wm 0 - 850 29.92GB (851/0/0) 62742528
  3 unassigned wm 13 - 18 216.00MB (6/0/0) 442368
  4 unassigned wm 19 - 24 216.00MB (6/0/0) 442368
  5 unassigned wm 25 - 30 216.00MB (6/0/0) 442368
  6 unassigned wm 31 - 36 216.00MB (6/0/0) 442368
  7 unassigned wm 37 - 42 216.00MB (6/0/0) 442368

partition> 7
Part Tag Flag Cylinders Size Blocks
  7 unassigned wm 37 - 42 216.00MB (6/0/0) 442368

Enter partition id tag[unassigned]:  
Enter partition permission flags[wm]:  
Enter new starting cyl[37]:  
Enter partition size[442368b, 6c, 42e, 216.00mb, 0.21gb]: 6gb
partition> label
Ready to label disk, continue? yes

partition> p
Current partition table (original):
Total disk cylinders available: 851 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
  0 unassigned wm 1 - 6 216.00MB (6/0/0) 442368
  1 unassigned wm 7 - 12 216.00MB (6/0/0) 442368
  2 backup wm 0 - 850 29.92GB (851/0/0) 62742528
  3 unassigned wm 13 - 18 216.00MB (6/0/0) 442368
  4 unassigned wm 19 - 24 216.00MB (6/0/0) 442368
  5 unassigned wm 25 - 30 216.00MB (6/0/0) 442368
  6 unassigned wm 31 - 36 216.00MB (6/0/0) 442368
  7 unassigned wm 37 - 207 6.01GB (171/0/0) 12607488

partition> q
  

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> q
bash-3.00# metainit d11 -p /dev/dsk/c0d1s7 200M
metainit: vs003g004: there are no existing databases


bash-3.00# cd /dev_symfoware/
bash-3.00# ls -l
1? 16
lrwxrwxrwx 1 root root 15 8・?6? 15:19 raw0 -> /dev/dsk/c0d1s0
lrwxrwxrwx 1 root root 15 8・?6? 15:20 raw1 -> /dev/dsk/c0d1s1
lrwxrwxrwx 1 root root 15 8・?6? 15:20 raw2 -> /dev/dsk/c0d1s3
lrwxrwxrwx 1 root root 15 8・?6? 15:22 raw3 -> /dev/dsk/c0d1s4
lrwxrwxrwx 1 root root 15 8・?6? 15:29 raw4 -> /dev/dsk/c0d1s5
lrwxrwxrwx 1 root root 15 8・?6? 15:30 raw5 -> /dev/dsk/c0d1s6
lrwxrwxrwx 1 root root 15 8・?6? 15:30 raw6 -> /dev/dsk/c0d1s7
lrwxrwxrwx 1 root root 15 8・?6? 15:33 raw8 -> /dev/dsk/c0d2s1
bash-3.00# ls -l /dev/dsk/c0d1s7
lrwxrwxrwx 1 root root 62 3・?8? 15:45 /dev/dsk/c0d1s7 -> ../../devices/virtual-devices@100/channel-devices@200/disk@1:h
bash-3.00# metaclear d6
metaclear: vs003g004: d6: ファイルもディレクトリもありません。

metaclear: vs003g004: there are no existing databases

bash-3.00# unlink /dev_symfoware/raw6
bash-3.00# metainit d11 -p /dev/dsk/c0d1s7 200M
metainit: vs003g004: there are no existing databases

论坛徽章:
221
15-16赛季CBA联赛之吉林
日期:2017-12-11 12:51:59黑曼巴
日期:2019-04-12 13:40:0515-16赛季CBA联赛之广东
日期:2019-04-23 10:41:1215-16赛季CBA联赛之辽宁
日期:2019-05-06 13:03:2815-16赛季CBA联赛之山西
日期:2019-05-09 10:56:5815-16赛季CBA联赛之青岛
日期:2019-05-17 13:57:0515-16赛季CBA联赛之新疆
日期:2019-06-10 13:39:0515-16赛季CBA联赛之天津
日期:2019-07-08 15:04:4519周年集字徽章-19
日期:2019-08-27 13:31:2619周年集字徽章-19
日期:2019-08-27 13:31:2619周年集字徽章-周
日期:2019-09-06 18:46:4715-16赛季CBA联赛之天津
日期:2019-02-27 11:24:07
2 [报告]
发表于 2011-08-30 20:19 |只看该作者
先创建metadb

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
3 [报告]
发表于 2011-08-31 07:59 |只看该作者
LZ好可爱

论坛徽章:
0
4 [报告]
发表于 2011-08-31 08:41 |只看该作者
仔细看操作步骤。

论坛徽章:
0
5 [报告]
发表于 2011-08-31 10:39 |只看该作者
之前操作过,并且成功了,步骤如下:

用format命令新建一个分区
-----------------------------------------------------------------------------------------------------------------
bash-3.00# format                 (查看已有盘的使用情况)
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0d0 <SUN-DiskImage-30GB cyl 851 alt 2 hd 96 sec 768>
          /virtual-devices@100/channel-devices@200/disk@0
       1. c0d1 <SUN-DiskImage-30GB cyl 851 alt 2 hd 96 sec 768>
          /virtual-devices@100/channel-devices@200/disk@1
       2. c0d2 <SUN-DiskImage-30GB cyl 851 alt 2 hd 96 sec 768>
          /virtual-devices@100/channel-devices@200/disk@2
Specify disk (enter its number): 1                (选择盘符1)
selecting c0d1
[disk formatted, no defect list found]


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> 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: 851 + 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     backup    wm       0 - 850       29.92GB    (851/0/0) 62742528
  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> 0                  (选择分区0)注:2 为盘的一共大小,不可以动
Part      Tag    Flag     Cylinders       Size            Blocks
  0 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]: 6gb       (输入分区大小)
partition> p                                 (查看分区是否成功等)
Current partition table (unnamed):
Total disk cylinders available: 851 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       0 - 170        6.01GB    (171/0/0) 12607488
  1 unassigned    wm       0              0         (0/0/0)          0
  2     backup    wm       0 - 850       29.92GB    (851/0/0) 62742528
  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> label                (保存分区信息)注:此步骤必须执行,否则分区不成功
Ready to label disk, continue? Yes               (是否保存?)

partition> q                   (退出)


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> q                            (退出)
---------------------------------------- ----------------------------------------------------------------
分区成功后,使用分区创建裸设备:
----------------------------------------------------------------------------------------------------
bash-3.00# metainit d1 -p /dev/dsk/c0d1s0 200M    (创建软分区)
d1: ソフトパーティションが設定されます
bash-3.00# metainit d2 -p /dev/dsk/c0d1s0 200M
d2: ソフトパーティションが設定されます
bash-3.00#  metastat                   (查看分区情况)
d2: ソフトパーティション
    デバイス: c0d1s0
    状態: 正常
    サイズ: 409600 ブロック (200 MB)
        デバイス       開始ブロック Dbase Reloc
        c0d1s0            73728     Yes   Yes

        Extent             開始ブロック               ブロック数
             0                   483330                   409600

d1: ソフトパーティション
    デバイス: c0d1s0
    状態: 正常
    サイズ: 409600 ブロック (200 MB)
        デバイス       開始ブロック Dbase Reloc
        c0d1s0            73728     Yes   Yes

        Extent             開始ブロック               ブロック数
             0                    73729                   409600

Device Relocation Information:
Device   Reloc  Device ID
c0d1   はい      id1,vdc@f8557d8424df5e25b000da6ae0012
bash-3.00# cd /                     (切换目录查看是否存在裸设备存放目录)
bash-3.00# mkdir dev_symfoware    (如果不存在,新建)
bash-3.00# chmod -R 777 dev_symfoware/    (设置裸设备目录权限)
bash-3.00# ln -s /dev/md/rdsk/d1 /dev_symfoware/raw1  (创建裸设备)
bash-3.00# ln -s /dev/md/rdsk/d2 /dev_symfoware/raw2
bash-3.00# ls -l /dev/md/rdsk    (改权限1)
合計 52
lrwxrwxrwx   1 root     root          36  7月 28日  11:36 d1 -> ../../../devices/pseudo/md@0:0,1,raw
bash-3.00# ls -l ../../../devices/pseudo/md@0:0,1,raw      (改权限2)
crw-r-----   1 root     sys       85,  1  7月 28日  11:36 ../../../devices/pseudo/md@0:0,1,raw
bash-3.00# chmod 777 ../../../devices/pseudo/md@0:0,1,raw        (改权限3)
bash-3.00# chmod 777 ../../../devices/pseudo/md@0:0,2,raw
-----------------------------------------------------------------------------------------------------------------

并没有创建matedb
另外,因为要操作的是远程服务器,不敢随便试验
能说的稍微详细些么,谢谢啦

论坛徽章:
0
6 [报告]
发表于 2011-08-31 10:41 |只看该作者
回复 3# 东方蜘蛛
因为什么都不懂,哎
无知的女人最可爱。。

论坛徽章:
0
7 [报告]
发表于 2011-08-31 11:38 |只看该作者
问题已解决,谢谢1楼

方法:
bash-3.00# metadb -af -c 2 /dev/dsk/c0d1s7
bash-3.00# metainit d11 -p /dev/dsk/c0d1s7 200M
d11: ソフトパーティションが設定されます

论坛徽章:
0
8 [报告]
发表于 2011-09-02 13:46 |只看该作者
{:3_189:}{:3_189:}

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
9 [报告]
发表于 2011-09-08 07:04 |只看该作者
日本女人。。。。。

论坛徽章:
0
10 [报告]
发表于 2011-09-08 11:56 |只看该作者
回复 9# 东方蜘蛛


    本人是标准的中国人
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP