Professional Documents
Culture Documents
Storage Foundation
Gary Phillips
Sr. Systems Engineer, Symantec
Topics of discussion
2
Storage
Foundation and
Veritas Volume
Manager
3
What is Veritas Storage Foundation?
4
What is Veritas Volume Manager?
5
VxVM overview: Base product
6
VxVM overview: Full product
7
Coexistence of VxVM and LVM disks
• Both VxVM and LVM recognize each other and the physical
disks associated with each
• VxVM detects and displays LVM disks
• VxVM does not allow selection of LVM disks for initialization,
addition or replacement
• Conversion utilities (vxvmconvert, vxcp_lvmroot) are provided
for converting LVM volume groups to VxVM disk groups
• Conversion utilities convert LVM disks to VxVM disk format
without losing data
8
VxVM data
structures and
objects
9
Conceptual comparison (terminology)
Plex Mirror
10
VM disk
11
VM disk
12
Example of a VM disk
disk01
Private Region
c0t4d0
Public Region
13
Disk group
14
Example of a Disk Group
dg01
16
Example of a subdisk
disk01
disk01-01
blks 0-9999
10000-15999
disk01-02
Free Space
17
Plex
18
Example of plexes
VM Disk: disk01
Disk plex1
disk01-01
blks 0-9999
plex2
disk01-02 10000-15999
Free Space
19
Volume
20
Example of a volume
Volume1
plex1
subdisk1
subdisk2
21
VxVM objects summary
Disk Group
Volume
plex01 plex02
disk04-01
disk01-03
disk03-02
disk02-03
disk01-03 disk02-03
VM Disk VM Disk VM Disk VM Disk
22
Basic VxVM
commands
23
How to complete VxVM tasks
24
VEA summary
25
VEA Main Window
26
VEA
27
vxdiskadm summary
28
vxdiskadm
29
Command Line Interface
30
Basic Commands
• vxdiskadm • vxvol
• vxprint • vxdisksetup
• vxassist • vxtask
• vxdg • vxdctl
• vxdisk • vxlicrep
• vxresize • vxlicinst
• vxedit • vea
31
Key directories
• /dev/vx/*
• /etc/vx/licenses/*
• /opt/VRTS*
• /var/adm/vx/veacmdlog
32
Command line:
Creating a VM disk
• Creates private and public data regions
• vxdiskadd initializes a disk for use by VxVM
• Example:
vxdiskadd c1t2d0
• Compare to LVM:
pvcreate /dev/rdsk/c1t2d0
33
Command line:
Creating a disk group
• Example:
vxdg init mydg mydg01=c1t2d0
• Compare to LVM:
mkdir /dev/myvg
mknod /dev/myvg/group c 64 0x090000
vgcreate myvg /dev/dsk/c1t2d0
34
Command line:
Creating a volume
• Volumes are made from at least one subdisk and one plex
• vxassist command is the simplest method
• Automatically creates subdisk(s) and plex(es) as needed
• Example:
vxassist –b -g mydg make vol1 10g
• Compare to LVM:
lvcreate –n lvol1 –L 10000 myvg
35
Migration from
LVM to VxVM
36
Migration from LVM to VxVM
• VxVM commands:
– vxcp_lvmroot – root disk conversion
– vxvmconvert – data volume group conversion
37
LVM root disk conversion
requirements
• Converting the root volume group (vg00)
– Need an unused LUN/physical disk
• Cannot be under control of either LVM or VxVM
– Copies all root logical volumes to new LUN (no encapsulation)
– Replace LVM data structures with VxVM data structures
– Original volume group (vg00) still exists under LVM
• Post-conversion activities
– Both boot/root volume/disk groups can co-exist for testing
– LVM-based LUN can be removed at any time
• vxdestroy_lvmroot
– When removed, mirror VxVM LUN back to the original LVM LUN for
mirrored root
• vxrootmir
38
Converting vg00 example
• # /etc/vx/bin/vxcp_lvmroot –v –b c0t4d0
– Creates a VxVM-rootable disk on c0t4d0. LVM root disk still
exists. The –b sets c0t4d0 as the primary boot device. This could
also be done with the setboot command.
• # /etc/vx/bin/vxdestroy_lvmroot –v c1t1d0
– Removes original LVM root disk and volume group (vg00).
• # /etc/vx/bin/vxrootmir -v -b c1t1d0
– Creates a mirror of the boot disk on c1t1d0. The –b sets c1t1d0
as the alternate boot device.
39
Data volume group conversion
40
Converting LVM volume group
process
41
# vxvmconvert menu
42
Command line conversion
43
Conversion example:
volume group display
--- Volume groups ---
VG Name /dev/vgtest102
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4607
VGDA 4
PE Size (Mbytes) 8
Total PE 9214
Alloc PE 9214
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vgtest102/lvol1
LV Status available/syncd
LV Size (Mbytes) 73712
Current LE 9214
Allocated PE 9214
Used PV 2
--- Physical volumes ---
PV Name /dev/dsk/c119t1d7
PV Status available
Total PE 4607
Free PE 0
Autoswitch On
PV Name /dev/dsk/c119t2d0
PV Status available
Total PE 4607
Free PE 0
Autoswitch On
44
Conversion example:
vxautoconvert
# vxautoconvert vgtest102
Convert LVM Volume Group vgtest102
45
Conversion example:
converted disk group
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
46
Parallel conversions
47
vxvmconvert tips
48
Is the system is booted on VxVM or
LVM?
• If you want to know is if the system is booted on VxVM or LVM.
• On a VxVM root:
# uname –r
B.11.23
# is_vxvmroot;echo $?
0
• On an LVM root:
# uname -r
B.11.23
# is_vxvmroot;echo $?
1
49
Q & A?
Additional slides -
LVM vs VxVM
Commands
51
HP-UX: LVM vs. VxVM Commands
LVM Description/Action VxVM Description/Action
lvchange Changes the vxedit or vxvol Creates, removes, and modifies Volume Manager records.
characteristics of set
logical volumes.
There is no single vxresize Resizes a file system and its underlying volume at the same time.
equivalent LVM
command.
lvlnboot Creates root, primary There is no equivalent command for this release.
and secondary swap
and dump volumes. It
also creates boot
areas on the disk.
lvcreate Creates a logical vxassist Creates volumes with the make parameter. Example: vxassist make vol_name 100M
volume. layout=stripe
lvextend Increases disk space vxassist Increases a volume in size with the growto or growby parameter. Example: vxassist
allocated to a logical growto vol_name 200M, vxassist growby vol_name 100Mvxassist creates and
volume. modifies volumes.
lvreduce Decreases disk vxassist Decreases a volume in size with the shrinkto or shrinkby parameters. Example: vxassist
space allocated to a shrinkto vol_name 200MMake sure you shrink the file system before shrinking the
logical volume. volume.
lvremove Removes one or vxedit Removes volumes with the -rf rm parameters.Example: vxedit -rf rm vol_name
more logical volumes
from a volume group. vxassist Removes a volume with the remove volume parameters.Example: vxassist remove
volume vol_name
lvsplit Splits a mirrored vxassist The snapshot operation takes one of the attached temporary mirrors and creates a new
logical volume into snapshot volume with the temporary mirror as its one plex. Example: vxassist snapshot vol_name
two logical volumes. new_volume
lvmerge Reverses and The snapback operation returns the snapshot plex to the original volume from which it
converts the lvsplit was snapped. Example: vxassist snapback new_volume
logical volumes to a
single logical volume.
lvsync Synchronizes mirrors vxrecovervxvol The vxrecover command performs resynchronize operations for the volumes, or for
that are stale in one start volumes residing on the named disks (medianame or the VxVM name for the disk).
or more logical Example: vxrecover vol_name media_name
volumes.
52
HP-UX: LVM vs. VxVM Commands
pvdisplay Displays information about physical vxdisk list Lists information about VxVM disks. Example: vxdisk list disk_name
volumes in a volume group.
pvchange Sets physical volume characteristics to vxdiskvxdisk The vxdisk utility performs basic administrative operations on VxVM
allow/deny allocation of additional setvxedit disks. Operations include initializing and replacing disks, as well as
physical extents from this disk. taking care of some book-keeping necessary for the disk model
presented by the Volume Manager.
pvmove Moves allocated physical extents from vxevac Moves volumes off a disk.
source to destination within a volume
group. vxsd mv Performs volume operations on a subdisk. Moves the contents of old
subdisk onto the new subdisks and replaces old sub disk with the
new subdisks for any associations.
pvremove Removes the LVM header information vxdiskunsetup Removes the VxVM header information and releases the disk from
and releases the disk from LVM control. VxVM control.
vgcreate Creates a volume group. vxdiskaddvxdg init Creates a new disk group and/or adds disks to a disk group.
vgdisplay Displays information on all volume vxdg list Displays the contents of a disk group.
groups.
vxprint Displays information about all objects or a subset of objects.
vgchange Activates or deactivates one or more vxdg -g diskgroup Activates a shared disk group.
volume groups. set activation=
mode
vgextend Extends a volume group by adding one vxdiskadd Adds a disk to the disk group.
or more disks to it.
vxdiskadm Option 1 in the vxdiskadm menu adds disks to the disk group.
53
HP-UX: LVM vs. VxVM Commands
LVM Description/Action VxVM Description/Action
vgreduce Reduces a volume group by removing one or more vxdg Removes disks from a disk group.
disks from it. rmdisk
vgscan Scans all disks and looks for logical volume groups. vxinfo Displays information about volumes.
vgsync Synchronizes mirrors that are stale in one or more vxrecover Starts resynchronization and recovery of volumes.
logical volumes.
vgremove Removes the definition of a volume group from the vxdg deport Deports a disk group from the system.
system.
vxdiskadm Option 9 in the vxdiskadm menu removes a disk
group.
vgexport Removes a volume group from the system. vxdg Deports a disk group from the system.
deport
vgimport Adds a volume group to the system by scanning vxdg Imports a disk group.
physical volumes which have been vgexported. import
lvchange, lvextend, Performs operations on logical volumes. vxvol Operates on volume objects.
lvcreate, lvreduce
54
• Site for Storage Foundation Basic 5.0
– http://www.symantec.com/enterprise/support/downloads.jsp?pid=53132
55