Sample configurations

Configuration 1 for Linux

In this example, the DiskReservation agent reserves a disk. The disk is mounted with the Veritas File System.

system sysA

system sysB

group groupx (

SystemList = { sysA, sysB }

AutoStartList = { sysA }

)

DiskReservation diskres1 (

Disks = { "/dev/sdc" }

FailFast = 1

)

Mount mount (

MountPoint = "/mnt/tmp"

BlockDevice = "/dev/sdc1"

FSType = vxfs

MountOpt = rw

)

mount requires diskres1

// resource dependency tree

//

// group groupx

// {

// Mount mount

// {

// DiskReservation diskres1

// }

// }

Configuration 2 for Linux

In this example, the DiskReservation agent reserves several disks. The disk group defined on these disks is imported only if the system can reserve the disks.

Volumes can be enabled and mounted on the Disk Group. Refer to the Volume agent on Volume agent for a sample configuration.

group groupy (

SystemList = { sysA, sysB }

AutoStartList = { sysA }

)

DiskGroup resdg (

DiskGroup = resdg

)

DiskReservation diskres2 (

Disks = { "/dev/sdc", "/dev/sdd", "/dev/sde", "/dev/sdf",

"/dev/sdg" }

ProbeInterval = 5

Percentage = 60

)

resdg requires diskres2

// resource dependency tree

//

// group groupy

// {

// DiskGroup resdg

// {

// DiskReservation diskres2

// }

// }

Configuration 1 for Solaris

Configuring the Mount resource to depend on the DiskReservation resource when a disk is mounted on a system ensures that no other system can mount the same disk. The group definition in the main.cf would resemble the following definition.

group groupx (

SystemList = { sysa, sysb }

AutoStartList = { sysa }

)

DiskReservation dr (

Disks = { c1t2d0s4 }

FailFast = 1

)

Mount export1 (

MountPoint = "/test"

BlockDevice = "/dev/dsk/c1t2d0s4"

FSType = ufs

MountOpt = rw

)

export1 requires dr

// resource dependency tree

//

// group groupx

// {

// Mount export1

// {

// DiskReservation dr

// }

// }

Configuration 2 for Solaris

You can use the DiskReservation resource in conjunction with Veritas Volume Manager. In the following example of a group defined in the main.cf, the Mount resource depends on the Volume resource, which depends on the DiskGroup resource, which depends on the DiskReservation resource.

The Disks list for the DiskReservation resource must contain the raw devices that constitute the disk group. Use the VxVM vxdisk list command to list the devices constituting the volume.

Five disks exist in the user-defined group. Four of these disks must be accessible and reserved for the resource group to go online (the default ConfigPercentage is 80).

FailFast preserves data integrity by directing the system to panic if a conflict of reservations arises between systems.

group groupx (

SystemList = { sysa, sysb }

AutoStartList = { sysa }

)

DiskReservation dr (

Disks = { "/dev/rdsk/c0t2d0s2", "/dev/rdsk/c1t2d0s2", "/dev/rdsk/c2t2d0s2", "/dev/rdsk/c3t2d0s2", "/dev/rdsk/c4t2d0s2" }

FailFast = 1

)

DiskGroup resdg (

DiskGroup = resdg

)

Volume resvol (

Volume = resvol

DiskGroup = resdg

)

Mount export1 (

MountPoint = "/test"

BlockDevice = "/dev/vx/dsk/resdg/resvol"

FSType = ufs

MountOpt = rw

)

export1 requires resvol

resvol requires resdg

resdg requires dr

// resource dependency tree

//

// group groupx

// {

// Mount export1

// {

// Volume resvol

// {

// DiskGroup resdg

// {

// DiskReservation dr

// }

// }

// }

// }