Backing up your VIOS configuration with viosbr.After applying Fix Pack to my VIOS 2.1 server, I thought I’d try out the new viosbr command.
The man page for viosbr states that this command can be used to backup and restore the virtual I/O server configuration.
$ man viosbr
viosbr command
Purpose
Performs the operations for backing up the virtual and logical configuration, listing the configuration, and restoring the configuration of the Virtual I/O Server.
The viosbr command can be run only by the padmin user. …..
First I attempted the -view and -list options and found that the default location for these backup files was in padmin’s home directory under cfgbackups.
$ viosbr -view -list /hom
From the man page:
-list This option displays backup files from either the default location /hom Specified location.
So I created this directory and ran a viosbr backup.
$ mkdir cfgbackups
$ viosbr -backup -file bvio
$ viosbr -view -list bvio
A tar/gzipped file was created in the cfgbackups directory.
$ ls -ltr cfgbackups total 8 -rw-r--r-- 1 root staff 2959 Dec 9 09:47 bvio
This file is in XML format.
$ r oem oem_setup_env # set -o vi # pwd /home/padmin # cd cfgbackups
# ls -ltr | tail -1 -rw-r--r-- 1 root staff 2959 Dec 9 09:34 bvio
$ gzip -d bvio
$ ls -ltr | tail -1 -rw------- 1 root staff 24576 Dec 09 09:36 bvio
$ tar -tvf bvio -rw-r--r-- 0 1 23021 Dec 09 09:34:07 2009 bvio
$ tar -xvf bvio x bvio
$ vim bvio
<vios-backup> <general> <xml <xml <bac <bac <bac <aix <vio <code-list> </code-list> </general> <controller> <name>lhea0</name> <sta <loc <uni <type>LHEA</type> </controller> <controller> <name>ent0</name> <sta <loc <uni </controller> <controller> <name>ent1</name> <sta <loc <uni <type>LPHEA</type> </controller> ....
The –view flag allowed me to view the configuration information stored in the backup file.
$ viosbr -view -file /tmp
Controllers: ============ Name Phys Loc ---- -------- iscsi0 sissas0 U78A pager0 U799 vasi0 U799 usbhc0 U78A usbhc1 U78 vbsd0 U799 usbhc2 U78A sata0 U78A lhea0 U78A ibmvmc0 U799 ati0 fcs0 U78A fcs1 U78A vts0 U799 fscsi0 U78A ent0 U78A fscsi1 U78A ent1 U78A ent2 U799 ent3 U799 ent4 U799 ent5 U799 sas0 U78A
Physical Volumes: ================= Name Phys Loc ---- -------- hdisk0 U78A hdisk1 U78A hdisk2 U78A hdisk3 U78A hdisk4 U78A hdisk5 U78A hdisk6 U78A
Optical Devices: ================ Name Phys Loc ---- -------- cd0
Tape Devices: ============= Name Phys Loc ---- --------
Ethernet Interfaces: ==== Name ---- en0 en1 en2 en3 en4 en5 en6
Storage Pools: ============== SP Name PV Name ---- root
Shared Ethernet Adapters: ==== Name Physical Adapter Default Adapter Virtual Adapters ---- ---------------- --------------- ---------------- ent6 ent0 ent2 ent2
Virtual Server Adapters: ==== SVSA Phys Lo ---- -------- --- vhost0 U799
The –mapping flag provided me with VTD and SEA mappings (same as lsmap –all and lsmap –all –net)
$ viosbr -view -file /tmp SVSA Phys ------------------- ---- vhost0
VT Stat LU Backing Device hdisk1 Phys
SVSA Phys ------------------- ---- vhost0 U799
VT Stat LU Backing Device hdisk2 Phys
SVSA Phys ------------------- ---- vhost0 U799
VT Stat LU Backing Device hdisk5 Phys
SVEA Physloc ------- ---- ent2 U799
VT Stat Backing Device ent0 Phys
The –detail flag provided extended configuration information.
$ viosbr -view -file /tmp
Controllers: ============ Name Phys Loc ---- -------- iscsi0 Attribute Name Attribute Value -------------- --------------- initiator_name iqn.
sissas0 Attribute Name Attribute Value -------------- --------------- bus_io_addr 0x80000000 intr_lsi 289 dual_init_cfg default serial_number YL3000000001
pager0 U799 vasi0 U799 usbhc0 U78A ..etc..
The –type flag allows you to select details for a particular type of device for example, just SEA configuration information.
$ viosbr -view -file /tmp
Shared Ethernet Adapters: ==== Name Physical Adapter Default Adapter Virtual Adapters ---- ---------------- --------------- ---------------- ent6 ent0
$ viosbr -view -file /tmp
Virtual Server Adapters: ==== SVSA Phys Lo ---- ---- vhost0 U799 Listing PV only information.
$ viosbr -view -file /tmp
Physical Volumes: ================= Name Phys Loc ---- -------- hdisk0 U78A hdisk1 U78A hdisk2 hdisk3 U78A hdisk4 U78A hdisk5 U78A hdisk6 U78A
The –restore and –validate flags validate the devices on the server against the devices in the backup file.
$ viosbr -restore -file bvio Dev name during BACK ==== iscs siss page vasi usbh usbhc1 vbsd usbh sata lhea ibmv ati fcs fcs vts0 fscs ent fscs ent ent ent ent ent sas hdis hdis hdis hdis hdis hdis hdis en ent root vhos
This tool looks like a great way to backup and restore your VIOS configuration.
Of course backupios will also do this but it will take an image of the entire system not just the virtual and logical mappings.
Maybe we could automate the configuration of a VIOS using this tool.
|