Search This Blog

Friday, March 7, 2014

Plex

Plex

A plex is a structured or ordered collection of subdisks that represents one copy of the data in a volume. A plex consists of one or more subdisks located on one or more physical disks.

The default naming convention for plexes in a volume is volumename-##. The default plex name consists of the volume name, a hyphen, and a two-digit number

A plex is also called a mirror. The terms plex and mirror can be used interchangeably, even though a plex is only one copy of the data. The terms "mirrored" or "mirroring" imply two or more copies of data.

Creating a Plex

# vxmake –g <diskgroup> plex <plexname>  sd=<sdname>

Removing a Plex

# vxplex –o rm disk <plex>
# vxplex –g <group> dis <plex>
# vxedit –g <group> -rf rm <plex>

Moving a Plex

# vxplex mv <original plex> <new plex>

Copying a Plex

# vxplex cp <volume> <new plex>

Attaching a plex

# vxplex att <volume> <plex>

Detaching a plex

# vxplex det <plex>

Disassociating plex

# vxplex –g <diskgroup> -o rm dis <plexname>

Off lining a plex

# vxmend off vol01-02

Renaming a Plex


# vxedit -g <diskgroup> rename oldplex newplex

Creating a Subdisk

# vxmake –g <diskgroup> sd disk1-01 disk1,0,100m

This would create a sub-disk called disk1-01 at the start of disk disk01 and would be 100m long.

If you want to create another sub-disk on the same disk (disk01) the offset would be 100m as this is where the next freespace would be on the disk. So

# vxmake –g <diskgroup> sd disk01-02 disk1,100m,100m

This would create another 100m subdisk.

# vxedit rm <sub-disk>

# vxsd mv <old sub-disk> <new sub-disk>

# vxmake plex <plex> sd=<sub-disk>
# vxmake plex home-1 sd=disk02-01, disk02-00, disk02-02

# vxsd dis <sub-disk>

# vxsd –s<size> split sd<new sub><newsub2>

# vxsd join <subdisk1><subdisk2><newsubdisk>

Evacuate the subdisk from one of the disk in the volume
# /etc/vx/bin/vxevac –g <dg_name> <dm_name_old> <dm_name_new>

# /etc/vx/bin/vxevac –g ccdg ccdg01 ccdg02

VXVM Disk Types and Formats

·         auto: Automatically configured by VxVM
·         auto-cdsdisk           (Default for 4.0)
·         auto-simple
·         auto-sliced
·         auto-none


·         Simple: Public and private regions are contiguous on the same partition.

VxVM Disk Layouts

Sliced Disk layout
  • The Private region and public region slices are on separate partitions (3 & 4), this type of disk is not suitable for moving between different O/S's but are suitable for boot partitions
CDS (Cross-platform Data Sharing)
  • The Private and Public regions are one slice (slice 7), this type is suitable for moving between different O/S's but not suitable for boot partitions.
Simple

  • Private and public are the same partition but continuous (slice 3)

VxVM Disk Region

Private
This is VERITAS holds the meta data regarding the disk. A copy of the configuration database is copied to each private region within the disk group. VERITAS will try to keep five copies of the configuration database.

 Public 

 This area will store the user’s data.

Volume Manager Disk

·        Adding physical disks to the volume manager results in creation of public and private region in the disk by the volume manager. The public region is the disk space available for volume space and the private region stores the configuration information. 


·        A Volume Manager disk is created from the public region of a physical disk that is under Volume Manager Control. Each volume manager disk corresponds to one physical disk.

  • A Volume manager disk is given a disk media name when it is added to a disk group which can be default or unique user defined

Creating a volume Manager Disk:
# vxdisksetup –i <diskname>

or

# vxdiskadm (utility)

VxVM and Data Storage

VxVM uses two types of objects to handle storage management:

Physical objects
Physical disks, or other hardware, with block and raw operating system device interfaces that are used to store data.

Virtual objects
When one or more physical disks are brought under the control of VxVM, it creates virtual objects called volumes on those physical disks. Each volume records and retrieves data from one or more physical disks. Volumes are accessed by file systems, databases, or other applications the same way that physical disks are accessed.
Volumes are also composed of other virtual objects (plexes and subdisks) that are used in changing the volume configuration. Volumes and their virtual components are called virtual objects, or VxVM objects.