VXVM Concepts & Configuration
VERITAS
Volume Manager
Basic
Concepts
Ø To bring a disk under Volume manager
control means that Volume Manager creates virtual objects and establishes
logical connections between those object and the underlying physical objects,
or disk.
Ø Volume manager removes all of the
partition table entries from the VTOC, and then rewrites the VTOC and creates
two partitions on the physical disk. One partition contains the private region
and the other contains the public region.
Ø Private
region:
It stores information about disk headers,
configuration copies, and kernel logs that Volume Manager uses to manage
virtual objects. The default size of the private region is 2048. Tag 15 always
used for this region.
Ø Public
region:
It consists the remainder of the free space on the
disk, that Volume Manager can use to assign a volume and is where application
store the data. Tag 14 always used for this region.
Ø How VxVM Presents the Disks in a Disk
Array as Volumes to the Operating System
Volume
Manager virtual object
- Volume Manager disks
- Disk groups
- Sub disks
- Plexes
- Volumes
VM Disks
When you place a
physical disk under VxVM control, a VM disk is assigned to the physical
disk. A VM disk is under VxVM control and is usually in a disk group. Each VM
disk corresponds to at least one physical disk or disk partition. A VM disk
typically includes a public region (allocated storage) and a private region
where VxVM internal configuration information is stored. Each VM disk has a
unique disk media name (a virtual disk name).
Disk Groups
A disk group is
a collection of VM disks that share a common configuration. A disk group
configuration is a set of records with detailed information about related VxVM
objects, their attributes, and their connections. Disk groups allow you to
group disks into logical collections. The default disk group
is rootdg (or root diskgroup),
Sub disks
A subdisk is a
set of contiguous disk blocks. A block is a unit of space on the disk. VxVM
allocates disk space using subdisks. A VM disk can be divided into one or more subdisks.The
default name for a VM disk is disk ## (such as disk01) and the default name for
a subdisk is disk.
Subdisk Example
Plexes
VxVM uses
subdisks to build virtual objects called plexes. A plex consists of one or
more subdisks located on one or more physical disks. For example, see the plex
vol01-01.
Example of a
Plex
Volumes
A volume is a
virtual disk device that appears to applications, databases, and file
systems like a physical disk device, but does not have the physical limitations
of a physical disk device. A volume consists of one or more plexes, each
holding a copy of theselected data in the volume.
Note VxVM
uses the default naming conventions of vol ## for volumes and vol for
plexes in a volume.
Example of a
Volume
Example:
Connections between VERITAS Volume Manager virtual objects and how they relate
to physical disks.
Volume
Layouts
Volume Layout is
the way plexes are configured to remap the volume address space through which
I/O is redirected at run-time. Volume layout are based on the concept of disk
spanning, which is the ability to logical combine physical disks in order to
store data across multiple disks.
Supported volume
layouts include:
1. Concatenation
and Spanning
2. Concatenated
Striping (RAID-0)
3. Mirroring
(RAID-1)
4. Striping with
Parity (RAID-5)
5. Layered
VXVM Daemons or
process
vxconfigd
vxiod
vxrelocd
vxconfigbackupd
VxVm Setup
When you install
and setup VxVM installation program, it create the root disk group rootdg. The
rootdg disk group is required so that VxVM configuration daemon (vxconfigd) can
start up in enabled mode.
When you place a
disk under Volume manager control, you can either preserve the data that exists
on the physical disk (encapsulation) or eliminate all of the data on the
physical disk (initialization).
Disk
Configuration stages in VXVM:
1. Initialize
the disk
2. Assign a disk
to disk group
3. Create volume
&assign disk space to volumes
Step by Step
Disk configuration in VXVM:
1. Initialize
the disk
$ vxdisksetup –i
c0t0d0
2. Create the
diskgroup
$vxdg init mydg
mydg01=c0t0d0
3. Add disks to
diskgroup
$vxdg –g mydg
adddisk mydg02=c0t1d0
4. Create volume
& assign disk spaace
$ vxassist –g
mydg make myvol 300M mydg01 mydg0
5. Create a
filesystem for newly created Volume
$ mkfs –F vxfs
/dev/vx/rdsk/mydg/myvol
6. Create the
mount point and attach this volume to that
$ mkdir /data
$ mount –F vxfs
/dev/vx/dsk/mydg/myvol /data
Day to Day
Operation Commands
Adding and
Managing Disks in VxVM
- Configures a disk to the Disk group
# vxdisksetup –i
c1t0d0
- Adding a disk to disk group
# vxdg –g newdg
addisk newdg02=c2t0d0
- View disk Information
# vxdisk list
- To view information about particular disks attached to the system
# vxdisk list
datadg01
- To view a summary of information for all disks
# vxdisk –s list
- To display the volume table of contents (VTOC) for a disk
# prtvtoc
/dev/rdsk/c1t0d0s2
- Evacuating / Removing a disk
# vxevac –g
datadg datadg02 datadg03
- Removing a disk from a disk group and place it in the free disk pool.
# vxdg –g newdg
rmdisk newdg02
# vxdiskunsetup
c1t0d0
- Note: Once the disk has been removed from its disk group, you can remove it from Volume Manager control completely by using the vxdiskunsetup command.
- Renaming a Disk
# vxedit –g
datadg rename datadg01 datadg03
- Steps to Move a Disk from one DG to another
#vxdg rmdisk
disk04
#vxdg -g mktdg
adddisk mktdg02=c0t3d0
Managing Disks
Groups in VxVM
- Creating a Disk Group
# vxdg init
newdg newdg01=c1t1d0
- To verify the diskgroup
# vxdisk list
- Steps to Deporting a Disk Group
# umount
/filesystem1
# vxdg deport
diskgroup
# vxdg deport
newdg
- Note: Deporting a disk group makes a disk group and its volume unavailable. To resume management of the disk group, it must be imported.
- deport and rename a disk group
# vxdg –n newrdg
deport newdg
- To deport a disk group and specify a new host
# vxdg –h serv1
deport newdg
- Importing a Deported Disk Group
# vxdg import
diskgroup
- To import and rename a disk group
# vxdg –n
newerdg import newdg
- To import and rename temporarily (means that the import cannot persist across reboot)
# vxdg –t –n
newerdg import newdg
- To import forcefully
# vxdg –f import
newdg
- Steps to Renaming a Disk Group
Eg:- To rename the disk group datadg to mktdg
# vxdg –n mktdg
deport datadg
# vxdg import
mktdg
# vxvol –g mktdg
startall
Or
# vxdg deport
datadg
# vxdg –n mktdg
import datadg
# vxvol –g mktdg
startall
- To display disk group names and IDs for each disk
# vxdisk –s list
- To display imported disk groups only
# vxdg list
- To display all disk groups, including deported disk groups
# vxdisk –o
alldgs list
- To display free space in a disk group
# vxdg free (
for all disk group)
# vxdg –g
diskgroup free (for a specific disk group)
- Displaying the Disk Group versions
# vxdg list
newdg
Or
# vxprint –l
- Upgrading the Disk Group Version
# vxdg [-T
versions] upgrade diskgroup
- To upgrade a disk group datadg from version 20 to 40
# vxdg -T 40
upgrade datadg
- To upgrade a disk group datadg from version 40 to the latest version
# vxdg upgrade
datadg
- To create a version 50 disk group
# vxdg –T 50
init newdg newdg01=c0t3d0s2
Managing Volumes
- To create a volume
# vxassist [-g
diskgroup] make volume_name length [attributes]
- Creating a Concatenated Volume
# vxassist –g
datadg make datavol 10m layout=nostrip
- To create a concatenated volume on specific disks
# vxassist –g
datadg make datavol 10g datadg02 datdg03
- To create a Striped volume
# vxassist [-g
diskgroup] make volume_name length layout=stripe ncol=n stripeunit=size [disk
…]
Example: To create a 20-megabyte striped volume
called payvol in acctdg that has 3 columns ,uses the default stripe unit
size and any available disks excepts for acctdg04
# vxassist –g
acctdg make payvol 20m layout=stripe ncol=3 !acctdg04
Example: To create a 20-megabyte striped volume
called expvol in acctdg that has 3 columns , has a stripe unit size of 64k
and any available disks are acctdg01 acctdg02 acctdg03
# vxassist –g
acctdg make payvol 20m layout=stripe ncol=3 stripeunit =64 acctdg01
acctdg02 acctdg03
- To create a RAID-5 Volume
# vxassist –g
acctdg make expvol 20m layout=raid5 stripeunit=32k acctdg01 acctdg02 acctdg03
acctdg04
- To create a mirrored Volume
# vxassist –g
datadg make datavol 5m layout=stripe, mirror
- To specify more than two mirror
# vxassist –g
datadg make datavol 5m layout=mirror nmirror=3
- To run process in background use flag –b
# vxassist –g
datadg -b make datavol 5m layout=mirror nmirror=3
- To estimate Volume Size
# vxassists –g
diskgroup maxsize attributes
# vxassists –g
datadg maxsize layout=raid5
- To determine that how much an existing volume can grow
# vxassists –g
datadg maxgrow datavol
- Displaying Volume Information
# vxprint –g
diskgroup [option]
- Removing a Volume
# vxassist –g
datadg remove volume datavol
- Adding a mirror to a Volume
# vxassist –g
diskgroup mirror volume_name
- To mirror all unmirrored Volume in a disk group
# vxmirror –g
diskgroup –a
- Removing a mirror
#vxassist [-g
diskgroup] remove mirror volume [!] dm_name
For example, for the volume datavol, to remove the
plex (mirror) that contains a subdisk from the disk datadg02
# vxassist –g
datadg remove mirror datavol ! datadg02
- Steps to remove a mirror .
# vxplex –g
datadg dis datavol-02
# vxedit –g
datadg –rf rm datavol-02
- Steps to Adding a file Systems
1) mkfs –F vxfs
/dev/vx/rdsk/datadg/datavol
2) mkdir /data
3) mount –F vxfs
/ dev/vx/rdsk/datadg/datavol/data
- Resizing a Volume
#vxassist –g
diskgroup {growto|growby|shrinkto|shrinkby} volume_name size
No comments:
Post a Comment