免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: goldeneye
打印 上一主题 下一主题

求助volume manager! [复制链接]

论坛徽章:
0
11 [报告]
发表于 2002-12-02 12:46 |只看该作者

求助volume manager!

没错建议你用SDS做系统镜象。但是如果你觉得花了money买了VxVM,一定要用VxVM做根盘景象。也很简单。
1. 空余出S3,S4.留出部分空间。
2. vxinstall。

论坛徽章:
0
12 [报告]
发表于 2002-12-02 12:48 |只看该作者

求助volume manager!

milan说的对。检查/etc/vx/disks.exclude文件。

论坛徽章:
0
13 [报告]
发表于 2002-12-02 12:50 |只看该作者

求助volume manager!

This procedure shows the necessary steps to encapsulate and mirror your root disk if you choose to do it after vxinstall has already been run.
The options in vxdiskadm may vary slightly between Volume Manager
versions, however the procedure should be the virtually the same in all currently supported 2.x and 3.x Sun Enterprise Volume Manager[TM] (SEVM) and Veritas Volume Manager (VxVM) versions.  The examples below assume that the primary rootdisk is c0t0d0 and the mirror of root is c0t1d0.  It also assumes that we choose to name c0t0d0 rootdisk and c0t1d0 rootmir.  
Other names can be selected if desired.            

SOLUTION SUMMARY:

STEP 1----------------------------------------
Need patch: 111413-08   111904-05   111909-06  (2,8,6,4,5,3,7,1)
Run the following commands if the file doesn't exist under /etc/vx/slib:

      # cp /usr/lib/liba5k.so.2 /etc/vx/slib
      # cp /usr/lib/libdevice.so.1 /etc/vx/slib
      # cp /usr/lib/libsocket.so.1 /etc/vx/slib
      # cp /usr/lib/libdevinfo.so.1 /etc/vx/slib
      # cp /usr/lib/libmp.so /etc/vx/slib
      # cp /usr/lib/libthread.so.1 /etc/vx/slib
      # cp /usr/lib/libc.so.1 /etc/vx/slib
      # cp /usr/lib/libg_fc.so.2 /etc/vx/slib
      # cp /usr/lib/libnsl.so.1 /etc/vx/slib
      # cp /usr/lib/libnvpair.so.1 /etc/vx/slib
      # cp /usr/lib/libdevid.so.1 /etc/vx/slib

# vxinstall

  VxVM uses license keys to control access.  If you have a SPARCstorage
  Array (SSA) controller or a Sun Enterprise Network Array (SENA) controller

Are you prepared to enter a license key [y,n,q,?] (default: y) y
Please enter your key:  1234 5678 ….
Do you wish to enter another license key [y,n,q,?] (default: n) n
Do you want to use enclosure based names for all disks ?
[y,n,q,?] (default: n)  n

Hit RETURN to continue.

1      Quick Installation
2      Custom Installation
3      Prevent multipathing/Suppress devices from VxVM's view

?      Display help about menu
??     Display help about the menuing system
q      Exit from menus

Select an operation to perform: 1
Encapsulate Boot Disk [y,n,q,?] (default: n) y
Enter disk name for  [<name>;,q,?] (default: rootdisk) rootdisk
Hit RETURN to continue.

The following is a summary of your choices.

C0t0d0                          Encapsulate
c0t1d0     New Disk

Is this correct [y,n,q,?] (default: y) y

  The system now must be shut down and rebooted in order to continue
the reconfiguration.

Shutdown and reboot now [y,n,q,?] (default: n) y

We will encapsulate the primary root disk using vxdiskadm.


# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

1      Add or initialize one or more disks
2      Encapsulate one or more disks
3      Remove a disk
4      Remove a disk for replacement
5      Replace a failed or removed disk
6      Mirror volumes on a disk
7      Move volumes from a disk
8      Enable access to (import) a disk group
9      Remove access to (deport) a disk group
10     Enable (online) a disk device
11     Disable (offline) a disk device
12     Mark a disk as a hot-spare for a disk group
13     Turn off the hot-spare flag on a disk
list   List disk information

?      Display help about menu
??     Display help about the menuing system
q      Exit from menus

Select an operation to perform: 2

Encapsulate one or more disks
Menu: VolumeManager/Disk/Encapsulate

  Use this operation to convert one or more disks to use the Volume Manager.
  This adds the disks to a disk group and replaces existing partitions
  with volumes.  Disk encapsulation requires a reboot for the changes
  to take effect.

  More than one disk or pattern cab be entered at the prompt.  Here are
  some disk selection examples:

  all:          all disks
  c3 c4t2:      all disks on both controller 3 and controller 4, target 2
  c3t4d2:       a single disk

Select disk devices to encapsulate: [<pattern-list>;,all,list,q,?] c0t0d0

Here is the disk selected.  Output format: [Device_Name]

  c0t0d0

Continue operation? [y,n,q,?] (default: y) y
You can choose to add this disk to an existing disk group or to
a new disk group.  To create a new disk group, select a disk name that
does not yet exist.

Which disk group [<group>;,list,q,?] (default: rootdg) rootdg
Use a default disk name for the disk? [y,n,q,?] (default: y) n
NOTE: Make sure you select &quot;n&quot;&#59; we need to call the drive rootdisk.

The selected disks will be encapsulated and added to the rootdg
disk group with disk names that will be specified interactively.

  c0t0d0

Continue with operation? [y,n,q,?] (default: y) y

The following disk has been selected for encapsulation.
Output format: [Device_Name]

  c0t0d0

Continue with encapsulation? [y,n,q,?] (default: y) y

Enter disk name for  [<name>;,q,?] (default: disk01) rootdisk
The disk device c0t0d0 will be encapsulated and added to the disk group
  rootdg with the disk name rootdisk.

  The c0t0d0 disk has been configured for encapsulation.

  The first stage of encapsulation has completed successfully.  You
  should now reboot your system at the earliest possible opportunity.

  The encapsulation will require two or three reboots, which will happen
  automatically after the next reboot.  To reboot, execute the command:

shutdown -g0 -y -i6

  This will update the /etc/vfstab file so that volume devices are
  used to mount the file systems on this disk device.  You will need
  to update any other references such as backup scripts, databases,
  or manually created swap devices.

Encapsulate other disks? [y,n,q,?] (default: n) n

Volume Manager Support Operations
Menu: VolumeManager/Disk

1      Add or initialize one or more disks
2      Encapsulate one or more disks
3      Remove a disk
4      Remove a disk for replacement
5      Replace a failed or removed disk
6      Mirror volumes on a disk
7      Move volumes from a disk
8      Enable access to (import) a disk group
9      Remove access to (deport) a disk group
10     Enable (online) a disk device
11     Disable (offline) a disk device
12     Mark a disk as a hot-spare for a disk group
13     Turn off the hot-spare flag on a disk
list   List disk information

?      Display help about menu
??     Display help about the menuing system
q      Exit from menus

Select an operation to perform: q
            
NOTE: We need to reboot for the encapsulation to take effect:
# Init 6

This will create volumes around the root partitions.  Generally
these volumes will be rootvol, swapvol, var, usr, and export but this
will vary depending on how the rootdisk was originally created/partitioned.
Rebooting will also edit the /etc/system and /etc/vfstab to reflect that the boot
disk is now encapsulated.

STEP 2----------------------------------------

Now we need to prepare the mirror drive by initializing it into
Volume Manager control using vxdiskadm.  If you already have the disk
initialized skip this step.  You can determine if the disk is already
initialized by doing a 'vxdisk list'.  If the disk is online in the
farthest right hand column, that means it has already been initialized.
If the disk shows as error, you will need to initialize it.

# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

1      Add or initialize one or more disks
2      Encapsulate one or more disks
3      Remove a disk
4      Remove a disk for replacement
5      Replace a failed or removed disk
6      Mirror volumes on a disk
7      Move volumes from a disk
8      Enable access to (import) a disk group
9      Remove access to (deport) a disk group
10     Enable (online) a disk device
11     Disable (offline) a disk device
12     Mark a disk as a hot-spare for a disk group
13     Turn off the hot-spare flag on a disk
list   List disk information

?      Display help about menu
??     Display help about the menuing system
q      Exit from menus

Select an operation to perform: 1
Add or initialize disks
Menu: VolumeManager/Disk/AddDisks

  Use this operation to add one or more disks to a disk group.  You can
  add the selected disks to an existing disk group or to a new disk group
  that will be created as a part of the operation. The selected disks can
  also be added to a disk group as hot spares. The selected disks can also
  be initialized without adding them to a disk group leaving the disks
  available for use as replacement disks.

  More than one disk or pattern may be entered at the prompt.  Here are
  some disk selection examples:

  all:          all disks
  c3 c4t2:      all disks on both controller 3 and controller 4, target 2
  c3t4d2:       a single disk

Select disk devices to add:                                          
[<pattern-list>;,all,list,q,?] c0t1d0

Here is the disk selected.  Output format: [Device_Name]

  c0t1d0

Continue operation? [y,n,q,?] (default: y) y

You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations.  To create a new disk group,
select a disk group name that does not yet exist.  To leave
the disk available for future use, specify a disk group name
of &quot;none&quot;.

Which disk group [<group>;,none,list,q,?] (default: rootdg) rootdg

Use a default disk name for the disk? [y,n,q,?] (default: y) n

Add disk as a hot-spare disk for rootdg? [y,n,q,?] (default: n) n

Exclude disk from hot-relocation use ? [y,n,q,?] (default: n) n

The selected disks will be added to the disk group rootdg with
  disk names that you will specify interactively.

  c0t1d0

Continue with operation? [y,n,q,?] (default: y) y

Add or initialize other disks? [y,n,q,?] (default: n) n

Volume Manager Support Operations
Menu: VolumeManager/Disk

1      Add or initialize one or more disks
2      Encapsulate one or more disks
3      Remove a disk
4      Remove a disk for replacement
5      Replace a failed or removed disk
6      Mirror volumes on a disk
7      Move volumes from a disk
8      Enable access to (import) a disk group
9      Remove access to (deport) a disk group
10     Enable (online) a disk device
11     Disable (offline) a disk device
12     Mark a disk as a hot-spare for a disk group
13     Turn off the hot-spare flag on a disk
list   List disk information

?      Display help about menu
??     Display help about the menuing system
q      Exit from menus

Select an operation to perform: 6

Mirror volumes on a disk
Menu: VolumeManager/Disk/Mirror

  This operation can be used to mirror volumes on a disk.  These
  volumes can be be mirrored onto another disk or onto any
  available disk space.  Volumes will not be mirrored if they are
  already mirrored.  Also, volumes that are comprised of more than
  one subdisk will not be mirrored.

  Mirroring volumes from the boot disk will produce a disk that
  can be used as an alternate boot disk.

  At the prompt below, supply the name of the disk containing the
  volumes to be mirrored.

Enter disk name [<disk>;,list,q,?] rootdisk

  You can choose to mirror volumes from disk rootmirror onto any
  available disk space, or you can choose to mirror onto a specific
  disk.  To mirror to a specific disk, select the name of that disk.
  To mirror to any available disk space, select &quot;any&quot;.

Enter destination disk [<disk>;,list,q,?] (default: any) disk01

  The requested operation is to mirror all volumes on disk rootdisk
  in disk group rootdg onto available disk space on disk rootmirror.

  NOTE: This operation can take a long time to complete.

Continue with operation? [y,n,q,?] (default: y) y

Mirror volume rootvol ...


This message will be repeated for all volumes that are mirrored until it is complete.

Run:
# vxprint -htg rootdg
      
To verify that the mirroring is set up when vxdiskadm is complete.



这个是偶自己做的,呵呵。
mmmmn,你要不加精,偶就suicide -f!

论坛徽章:
0
14 [报告]
发表于 2002-12-02 14:52 |只看该作者

求助volume manager!

现在很奇怪,我的系统是安装在c0t0d0上的,c0上就这么一块硬盘,在c1上原来有一块它的镜像盘,现在我重新做了c0t0d0,然后安装VM,我想是不是重做了,但是它的镜像盘还在,那么,这样的话,盘里面就有了一个rootdg,所以,我在封装c0t0d0的时候报错。但是更怪的是:我停掉了c0t0d0的镜像盘,在vxinstall,还是报我贴出的错误,大家说说,这可能是什么原因?

论坛徽章:
0
15 [报告]
发表于 2002-12-02 15:06 |只看该作者

求助volume manager!

把c1t0d0做了
format
newfs
然后再试。

论坛徽章:
0
16 [报告]
发表于 2002-12-02 15:44 |只看该作者

求助volume manager!

做了,我都把c1t0d0都poweroff了也不行!!!!

论坛徽章:
0
17 [报告]
发表于 2002-12-02 16:08 |只看该作者

求助volume manager!

建议加精。但是有个问题需要请问yt老大:你介绍的封装root disk是在做了rootdg之后的吧?在root disk上选一个分区作了rootdg,启动了volume manager然后封装整个root disk。不知道我的理解是否正确,老大指正。如果是这样的,楼主的问题好像是开始安装volume manager就将整个root disk进行封装。步骤一样否?

论坛徽章:
0
18 [报告]
发表于 2002-12-02 16:19 |只看该作者

求助volume manager!

大家可能把这个问题搞复杂了,主要问题是VM找不到硬盘,我想是漏了patch,要先给系统打一些要求的patch,这在安装要求里有,有几个是关于硬盘的,特别是9G以上的硬盘,更要注意。

论坛徽章:
0
19 [报告]
发表于 2002-12-02 17:26 |只看该作者

求助volume manager!

我想patch的问题不会有。我的solaris8的版本是(2002/2),patch虽然不是最新的,但是也足够安装VM了,我以前也在这个版本上安装过,没问题,可是就是这次出个小问题

论坛徽章:
0
20 [报告]
发表于 2002-12-02 21:10 |只看该作者

求助volume manager!

下面引用由x3y4z52002/12/02 04:08pm 发表的内容:
建议加精。但是有个问题需要请问yt老大:你介绍的封装root disk是在做了rootdg之后的吧?在root disk上选一个分区作了rootdg,启动了volume manager然后封装整个root disk。不知道我的理解是否正确,老大指正。 ...
是的,我留了1个slice,20MB空间的。
建议这样做,否则以后有问题,要动rootdg就得动整个/了。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP