Tuesday, December 4, 2007
at
1:38 PM
|
How to create a file system using VERITAS Volume Manager, controlled under VERITAS Cluster Server
Details:
Following is the algorithm to create a volume, file system and put them under VERITAS Cluster Server (VCS).
Add following resources and modify attributes:
Resources Name Attributes
1. Disk group, disk group name
2. Mount block device, FSType, MountPoint
Create dependency between following resources:
1. Mount and disk group
Enable all resources in this service group.
The following example shows how to create a raid-5 volume with a VxFS file system and put it under VCS control.
Method 1 - Using the command line
1. Create a disk group using Volume Manager with a minimum of 4 disks:
2. Create a mount point for this volume:
3. Create a file system on this volume:
4. Deport this disk group:
5. Create a service group:
6. Create a disk group resource and modify its attributes:
7. Create a mount resource and modify its attributes:
8. Link the mount resource to the disk group resource:
9. Enable the resources and close the configuration:
Method 2 - Editing /etc/VRTSvcs/conf/config/main.cf
Add the following line to end of this file:
Check status of the new service group.
------------------------------------------------------------------------------------
Here's an actual example.
Details:
Following is the algorithm to create a volume, file system and put them under VERITAS Cluster Server (VCS).
- 1. Create a disk group
2. Create a mount point and file system
3. Deport a disk group
4. Create a service group
Add following resources and modify attributes:
Resources Name Attributes
1. Disk group, disk group name
2. Mount block device, FSType, MountPoint
Create dependency between following resources:
1. Mount and disk group
Enable all resources in this service group.
The following example shows how to create a raid-5 volume with a VxFS file system and put it under VCS control.
Method 1 - Using the command line
1. Create a disk group using Volume Manager with a minimum of 4 disks:
#
vxdg init datadg disk01=c1t1d0s2 disk02=c1t2d0s2 disk03=c1t3d0s2 disk04=c1t4d0s2
#
vxassist -g datadg make vol01 2g layout=raid5
2. Create a mount point for this volume:
#
mkdir /vol01
3. Create a file system on this volume:
#
mkfs -F vxfs /dev/vx/rdsk/datadg/vol01
4. Deport this disk group:
#
vxdg deport datadg
5. Create a service group:
#
haconf -makerw
#
hagrp -add newgroup
#
hagrp -modify newgroup SystemList <sysa> 0 <sysb> 1
#
hagrp -modify newgroup AutoStartList <sysa>
6. Create a disk group resource and modify its attributes:
#
hares -add data_dg DiskGroup newgroup
#
hares -modify data_dg DiskGroup datadg
7. Create a mount resource and modify its attributes:
#
hares -add vol01_mnt Mount newgroup
#
hares -modify vol01_mnt BlockDevice /dev/vx/dsk/datadg/vol01
#
hares -modify vol01_mnt FSType vxfs
#
hares -modify vol01_mnt MountPoint /vol01
#
hares -modify vol01_mnt FsckOpt %-y
8. Link the mount resource to the disk group resource:
#
hares -link vol01_mnt data_dg
9. Enable the resources and close the configuration:
#
hagrp -enableresources newgroup
#
haconf -dump -makero
Method 2 - Editing /etc/VRTSvcs/conf/config/main.cf
#
hastop -all
#
cd /etc/VRTSvcs/conf/config
#
haconf -makerw
#
vi main.cf
Add the following line to end of this file:
group newgroup (
SystemList = { sysA =0, sysB=1}
AutoStartList = { sysA }
)
DiskGroup data_dg (
DiskGroup = datadg
)
Mount vol01_mnt (
MountPoint = "/vol01"
BlockDevice = " /dev/vx/dsk/datadg/vol01"
FSType = vxfs
)
vol01_mnt requires data_dg
#
haconf -dump -makero
#
hastart -local
Check status of the new service group.
------------------------------------------------------------------------------------
Here's an actual example.
#
umount /backup/pdpd415
#
vxdg deport bkupdg
#
haconf -makerw
#
hares -add bkup_dg DiskGroup pdpd415_grp
#
hares -modify bkup_dg DiskGroup bkupdg
#
hares -add bkupdg_bkup_mnt Mount pdpd415_grp
#
hares -modify bkupdg_bkup_mnt BlockDevice /dev/vx/dsk/bkupdg/bkupvol
#
hares -modify bkupdg_bkup_mnt FSType vxfs
#
hares -modify bkupdg_bkup_mnt MountPoint /backup/pdpd415
#
hares -modify bkupdg_bkup_mnt FsckOpt %-y
#
hares -link bkupdg_bkup_mnt bkup_dg
#
hagrp -enableresources pdpd415_grp
#
hares -online bkup_dg -sys sppwd620
#
hares -online bkupdg_bkup_mnt -sys sppwd620
#
haconf -dump -makero
Posted by
JAUGHN
Labels:
Veritas Cluster Server
7 comments:
Its simply a awsome document.. Thank a ton
Great work......thanks lot..
keep posting.......
Great work it wil help to many people
well, it looks very easy ...don'know.. going to plan one FS add in VCS with the help of this doc.. lets c..
will be posting if done.. :)
thanks for sharing
Aman
Many thanks for this nice guide
Can you please provide a way to remove these resources and groups cleanly as well.
Genius Bro/Sis
Post a Comment