分页: 1 / 1

Cluster-wide Device Special Files (cDSFs)

发表于 : 2014年 8月 4日 10:28 星期一
MUDBOY
Because DSF names may be duplicated between one host and other, it is possible for different storage devices to have the same name on different nodes in a cluster, and for the same piece of storage to be addressed by different names.

Cluster-wide Device Special Files (cDSFs) ensure that each storage device used by the cluster has a unique device file name. Cluster-wide device special files (cDSFs) are persistent device special files applied across a set of nodes. That is, they ensure that the same piece of storage has the same device file name on all of the nodes that share it; no matter how many paths there are to the device, the same cluster DSF is used to address it. If the device is moved, the same cDSF still addresses it.

How to Create the Cluster-wide Device Special Files (cDSFs):

Important: Only configure cDSF if you are building a 2 or more nodes cluster. This is not applicable when building a single node cluster

Execute the following command:

# cmsetdsfgroup -c
Cluster device file group configuration set to 'clusternode1 clusternode2'.


Note: The option -c creates a cDSF group from the members of the existing local Serviceguard cluster. The command must be run on a member of the Serviceguard cluster. This option eliminates the need to explicitly list each node of the Serviceguard cluster on the command line.

Check cluster nodes are listed in the output of the following command

# cmsetdsfgroup -q
clusternode1
clusternode2

Run the following command(the disks can be identified using the command ioscan -m lun):

# ioscan -F -m cluster_dsf /dev/disk/disk#
# ioscan -F -m cluster_dsf /dev/disk/disk##


How to migrate/convert VG with vgcdsf

# strings /etc/lvmtab_p
/dev/vgpkg1
A0000000000000001Tue Feb 1 13:21:27 201103b950fa-2d66-11e0-bf02-00156004e156
/dev/disk/disk3
/dev/disk/disk5

# vgcdsf /dev/vgpkg1
Successfully converted persistent DSF(s) in VG /dev/vgpkg1.

# strings /etc/lvmtab_p
/dev/vgpkg1
A0000000000000001Tue Feb 1 13:21:27 201103b950fa-2d66-11e0-bf02-00156004e156
/dev/cdisk/disk1
/dev/cdisk/disk2


Re: Cluster-wide Device Special Files (cDSFs)

发表于 : 2015年 7月 1日 23:59 星期三
MUDBOY
对于新添加的node,可使用命令cmsetdsfgroup -a -n <node_name>

对于vgcdsf的转换,我一般先把cluster加入后,然后再执行vgcdsf /dev/<vg_name>命令转换。

然后vgexport出来map文件
root@node1# vgexport -p -m /tmp/<vg_name>.mapfile -s -v /dev/<vg_name>

把mapfile用scp拷贝到其他node
root@node1# scp /tmp/<vg_name>.mapfile node2:/tmp

在node2上执行vgimport
root@node2# vgimport -m /tmp/<vg_name>.mapfile -s -v -N /dev/<vg_name>

注意,如果主机某块硬盘有问题,那么因为vgimport里面的-s参数会扫描全部磁盘,造成命令无响应。这时我可以去掉s参数并指定disk名字
root@node2# vgimport -m /tmp/<vg_name>.mapfile -v /dev/<vg_name> /dev/cdisk/disk1 /dev/cdisk/disk2