Beginner's Lesson - VERITAS Volume Manager For Solaris: 1. Physical Disks
Beginner's Lesson - VERITAS Volume Manager For Solaris: 1. Physical Disks
Beginner's Lesson - VERITAS Volume Manager For Solaris: 1. Physical Disks
1. Physical Disks
o
o
o
o
o
o
Disk Groups
Volumes
Plexes:
Summary Transformation of Physical disks into Veritas Volumes
Solaris Volume Manager Vs Veritas Volume Manager
o
o
Veritas Volume Manager is a storage management application by Symantec , which allows you to
manage physical disks as logical devices called volumes.
VxVM uses two types of objects to perform the storage management
1. Physical objects are direct mappings to physical disks
2 . Virtual objects are volumes, plexes, subdisks and diskgroups.
a. Disk groups are composed of Volumes
b. Volumes are composed of Plexes and Subdisks
c. Plexes are composed of SubDisks
d. Subdisks are actual disk space segments of VxVM disk ( directly mapped from the physical disks)
1. Physical Disks
Physical disk is a basic storage where ultimate data will be stored. In Solaris physical disk names uses
the convention like c#t#d# where c# refers to controller/adapter connection, t# refers to the SCSI
target Id , and d# refers to disk device Id. Below figure illustrates how the disk name changes
depending on the connection.
Physical disks could be coming from different sources within the servers e.g. Internal disks to the
server , Disks from the Disk Array and Disks from the SAN.
Type
Receptacle Occupant Condition
scsi-bus connected configured unknown
disk
connected configured unknown
disk
connected configured unknown
tape
connected configured unknown
c1
c1::dsk/c1t0d0
c1::dsk/c1t1d0
configured
scsi-bus
connected configured unknown
unavailable connected unconfigured unknown
unavailable connected unconfigured unknown < == disk not
Type
Receptacle Occupant Condition
scsi-bus connected configured unknown
disk
connected configured unknown
tape
connected configured unknown
scsi-bus
connected configured unknown
disk
connected configured unknown
disk
connected configured unknown
# devfsadm
#echo|format
Additional Procedure : Click here to check the procedure to add Internal FC-AL disks
error indicates that the disk has neither been initialized nor encapsulated
by VxVM. The disk is uninitialized.
online indicates that the drive has been initialized or encapsulated.
online invalid indicated that disk is visible to VxVM but not controlled by
VxVM
If disks are visible with format command but not visible with vxdisk list command,
run below command to scan the new disks for VxVM
# vxdctl enable
Now you should see new disks with the status of Online Invalid
2. Initialize each disk with vxdisksetup command
#/etc/vx/bin/vxdisksetup -i
after running this command vxdisk list should see the status as online for all the
newly initialized disks
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 the selected data in the volume.
Plexes:
VxVM uses subdisks to create virtual objects called plexes. A plex consists of one or more subdisks
located on one or more physical disks.
From the below diagram you can observer below points
The Diskgroup named Diskgroup_o1 is created using 4 different VM disks named as
each plex is copy of other. Both the plexes formed with different subdisks of either same size or
different size.
raid5_vol is a raid5 ( striped with parity) volume which build up using 3 different plexes
formed with the subdisks of 3 different VM disks.
with
different
plex
volumes
i.e.
o
o
This is a continuation post for our previous post Beginners Lesson VERITAS Volume Manager for
Solaris
Learning VxVM administration will be much easier by understanding below three things>
1. How Veritas Volume Manager treats Operating System Native Disks into Veritas Volumes
2. What are the operations we can do in VxVM and what commands are used to perform those
operations
3. What are the background services/daemons/Configuration files required to make VxVM work in
normal way
Below Diagram will gives you complete picture how VxVM converts Solaris native disks into Diskgroups,
Volumes, Plexes and Subdisks.
Below given Command Reference for Veritas Volume Manager helps you to perform VxVM administration
operations using commands
vxdisk
vxedit
vxunreloc
VxVM diskgroup related operations can be done by using the command vxdg
VxVM Volume related operations cab be done using the below commands
vxassist
vxresize
vxvol / vxrecover
To administrate Dynamic Multipathing and Device Discovery layer we use the commands
vxdmpadm
vxddladm
# vxdisksetup -i c2t0d0
# vxdisksetup -i c2t1d0
# vxdisksetup -i c2t2d0
Create a disk group named database1 and add the six disks:
# vxdg init database1 disk01=c1t0d0 disk02=c1t1d0 disk03=c1t2d0
# vxdg -g database1 adddisk disk04=c2t0d0 disk05=c2t1d0 disk06=c2t2d0
Using the top down (modern) technique, create a RAID-5 volume named db01 of size 2 GB on the six
disks (5 + log). Also, create and mount a UFS file system on the volume:
#
#
#
#
vxassist -g database1 make db01 2g layout=raid5 disk01 disk02 disk03 disk04 disk05 disk06
newfs /dev/vx/rdsk/database1/db01
mkdir /db01
mount /dev/vx/dsk/database1/db01 /db01
1 GB = 2097152 sectors
Subdisks should be cylinder aligned.
If disk uses 1520 sectors/cylinder, subdisk size = 2097600 sectors.
#
#
#
#
#
#
vxmake -g database1
vxmake -g database1
vxmake -g database1
vxmake -g database1
vxmake -g database1
vxvol start db02
sd sd01 disk01,0,2097600
sd sd02 disk04,0,2097600
plex plex01 sd=sd01:0/0
plex plex02 sd=sd02:0/0
-U fsgen vol db02 plex=plex01,plex02
Change the permissions of the volume so that dba is the owner and dbgroup is the group:
# vxedit set user=dba group=dbgroup mode=0744 db02
Destroy volume and remove disks from disk group database1. Also, remove disks from
volume manager control:
#
#
#
#
# vxdiskunsetup c1t2d0
# vxdiskunsetup c1t3d0...
Advanced vxmake Operation: Create a three-way striped volume:
#
#
#
#
#
#
Advanced vxmake Operation: Create a RAID 0+1 volume with a DRL Log:
#
#
#
#
#
#
#
#
#
#
Import disk group vxdg import diskgroup Destroy disk group vxdg destroy diskgroup List disk groups
vxdg list
List diskgroup details vxdg list diskgroup Remove disk from diskgroup vxdg g diskgroup rmdisk
diskname
Upgrade disk group version vxdg [-T version] upgrade diskgroup Move an object between DGs vxdg
move sourcedg targetdg object...
Split objects between DGs vxdg split sourcedg targetdg object... Join disk groups vxdg join sourcedg
targetdg
List objects affected by a disk group move operation vxdg listmove sourcedg targetdg object...Subdisk
Operations
Create a subdisk vxmake -g diskgroup sd subdiskname diskname offset length Remove a subdisk
vxedit -g diskgroup rm subdisk_name Display subdisk info vxprint st vxprint -l subdisk_name
Associate a subdisk to a plex vxsd assoc plex_name subdisk_name
Dissociate a subdisk vxsd dis subdisk_name
Plex Opertions Create a plex vxmake -g diskgroup plex plex_namesd=subdisk_name,
Associate a plex (to a volume) vxplex g diskgroup att vol_name plex_name
Dissociate a plex vxplex dis plex_name Remove a plex vxedit g diskgroup rm plex_name List all plexes
vxprint -lp
Detach a plex vxplex g diskgroup det plex_name Attach a plex vxplex g diskgroup att vol_name
plex_name
Volume Operations create a volume vxassist -g diskgroup make vol_name size layout=format
diskname
Or vxmake -g diskgroup vol vol_name len=size plex plex_name
Remove a volume vxedit -g diskgroup -rf rm vol_name or vxassist -g diskgroup remove volume
vol_name
Display a volume vxprint -g diskgroup -vt vol_name vxprint -g diskgroup -l vol_name Change