ITPub博客

首页 > Linux操作系统 > Linux操作系统 > solaris 10 disksuite usage

solaris 10 disksuite usage

原创 Linux操作系统 作者:jolly10 时间:2008-11-21 12:29:50 0 删除 编辑

根据官方文档做了一下disksuite,记录一下!

参考文档:http://docs.sun.com/app/docs/doc/806-3205?l=en

[@more@]

1、在VMware的Summary View界面选择Edit virtual machine settings,add一个新hard disk,选择IDE方式,确定添加后在Devices中会看到多出一块Hard Disk 2(IDE 0:1)。


进入系统后,执行devfsadm命令,系统检测新增加的设备,这种方法不需要reboot,很好.

2.由于metadb不能安装在已使用过的分区上,所以就要在第一块磁盘上化出部分空间做为放metadb的分区,一般是从swap分区中分出部分空间来.步骤大致如下:
2.1. 修改/etc/vfstab文件启动时不mountswap分区
2.2. 启动到单用户模式(init 1)
2.3. swap -l查看现在已mount的swap分区,用命令swap -d /dev/dsk/c0d0s1来关闭swap分区
2.4. 用format命令来重新化分swap分区,我是将1.1G的swap改为900M,其作的空间建立另一个分区c0d0s3
2.5. 改回/etc/vfstab后重新启动
2.6.可用prtvtoc /dev/dsk/c0d0s3来验证一下新的分区

3.对第二块磁盘进行分区,大小同disk1

4.制作metadb
# metadb -a -f -c 3 c0d0s3 c0d1s3

# metadb
flags first blk block count
a u 16 8192 /dev/dsk/c0d0s3
a u 8208 8192 /dev/dsk/c0d0s3
a u 16400 8192 /dev/dsk/c0d0s3
a u 16 8192 /dev/dsk/c0d1s3
a u 8208 8192 /dev/dsk/c0d1s3
a u 16400 8192 /dev/dsk/c0d1s3


5.做/export/home的镜像
# umount /export/home

# metainit -f d1 1 1 c0d0s7
d1: Concat/Stripe is setup

# metainit d2 1 1 c0d1s7
d2: Concat/Stripe is setup

# metainit d0 -m d1
d0: Mirror is setup

# metattach d0 d2
d0: submirror d2 is attached

可以查看同步的状态
# metastat | grep %
Resync in progress: 27 % done
# metastat | grep %
Resync in progress: 32 % done

将m0 mount起来
# mount /dev/md/dsk/d0 /export/home
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 4413669 3339951 1029582 77% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 903076 880 902196 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
4413669 3339951 1029582 77% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 902244 48 902196 1% /tmp
swap 902224 28 902196 1% /var/run
/dev/md/dsk/d0 5324014 4908011 362763 94% /export/home

6.做swap的镜像,由于此分区不能umount,所以跟上面有点不同.

# metainit -f d31 1 1 c0d0s1
d31: Concat/Stripe is setup

# metainit d32 1 1 c0d1s1
d32: Concat/Stripe is setup

# metainit d3 -m d31
d3: Mirror is setup

# metattach d3 d32
d3: submirror d32 is attached

修改/etc/vfstab后重启
# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d3 - - swap - no -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0 / ufs 1 no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 /export/home ufs 2 yes -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -


7.做/的镜像
准备这个分区时的id tag必须是"root"
Its I.D. tag must be "root"


# metainit -f d41 1 1 c0d0s0
d41: Concat/Stripe is setup

# metainit d42 1 1 c0d1s0
d42: Concat/Stripe is setup

# metainit d4 -m d41
d4: Mirror is setup

# metaroot d4

--the metaroot command edits the /etc/vfstab and /etc/system files so that the system may be booted with the root file system (/) on a metadevice

# lockfs -fa

# reboot

# metattach d4 d42
d4: submirror d42 is attached

# ls -l /dev/dsk/c0d0s0
lrwxrwxrwx 1 root root 50 Jun 12 15:13 /dev/dsk/c0d0s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
# ls -l /dev/dsk/c0d1s0
lrwxrwxrwx 1 root root 50 Nov 20 16:37 /dev/dsk/c0d1s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:a

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271283/viewspace-1013666/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Oracle常用dump命令
请登录后发表评论 登录
全部评论

注册时间:2008-02-20

  • 博文量
    263
  • 访问量
    769124