Veritas Volume Manager
What are the daemons in VERITAS?
@vxconfigd
@vxiod
@vxrelocd
@vxnotify
@vxconfigbackupd
@vxcached
VXVM Region:-
Private Region:-
A small area where configuration information is stored. A disk header label, configuration records for VxVM objects (such as volumes, plexes and subdisks), and an intent log for the configuration database are stored here. The default private region size is 32 megabytes, which is large enough to record the details of several thousand VxVM objects in a disk group.
Public Region:
An area that covers the remainder of the disk, and which is used for the allocation of storage space to subdisks.
To start the vxvm daemons = vxconfigd
To initialize vxvm = vxdctl init
To enable vxvm= vxdctl enable
To list disk =vxdisk -e list
======================================================================= Veritas Naming scheme
1.Operting system-based naming scheme
2.Enclosure based naming scheme
vxddladm get namingscheme--->to check the naming scheme
enclosure based -disk name like--->disk_0,disk_1
vxdisk list----->to list the disk
anytime u can the change the naming scheme on fly..
vxddladm set namingscheme=osn---> to change the naming from enclosure based scheme
vxdisk list---> osn-disk will like c1t0d0s2,c1t3d0
vxddladm set namingscheme=ebn-----> to change the naming scheme from osn
vxdisk -e list-----> to list the enclosure & OS based disks
2.Discover new disks in Veritas
cfgadm -al ----------> scan new disk in OS level
devfsadm -Cvc disk ---------> scan new disk in os level
vxdisk scandisks -------> scan disk in veritas level
vxdctl enable or vxconfigd -k ------> In older version scan the disk restartig vxvm daemon
vxdisk -e list -----> To list the disk
3.Bringing the disk in to Veritas control:-
/etc/vx/bin/vxdisksetup -i disk_0 ---> to bing disk to veritas control
/etc/vx/bin/vxdisksetup -i disk_1
by default this format the disk in CDS format
other formats are --- sliced & simple
sliced will be used for boot disks only
vxdisksetup -i disk_0 format=simple or sliced -->to bring disk under veritas control specified format
vxdisk list
output under veritas disk like type"auto:cdsdisk"
Diskgroup Operation
1.Creating,adding & remove disk from Disk Group:
vxdg init UXDG uxdisk1=disk_0 uxdisk2=disk_1 ----> to create the new disk group with disk_0,disk_1
vxdg -g UXDG adddsik uxdisk3=disk_2 ----> To add new disk in excisting diskgroup
vxdg -g UXDG rmdisk uxdisk3 ----> To remove the disk from disk group
vxdg destroy <diskgroup_name> ----> To destroy the disk group
2.Deporting diskgroup:
after un-mounting the volume,you can deport the diskgroup.
vxdg deport <diskgroup>
vxdg -n <new-group-name> deport <old-group-name>
vxdg list -------> to see the imported diskgroup
vxdisk -o alldgs list ------> deported diskgroup disks
3. Re-Naming the diskgroup:
vxdg -n <newdgname> <olddgname> -----> To rename the diskgroup
4.Diskgroup configuration backup
Whenever there is a configuration change in diskgroup,automatically vxvm backup the new configuration
under /etc/vx/cbr/bk
ls -lrt /etc/vx/cbr/bk -----> to list the configuration file
/etc/vx/bin/vxconfigbackup -----> To backup diskgroup configuration ...if no changed in diskgroup error will
backup not necessary
/etc/vx/bin/vxconfigbackup -l /var/tmp ---> to take curret config backup specific location
5. Diskgroup configuration restore
/etc/vx/bin/vxconfigrestore -p UXDG -----> To Pre-commit the changes
/etc/vx/bin/vxconfigrestore -c UXDG -----> To commit the changes
/etc/vx/bin/vxcondigrestore -d UXDG -----> To abord the pre-commit
vxprint -g UXDG ------> TO disk group is OK.
========================================================================
Volume Operation
1.Concatenation Volume:
vxassist -g diskgroup make vol_name size layout=format disk_name
vxassist -g UXDG make concat1 50M uxdisk1 ----> to create concatenation volume.
mkfs -F vxfs /dev/vx/rdsk/UXDG/concat1 ------> to create vxfs file system
mount -F vxfs /dev/vx/dsk/UXDG/concat1 /mountpint
2.Stripped Volume
-------------------
vxassist -g UXDG make vol_stripe 100M uxdisk1 uxdisk2 layout=stripe stripr unit=32k
1 plex & 2 subdisk
mkfs -F vxfs /dev/vx/rdsk/UXDG/vol_stripe -----> To create file system..
3.Mirrored volume
vxassist -g UXDG make vxmirror 50M layout=mirror --->one way mirror willhave 2 plex,two way mirror will hae 3 plex
4.Mirrored-stripe or RAID 0+1 (Stripping+mirroring)
vxassist -g UXDG make raid01 50M layout=mirror-stripe
5.Stripped-Mirror or RAID-1+0 (Mirroring+stripe)
vxassist -g UXDG make raid10 100M layout=stripe-mirror
6.RAID-5 (striping with parity)
vxassist -g UXDG make raid5 100M layout=raid5
7.Removing Volume
1.Un-mounting the volume
2.Use vxassist to delete the volume
vxassist -d UXDG remove volume vol_name -----> remove the volume name..
========================================================================
Veritas Volume Resize
1.Increasing the volume size using-vxassist
determining how much space we can increase the volume
vxassist -g UXDG maxsize layout=mirror
Maximum volume size :92160(45Mb)
Re-Size the volume using vxassist
vxassist -g UXDG growby vol_name 10M
or
vxassist -g UXDG growto vol_name 60M
Re-size the vxfs filesystem using fsadm
#/usr/lib/fs/vxfs/fsadm -b 60M /vol_name
If the volume is not increased as you will get below error
# /usr/lib/fs/vxfs/fsadm -b 70M /smvol
UX:vxfs fsadm: ERROR: V-3-25811: cannot expand /dev/vx/rdsk/UXDG/smvol more than size of the underlying device - 122880 sectors
2.Increasing he volume and fileystem using vxresize
/etc/vx/bin/vxresize -g UXDG vol_name +10M
3.Decreasing the volume size Using -vxassist
Reduce the fileystem using fsadm
# /usr/lib/fs/vxfs/fsadm -b 50M /vol_name
Reduce the volume using vxassist
vxassit -g UXDG -f shrinkto vol_name 50M
or
vxassist -g UXDG -f shrinkby vol_name 10M
4.Decreasing the volume & file system using vxresize
# /etc/vx/bin/vxresize -g UXDG vol_name -10M
Difference among the two formats-
CDS Disks:-(Compressed Diagonal Storage)
VXVM Q/A & Important Commands
1.How many partitions are created in a disk when we initialize the disk under VxVM?
2 partitions
a.Private region created on slice 3
b.Public region created on slice4
2. What is the length of Private Region?
VxVM 5.0 = 32Mb
VxVM 4.0 = 1 Mb
3.How to move a volume to another disk except a particular one in Veritas Volume Manager?
To move a volume vg01 to any other disk except disk90 in Veritas Volume Manager:
# vxassist move vg01 !disk90
4.How to verify the main daemon for Veritas Volume Manager?
vxconfigd is the main daemon of Veritas Volume Manager which must be running at all times. It is started at system startup.
We can check its status by below given way:
# vxdctl mode
or
we can verify it is running with a ps command:
# ps -ef | grep vxconfigd
5.Why we do encapsulation of root disk? What's the difference between initialization and encapsulation?
Encapsulation will not destroy the data and it will be used root file system.
Initialization will destroy the data if its already exists on the disks
6.But why we do encapsulation? What's the need of it?
To bring the root disks in vxvm control .
Some Important Commands :-
#vxmake plex <plex name> sd=<subdisk name>---> To create plex from a sub disk
#vxmake sd subdisk-80 disk 80,0,10000 ---> To create subdisk from disk in VXVM.
#vxmake sd subdisk-80 disk 80,0,10000 ---> To create another sub disk from same disk
#vxmend off <plex name> --->set plex offline
#vxmend on <plex name> --->set plex online
#vxmend fix clean <plex name> --->Pleax to a clean state
#vxplex att <volname> <plex name> ----->attach plex to a volume
#vxprint -ht -->display all the avaliable information in VXVM.
#vxprint -l <plexname> or vxprint -lp ---->display the information abot plex
#vxprint -l <subdisk> or vxprint -st ----> Information about sub disk
#vxprint -l <volumename> or vxprint -vl or vxprint -vt ----> Information about volume name.
#vxrecover -s <volume name> ---> Recover a volume
#vxrecover 0s ---> to recover all the volumes in VXVM..
# vxsd join subdisk-88 subdisk-77 subdisk-99-->To join subdisk-88 and subdisk-77 to create the new bigger subdisk-99.
#vxtrace <volume name> ---> trace the selected volume
#vxva ---> VXVM GUI Mode
#vxvol maint <volume name> ---> to voulme in maintence mode on VXVM.
#vxtask list or vxtask monitor ---> Which Tasks is running in VXVM.
#vxconfigd -k or vxtask monitor ---> restart VXVM configuration Daemon
#vxtask monitor
#vxptint -htv ---> to determine volume status in VXVM
What are the daemons in VERITAS?
@vxconfigd
@vxiod
@vxrelocd
@vxnotify
@vxconfigbackupd
@vxcached
VXVM Region:-
Private Region:-
A small area where configuration information is stored. A disk header label, configuration records for VxVM objects (such as volumes, plexes and subdisks), and an intent log for the configuration database are stored here. The default private region size is 32 megabytes, which is large enough to record the details of several thousand VxVM objects in a disk group.
Public Region:
An area that covers the remainder of the disk, and which is used for the allocation of storage space to subdisks.
cdsdisk:-
The disk is formatted as a Cross-platform Data Sharing (CDS) disk that is suitable for moving between different operating systems. This is the default format for disks that are not used to boot the system.Typically, most disks on a system are configured as this disk type. However, it is not a suitable format for boot, root or swap disks, for mirrors or hot-relocation spares of such disks, or for Extensible Firmware Interface (EFI) disks.
Private and public region on same partition
Private and public region on same partition
The disk is formatted as a simple disk that can be converted to a CDS disk.
The disk is formatted as a sliced disk. This format can be applied to disks that are used to boot the system. The disk can be converted to a CDS disk if it was not initialized for use as a boot disk.
Private and Public region on different partition
Private and Public region on different partition
To start the vxvm daemons = vxconfigd
To initialize vxvm = vxdctl init
To enable vxvm= vxdctl enable
To list disk =vxdisk -e list
======================================================================= Veritas Naming scheme
1.Operting system-based naming scheme
2.Enclosure based naming scheme
vxddladm get namingscheme--->to check the naming scheme
enclosure based -disk name like--->disk_0,disk_1
vxdisk list----->to list the disk
anytime u can the change the naming scheme on fly..
vxddladm set namingscheme=osn---> to change the naming from enclosure based scheme
vxdisk list---> osn-disk will like c1t0d0s2,c1t3d0
vxddladm set namingscheme=ebn-----> to change the naming scheme from osn
vxdisk -e list-----> to list the enclosure & OS based disks
2.Discover new disks in Veritas
cfgadm -al ----------> scan new disk in OS level
devfsadm -Cvc disk ---------> scan new disk in os level
vxdisk scandisks -------> scan disk in veritas level
vxdctl enable or vxconfigd -k ------> In older version scan the disk restartig vxvm daemon
vxdisk -e list -----> To list the disk
3.Bringing the disk in to Veritas control:-
/etc/vx/bin/vxdisksetup -i disk_0 ---> to bing disk to veritas control
/etc/vx/bin/vxdisksetup -i disk_1
by default this format the disk in CDS format
other formats are --- sliced & simple
sliced will be used for boot disks only
vxdisksetup -i disk_0 format=simple or sliced -->to bring disk under veritas control specified format
vxdisk list
output under veritas disk like type"auto:cdsdisk"
Diskgroup Operation
1.Creating,adding & remove disk from Disk Group:
vxdg init UXDG uxdisk1=disk_0 uxdisk2=disk_1 ----> to create the new disk group with disk_0,disk_1
vxdg -g UXDG adddsik uxdisk3=disk_2 ----> To add new disk in excisting diskgroup
vxdg -g UXDG rmdisk uxdisk3 ----> To remove the disk from disk group
vxdg destroy <diskgroup_name> ----> To destroy the disk group
2.Deporting diskgroup:
after un-mounting the volume,you can deport the diskgroup.
vxdg deport <diskgroup>
vxdg -n <new-group-name> deport <old-group-name>
vxdg list -------> to see the imported diskgroup
vxdisk -o alldgs list ------> deported diskgroup disks
3. Re-Naming the diskgroup:
vxdg -n <newdgname> <olddgname> -----> To rename the diskgroup
4.Diskgroup configuration backup
Whenever there is a configuration change in diskgroup,automatically vxvm backup the new configuration
under /etc/vx/cbr/bk
ls -lrt /etc/vx/cbr/bk -----> to list the configuration file
/etc/vx/bin/vxconfigbackup -----> To backup diskgroup configuration ...if no changed in diskgroup error will
backup not necessary
/etc/vx/bin/vxconfigbackup -l /var/tmp ---> to take curret config backup specific location
5. Diskgroup configuration restore
/etc/vx/bin/vxconfigrestore -p UXDG -----> To Pre-commit the changes
/etc/vx/bin/vxconfigrestore -c UXDG -----> To commit the changes
/etc/vx/bin/vxcondigrestore -d UXDG -----> To abord the pre-commit
vxprint -g UXDG ------> TO disk group is OK.
========================================================================
Volume Operation
1.Concatenation Volume:
vxassist -g diskgroup make vol_name size layout=format disk_name
vxassist -g UXDG make concat1 50M uxdisk1 ----> to create concatenation volume.
mkfs -F vxfs /dev/vx/rdsk/UXDG/concat1 ------> to create vxfs file system
mount -F vxfs /dev/vx/dsk/UXDG/concat1 /mountpint
2.Stripped Volume
-------------------
vxassist -g UXDG make vol_stripe 100M uxdisk1 uxdisk2 layout=stripe stripr unit=32k
1 plex & 2 subdisk
mkfs -F vxfs /dev/vx/rdsk/UXDG/vol_stripe -----> To create file system..
3.Mirrored volume
vxassist -g UXDG make vxmirror 50M layout=mirror --->one way mirror willhave 2 plex,two way mirror will hae 3 plex
4.Mirrored-stripe or RAID 0+1 (Stripping+mirroring)
vxassist -g UXDG make raid01 50M layout=mirror-stripe
5.Stripped-Mirror or RAID-1+0 (Mirroring+stripe)
vxassist -g UXDG make raid10 100M layout=stripe-mirror
6.RAID-5 (striping with parity)
vxassist -g UXDG make raid5 100M layout=raid5
7.Removing Volume
1.Un-mounting the volume
2.Use vxassist to delete the volume
vxassist -d UXDG remove volume vol_name -----> remove the volume name..
========================================================================
Veritas Volume Resize
1.Increasing the volume size using-vxassist
determining how much space we can increase the volume
vxassist -g UXDG maxsize layout=mirror
Maximum volume size :92160(45Mb)
Re-Size the volume using vxassist
vxassist -g UXDG growby vol_name 10M
or
vxassist -g UXDG growto vol_name 60M
Re-size the vxfs filesystem using fsadm
#/usr/lib/fs/vxfs/fsadm -b 60M /vol_name
If the volume is not increased as you will get below error
# /usr/lib/fs/vxfs/fsadm -b 70M /smvol
UX:vxfs fsadm: ERROR: V-3-25811: cannot expand /dev/vx/rdsk/UXDG/smvol more than size of the underlying device - 122880 sectors
2.Increasing he volume and fileystem using vxresize
/etc/vx/bin/vxresize -g UXDG vol_name +10M
3.Decreasing the volume size Using -vxassist
Reduce the fileystem using fsadm
# /usr/lib/fs/vxfs/fsadm -b 50M /vol_name
Reduce the volume using vxassist
vxassit -g UXDG -f shrinkto vol_name 50M
or
vxassist -g UXDG -f shrinkby vol_name 10M
4.Decreasing the volume & file system using vxresize
# /etc/vx/bin/vxresize -g UXDG vol_name -10M
Difference among the two formats-
CDS Disks:-(Compressed Diagonal Storage)
1. Post VxVM 4.x Disk2. Private Region and Public Region are created on a single partition.3. Disk usable across platforms and different operating systems.4. Disk not suitable for booting the operating system.
Sliced Disks:
1. Pre VxVM 4.x Disk2. Private Region and Public Region are created on separate partitions.3. Disk cannot be used across platforms and operating systems4. Disk suitable for booting the operating system
VXVM Q/A & Important Commands
1.How many partitions are created in a disk when we initialize the disk under VxVM?
2 partitions
a.Private region created on slice 3
b.Public region created on slice4
2. What is the length of Private Region?
VxVM 5.0 = 32Mb
VxVM 4.0 = 1 Mb
3.How to move a volume to another disk except a particular one in Veritas Volume Manager?
To move a volume vg01 to any other disk except disk90 in Veritas Volume Manager:
# vxassist move vg01 !disk90
4.How to verify the main daemon for Veritas Volume Manager?
vxconfigd is the main daemon of Veritas Volume Manager which must be running at all times. It is started at system startup.
We can check its status by below given way:
# vxdctl mode
or
we can verify it is running with a ps command:
# ps -ef | grep vxconfigd
5.Why we do encapsulation of root disk? What's the difference between initialization and encapsulation?
Encapsulation will not destroy the data and it will be used root file system.
Initialization will destroy the data if its already exists on the disks
6.But why we do encapsulation? What's the need of it?
To bring the root disks in vxvm control .
Some Important Commands :-
#vxmake plex <plex name> sd=<subdisk name>---> To create plex from a sub disk
#vxmake sd subdisk-80 disk 80,0,10000 ---> To create subdisk from disk in VXVM.
#vxmake sd subdisk-80 disk 80,0,10000 ---> To create another sub disk from same disk
#vxmend off <plex name> --->set plex offline
#vxmend on <plex name> --->set plex online
#vxmend fix clean <plex name> --->Pleax to a clean state
#vxplex att <volname> <plex name> ----->attach plex to a volume
#vxprint -ht -->display all the avaliable information in VXVM.
#vxprint -l <plexname> or vxprint -lp ---->display the information abot plex
#vxprint -l <subdisk> or vxprint -st ----> Information about sub disk
#vxprint -l <volumename> or vxprint -vl or vxprint -vt ----> Information about volume name.
#vxrecover -s <volume name> ---> Recover a volume
#vxrecover 0s ---> to recover all the volumes in VXVM..
# vxsd join subdisk-88 subdisk-77 subdisk-99-->To join subdisk-88 and subdisk-77 to create the new bigger subdisk-99.
#vxtrace <volume name> ---> trace the selected volume
#vxva ---> VXVM GUI Mode
#vxvol maint <volume name> ---> to voulme in maintence mode on VXVM.
#vxtask list or vxtask monitor ---> Which Tasks is running in VXVM.
#vxconfigd -k or vxtask monitor ---> restart VXVM configuration Daemon
#vxtask monitor
#vxptint -htv ---> to determine volume status in VXVM
No comments:
Post a Comment