VXVM-4 (Dg)
What we will learn in
Next Few Pages,
·
Disabling
Disk Group
·
Destroy
/ Recover Disk Groups
·
Disk
Group Configuration backup / restore (incomplete)
DISABLING Dg,
Just deport it, it
will disable
DESTROY-RECOVER Dg,
root@pr-01:>/#
vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:none - - online invalid
c2t2d0s2 auto:sliced test-disk2 test-dg1
online
c2t3d0s2 auto:sliced test-disk3 testdg2
online
c2t4d0s2 auto:sliced test-disk4 testdg2
online
c2t5d0s2 auto:sliced - - online
root@pr-01:>/# vxdg
destroy testdg2
root@pr-01:>/#
vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:none - - online invalid
c2t2d0s2 auto:sliced test-disk2 test-dg1
online
c2t3d0s2 auto:sliced -
- online
c2t4d0s2 auto:sliced - - online
c2t5d0s2 auto:sliced - - online
For recovery at least
we should know the disks used in that Dg, and the disks should intact.
We have to find out
the dgid from the disks [ any disk used in that Dg]
root@pr-01:>/#
vxdisk -s list c2t3d0s2 |grep -i dgid
dgid: 1411456168.28.pr-01
root@pr-01:>/#
vxdisk -s list c2t4d0s2 |grep -i dgid
dgid: 1411456168.28.pr-01
root@pr-01:>/# vxdg
import 1411456168.28.pr-01
root@pr-01:>/# vxdg
list
NAME STATE ID
test-dg1 enabled 1411453154.22.pr-01
testdg2 enabled 1411456168.28.pr-01
Look… we got our Dg
back… but the disks should be intact
Dg CONFIG BACKUP / RESTORE
Vxconfigbackupd daemon
monitors the changes to vxvm config and automatically records that change
Vxconfigbackup &
vxconfigrestore
Vxnotify is to monitor
the changes related to disks & configuration managed by vxcongigd daemon
Let’s see the magic of
vxnotify
In one terminal I’m
running
#vxnotify
And in other terminal
I will do some changes, Let’s see what happen…
root@pr-01:>/#
vxnotify [term 2]
connected
root@pr-01:>/# vxdg
deport testdg2 [term 1]
root@pr-01:>/# vxnotify [term
2]
connected
change disk c2t3d0s2
dm - dg - dgid -
change disk c2t4d0s2
dm - dg - dgid -
deport dg testdg2 dgid
1411456168.28.pr-01
root@pr-01:>/# vxdg
import testdg2 [term 1]
root@pr-01:>/#
vxnotify [term 2]
connected
change disk c2t3d0s2
dm - dg - dgid -
change disk c2t4d0s2
dm - dg - dgid -
deport dg testdg2 dgid
1411456168.28.pr-01
change disk c2t3d0s2
dm test-disk3 dg testdg2 dgid 1411456168.28.pr-01
change disk c2t4d0s2
dm test-disk4 dg testdg2 dgid 1411456168.28.pr-01
import dg testdg2
dgid=1411456168.28.pr-01
dgname change dgid
1411456168.28.pr-01 new testdg2 old testdg2
ok… we can use this
utility while performing some task, to verify the results
auto config backup are
located at,
/etc/vx/cbr/bk
root@pr-01:>/# cd
/etc/vx/cbr/bk
root@pr-01:>/etc/vx/cbr/bk#
ls -l
total 2
drwxr-xr-x 2 root
root 512 Sep 23 12:50
test-dg1.1411453154.22.pr-01
root@pr-01:>/#
vxconfigbackup
VxVM vxconfigbackup
ERROR V-5-2-3694 Configuration Copy for diskgroup test-dg1 has not changed
since last backup (Tue Sep 23 12:49:16 IST 2014). Backup is not necessary.
VxVM vxconfigbackup
NOTICE V-5-2-6133 Start backing up diskgroup testdg2 to
/etc/vx/cbr/bk/testdg2.1411456168.28.pr-01 ...
VxVM NOTICE V-5-2-3100 Backup complete for diskgroup:
testdg2
=========
It is telling about
test-dg1 that, its config has not changed so no need to take bkp
And bkp for testdg2 is
processed and completed.
root@pr-01:>/# cd
/etc/vx/cbr/bk
root@pr-01:>/etc/vx/cbr/bk#
ls -l
total 4
drwxr-xr-x 2 root
root 512 Sep 23 12:50
test-dg1.1411453154.22.pr-01
drwxr-xr-x 2 root
root 512 Sep 23 16:09
testdg2.1411456168.28.pr-01
Now I want to take the
bkp at specific location…
root@pr-01:>/etc/vx/cbr/bk#
vxconfigbackup -l /var/tmp
VxVM vxconfigbackup
NOTICE V-5-2-6133 Start backing up diskgroup test-dg1 to
/var/tmp/test-dg1.1411453154.22.pr-01 ...
VxVM NOTICE V-5-2-3100 Backup complete for
diskgroup: test-dg1
VxVM vxconfigbackup
NOTICE V-5-2-6133 Start backing up diskgroup testdg2 to
/var/tmp/testdg2.1411456168.28.pr-01 ...
VxVM NOTICE V-5-2-3100 Backup complete for
diskgroup: testdg2
root@pr-01:>/# ls
-l /var/tmp
drwxr-xr-x 2 root
root 512 Sep 23 16:13
test-dg1.1411453154.22.pr-01
drwxr-xr-x 2 root
root 512 Sep 23 16:14
testdg2.1411456168.28.pr-01
root@pr-01:>/#
vxconfigrestore -p testdg2
VxVM vxconfigrestore
ERROR V-5-2-3705 Diskgroup testdg2 is currently online imported.
root@pr-01:>/# vxdg
deport testdg2
root@pr-01:>/#
vxconfigrestore -p testdg2
Diskgroup testdg2
configuration restoration started ......
VxVM vxconfigrestore
ERROR V-5-2-3703 Diskgroup testdg2 appears to be a deported disk group.
root@pr-01:>/#
vxconfigrestore testdg2
Diskgroup testdg2
configuration restoration started ......
VxVM vxconfigrestore
ERROR V-5-2-3703 Diskgroup testdg2 appears to be a deported disk group.
root@pr-01:>/# vxdg
import testdg2
root@pr-01:>/#
vxconfigrestore testdg2
VxVM vxconfigrestore
ERROR V-5-2-3705 Diskgroup testdg2 is currently online imported.
( I need to check on
this & will Update soon )
No comments:
Post a Comment