Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1984143
  • 博文数量: 593
  • 博客积分: 20034
  • 博客等级: 上将
  • 技术积分: 6779
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-06 14:07
文章分类

全部博文(593)

文章存档

2016年(1)

2011年(101)

2010年(80)

2009年(10)

2008年(102)

2007年(16)

2006年(283)

我的朋友

分类:

2008-12-02 19:06:17

Details:
In VERITAS Volume Manager 4.0, changes were made to the default disk group type and disk type attributes. Prior to Volume Manager 4.0,  the default disk type was "simple" it is now "cdsdisk". If a device has a disk type of "cdsdisk",  the additional vxdg init attribute is not required ( cds=off ).

Example
-------------
Create a new disk group using a cdsdisk type defined disk:
 
DEVICE        TYPE              DISK        GROUP            STATUS
c0t0d0s2       auto:none        -               -                      online invalid
c1t0d1s2       auto:cdsdisk    -               -                     online              <-- Using this disk for this exercise
c1t0d2s2       auto:sliced       -               -                     online
c1t0d3s2       auto:sliced      -                -                     online
c1t0d8s2       auto:sliced      ctd1          emcdg             online
c1t0d10s2      auto:sliced      -                -                     online invalid
emcpower8c  simple            emc8          rootdg             online
emcpower9c  simple            -                 -                     online

CDSDISK
# vxdg init testdg c1t0d1s2
The vxdg init command works fine, without the need for the "cds=off" argument as the disk type was cdsdisk.

Revised output:
c1t0d1s2           auto:cdsdisk              c1t0d1s2            testdg             online

Simple or sliced disk:
Sliced:
# vxdg init testdg2 c1t0d1s2
VxVM vxdg ERROR V-5-1-6478 Device c1t0d1s2 cannot be added to a CDS disk group

Workaround:  
Add the cds=off argument:
# vxdg init testdg2 c1t0d1s2 cds=off

Simple:

# vxdg init newemcdg disk01=emcpower9c
VxVM vxdg ERROR V-5-1-6478 Device emcpower9c cannot be added to a CDS disk group

Now add the new attribute cds=off:
# vxdg init newemcdg disk01=emcpower9c cds=off
Revised output:
emcpower9c      simple                       disk01                newemcdg       online

Further Information
If the "cds=off" attribute is not specified with the vxdg init command, the /etc/default/vxdg file is searched for a definition of this attribute. If no such definition is found, the value "cds=on" is assumed. Add such a definition to this file if you wish to change the new default back.





CDS的含义: Cross-platform Data Sharing译成中文就是跨平数据共享(自己理解的意思,有错误还请指正).

首先,CDS使用一个新的磁盘类型(auto:cdsdisk)来使得数据的共享生效.同时VXVM也提供一种新的磁盘组的属性CDS,

同时也能够提供不同类型的操作系统的数据块大小.

为了,能让多个平台访问磁盘,首先磁盘必须在这个平台是被标示的.然后,就是所有的平台都可以在这个磁盘上进行I/O操作.

CDS磁盘有指定的内容用于标示指定不同的平台对于磁盘进行的访问.

关于CDS磁盘使用的一些约定如下:

必须是支持Mode Sense的SCSI磁盘(对于Mode Sense这个概念本人理解为一种磁盘的模式感知,
比如:参数设置范围等等)

不能是EFI disk(Extensible Firmware Interface)类型的disk label)

 必须是完整的物理磁盘(LUN)
 
只有一个volume manager来管理物理磁盘(LUN)

 不能是一个不包含在CDS磁盘内的磁盘分区
 
必须是已经存在的CDS磁盘组和磁盘组版本最少是110的非CDS磁盘(不能是磁盘组版本小于110的磁盘组)
 卷的内容不能包含root或者swap(也就是说不能是启动磁盘)

当CDS磁盘被创建的时候,会被分配一个默认的格式cdsdisk.也可以使用vxcdsconvert来将其他的VXVM的磁

盘格式转化为CDS格式. Cdsdisk磁盘格式可以被所有的VXVM平台识别(包括windows)
 
你也可以通过编辑/etc/default/vxdisk文件来改变创建磁盘的默认格式.

如果在磁盘格式和默认的磁盘组类型发生冲突的时候,比如:CDS磁盘和非CDS磁盘之间的冲突.

通过设置cds=off来建立非CDS磁盘组

直接初始化为CDS磁盘,CDS磁盘只能应用于磁盘组版本在110及其以上版本的磁盘组中.

私有区域和公共区域被分配的大小是8K的倍数.

disk access (DA)的类型是auto.支持多种磁盘格式,包括cdsdisk,支持所有平台的访问.

CDS磁盘组只有在磁盘组的版本达到110及其以上的时候,才可以使用.110以前的版本不支持CDS磁盘组.同时被安排的区域为8K.

CDS磁盘组符合的要求:

只有CDS磁盘组成

包含CDS磁盘的cds 属性设置为on.

非CDS磁盘组,任何一个版本在110及其以上版本的磁盘组都包含CDS和非CDS磁盘两种.但是,在版本110及其以上版本的磁盘组

中只有全部的磁盘都是CDS磁盘,才支持跨平台访问.

关于DRL map区域的设置必须是设置在磁盘组的多个磁盘上.版本110的磁盘组上的传统的DRL的大小为最小的为512K,增量为64K.
版本110的磁盘组上的版本0DCO最小为16K,增量为8K.

logmap_len属性只能应用于传统的DRL.在创建一个新的卷的时候可以通过vxassist sets logmap_len来设置,但不能通过vxvol set来修改该。

可以使用vxdisksetup命令来为未初始化VXVM磁盘来创建CDS磁盘

# vxdisksetup –i   disk   [format=format]

使用format=cdsdisk来修改/etc/default/vxdisk文件的默认设置.

也可以通过vxdiskadm的disk init彩旦来设置.

在已经初始化为VXVM的磁盘上创建CDS磁盘.

对于不在磁盘组中的磁盘可以通过有以下的步骤来修改:

1.#vxdiskunsetup disk

2.#vxdisk rm disk

3.#vxdisk scandisks

4.#vxdisksetup -i disk

使用vxdg init命令来创建CDS磁盘组

#vxdg init diskgroup disklist [cds=on|off]

可以通过[cds=on|off]参数来设置是建立cds磁盘组还是非cds磁盘组.

也可以通过设置/etc/default/vxdg文件中的cds=off来改变CDS磁盘组的属性.

转换非CDS磁盘到CDS磁盘可以使用命令:

#vxcdsconvert -g diskgroup [-A] [-d defaults_file] [-o novolstop] alldisks [attribute=value] ...

#vxcdsconvert -g diskgroup [-A] [-d defaults_file] [-o novolstop] diskname [attribute=value] ...

转换非CDS磁盘组到CDS磁盘组可以使用命令:

#vxcdsconvert -g diskgroup [-A] [-d defaults_file] [-o novolstop] alignment [attribute=value] ...

#vxcdsconvert -g diskgroup [-A] [-d defaults_file] [-o novolstop] group [attribute=value] ...


创建和导入CDS磁盘组是通过CDS的lisence来控制的.CDS的lisence包含在VERITAS Storage Foundation license.

比如:
#Vxlicrep
License Key
P2CE-I8ZR-USLU-RR8D-YN8P-NN8H
(以下省略)

Vxcdsconvert在系统中的默认文件为: /etc/default/vxcdsconvert

文件中定义的属性有以下内容:

evac_subdisks_ok

min_split_size

move_subdisks_ok

privlen

split_subdisks_ok

evac_disk_list

如何查看CDS的属性:

#vxdg list dgTestSol2
 Group:dgTestSol2
dgid: 1063238039.206.vmesc1
import-id:  1024.205
 flags:      cds
(以下省略)
还可以通过
#vxprint -F %cds  TestSol2
on
来查看.

阅读(1599) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~