Ensure all disks in the diskgroup are visible from both nodes
[root@lab1
/]# vxdisk -oalldgs list|grep appdg
disk_3 auto:cdsdisk appdg02
appdg online
disk_7 auto:cdsdisk appdg01
appdg online
Last
login: Sat Jul 23 08:59:16 2016 from 192.168.1.31
[root@lab2
~]# vxdisk -oalldgs list|grep appdg
disk_0 auto:cdsdisk -
(appdg) online
disk_2 auto:cdsdisk -
(appdg) online
[root@lab3
~]# vxdisk -oalldgs list|grep appdg
disk_3 auto:cdsdisk -
(appdg) online
disk_7 auto:cdsdisk -
(appdg) online
Unmount the FS:
[root@lab1
/]# df -Ph|grep appdg
/dev/vx/dsk/appdg/appvol01 100M
18M 78M 19% /app/test
/dev/vx/dsk/appdg/appvol02 100M
18M 78M 19% /app/test1
[root@lab1
/]# umount /app/test1
[root@lab1
/]# umount /app/test
Also Remove the entries from
/etc/fstab:
Deport the Diskgroup:
[root@lab1 /]#
vxdg deport appdg
Import the Diskgroup with shared Flag On:
[root@lab1 /]#
vxdg -s import appdg
[root@lab1
/]# vxdisk -oalldgs list|grep appdg
disk_3
auto:cdsdisk appdg02 appdg online shared
disk_7
auto:cdsdisk appdg01 appdg online shared
[root@lab2
~]# vxdisk -oalldgs list|grep appdg
disk_0
auto:cdsdisk appdg01 appdg online shared
disk_2
auto:cdsdisk appdg02 appdg online shared
[root@lab3
~]# vxdisk -oalldgs list|grep appdg
disk_3
auto:cdsdisk appdg02 appdg online shared
disk_7
auto:cdsdisk appdg01 appdg online shared
Now we could see there is an shared flag for
diskgroup
Now we will add each volume to the CFS Cluster,
First we will check the Cluster Status:
[root@lab1
/]# cfscluster status
Node :
lab1
Cluster Manager :
running
CVM state :
running
No mount point registered with cluster
configuration
Node :
lab2
Cluster Manager :
running
CVM state :
running
No mount point registered with cluster
configuration
Node :
lab3
Cluster Manager :
running
CVM state :
running
No mount point registered with cluster
configuration
[root@lab1
/]# hastatus -summ
--
SYSTEM STATE
--
System State Frozen
A lab1 RUNNING 0
A lab2 RUNNING 0
A lab3 RUNNING 0
--
GROUP STATE
--
Group System Probed AutoDisabled State
B cvm lab1 Y N ONLINE
B cvm lab2 Y N ONLINE
B cvm lab3 Y N ONLINE
Adding Volume appvol01 & appvol02 to CVM:
[root@lab1
/]# cfsmntadm add appdg appvol01 /app/test app_sg all=rw
Mount Point is being added...
/app/test added to the cluster-configuration
root@lab1
/]# cfsmntadm add appdg appvol02 /app/test1 app_sg all=rw
Mount Point is being added...
/app/test1 added to the cluster-configuration
Create an
mount Point on host lab1,lab2 & lab3 to mounting each volume:
[root@lab1
/]# mkdir -p /app/test
[root@lab1
/]# mkdir -p /app/test1
Similarly
do it on lab2 & lab3 also:
Checking Cluster Status:
[root@lab1
/]# cfscluster status
Node :
lab1
Cluster Manager :
running
CVM state :
running
MOUNT POINT
SHARED VOLUME DISK GROUP STATUS
/app/test
appvol01 appdg NOT MOUNTED
/app/test1
appvol02 appdg NOT MOUNTED
Node :
lab2
Cluster Manager :
running
CVM state :
running
MOUNT POINT
SHARED VOLUME DISK GROUP STATUS
/app/test
appvol01 appdg NOT MOUNTED
/app/test1
appvol02 appdg NOT MOUNTED
Node :
lab3
Cluster Manager :
running
CVM state :
running
MOUNT POINT
SHARED VOLUME DISK GROUP STATUS
/app/test
appvol01 appdg NOT MOUNTED
/app/test1
appvol02 appdg NOT MOUNTED
[root@lab1
/]# hastatus -summ
--
SYSTEM STATE
--
System State Frozen
A lab1 RUNNING 0
A lab2 RUNNING 0
A lab3 RUNNING 0
--
GROUP STATE
--
Group System Probed
AutoDisabled State
B app_sg lab1 Y N PARTIAL
B app_sg lab2 Y N PARTIAL
B app_sg lab3 Y N PARTIAL
B cvm lab1 Y N ONLINE
B cvm lab2 Y N ONLINE
B cvm lab3 Y N
ONLINE
Mounting each volume:
[root@lab1
/]# cfsmount /app/test
Mounting...
[/dev/vx/dsk/appdg/appvol01] mounted
successfully at /app/test on lab1
[/dev/vx/dsk/appdg/appvol01] mounted
successfully at /app/test on lab2
[/dev/vx/dsk/appdg/appvol01] mounted
successfully at /app/test on lab3
[root@lab1
/]# cfsmount /app/test1
Mounting...
[/dev/vx/dsk/appdg/appvol02] mounted
successfully at /app/test1 on lab1
[/dev/vx/dsk/appdg/appvol02] mounted
successfully at /app/test1 on lab2
[/dev/vx/dsk/appdg/appvol02] mounted
successfully at /app/test1 on lab3
root@lab1
/]# df -Ph /app/test*
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/appdg/appvol01 100M
18M 78M 19% /app/test
/dev/vx/dsk/appdg/appvol02 100M
18M 78M 19% /app/test1
[root@lab2
~]# df -Ph /app/test*
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/appdg/appvol01 100M
18M 78M 19% /app/test
/dev/vx/dsk/appdg/appvol02 100M
18M 78M 19% /app/test1
[root@lab3
~]# df -Ph /app/test*
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/appdg/appvol01 100M
18M 78M 19% /app/test
/dev/vx/dsk/appdg/appvol02
100M
18M 78M 19% /app/test1
We could see the FS is mounted Properly
Checking Cluster Status:
[root@lab1
/]# cfscluster status
Node :
lab1
Cluster Manager :
running
CVM state :
running
MOUNT POINT
SHARED VOLUME DISK GROUP STATUS
/app/test
appvol01 appdg MOUNTED
/app/test1
appvol02 appdg MOUNTED
Node :
lab2
Cluster Manager :
running
CVM state :
running
MOUNT POINT
SHARED VOLUME DISK GROUP STATUS
/app/test
appvol01 appdg MOUNTED
/app/test1
appvol02 appdg MOUNTED
Node :
lab3
Cluster Manager :
running
CVM state :
running
MOUNT POINT
SHARED VOLUME DISK GROUP STATUS
/app/test
appvol01 appdg MOUNTED
/app/test1
appvol02 appdg MOUNTED
[root@lab1
/]# hastatus -summ
--
SYSTEM STATE
--
System State Frozen
A lab1 RUNNING 0
A lab2 RUNNING 0
A lab3 RUNNING 0
--
GROUP STATE
--
Group System Probed AutoDisabled State
B app_sg lab1 Y N ONLINE
B app_sg lab2 Y N ONLINE
B app_sg lab3 Y N ONLINE
B cvm lab1 Y N ONLINE
B cvm
lab2 Y N ONLINE
B cvm lab3 Y N ONLINE
Please be
noted have tested the conversion of VXFS to CFS and Vice versa with Data in it
and it was successful but generic convention is to take a Full Backup of the
Data before such change.
Thank you for reading.
No comments:
Post a Comment