1个回答
2013-09-17
展开全部
在AIX中如何使用vg备份/恢复的方法将数据转移到新存储设备供稿者:闫绪 恢复备份到新盘
恢复到hdisk4上去:
p615:/>restvg -f /dev/rmt0 hdisk4Will create the Volume Group: vg-local
Target Disks: hdisk4
Allocation Policy:
Shrink Filesystems: no
Preserve Physical Partitions for each Logical Volume: noEnter y to continue: y
vg-local
loglv00
lv-local
New volume on /dev/rmt0:
Cluster size is 51200 bytes(100 blocks).
The volume number is 1.
The backup date is: Fri Jan 28 11:43:24 BEIST 2005
Files are backed up by name.
The user is root.
x 136 ./tmp/vgdata/vgdata.files19728
x 136 ./tmp/vgdata/vgdata.files
x 2699 ./tmp/vgdata/vg-local/filesystems
x 7 ./tmp/vgdata/vg-local/tapeblksz
x 2202 ./tmp/vgdata/vg-local/vg-local.data
x 336 ./tmp/vgdata/vg-local/backup.data
x 0 ./mnt/lv-local
x 0 ./mnt/lv-local/lost+found
x 0 ./mnt/lv-local/usrlib
x 330184 ./mnt/lv-local/usrlib/libamqccu2a_r.a
x 20852 ./mnt/lv-local/usrlib/libarm.a
x 25808 ./mnt/lv-local/usrlib/libarm2.a
x 76638 ./mnt/lv-local/usrlib/libarm4.a
x 202213 ./mnt/lv-local/usrlib/libasl.a
x 11024 ./mnt/lv-local/usrlib/libauthm.a
x 67571 ./mnt/lv-local/usrlib/libc128.a
x 1748480 ./mnt/lv-local/usrlib/libc_r.a
x 552448 ./mnt/lv-local/usrlib/libc_t.a
x 40 ./mnt/lv-local/usrlib/test.txt
The total size is 3040774 bytes.
The number of restored files is 19.查看结果
p615:/>lspv
hdisk0 005c39ff63baaa57 rootvg active
hdisk1 005c39ffbf1771fc None
hdisk4 005c39ffb2bc883d vg-local active
hdisk2 005c39ffb1d713f2 vg-fastt600 active
hdisk3 005c39ffb1d7161c vg-fastt600 activep615:/>lsvg
rootvg
vg-local
vg-fastt600p615:/>lsvg -o
vg-local
vg-fastt600
rootvgp615:/>lsvg -p vg-local
vg-local:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk4 active 7679 7673 1536..1530..1535..1536..1536p615:/>lsvg -l vg-local
vg-local:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfslog 1 1 1 open/syncd N/A
lv-local jfs 5 5 1 open/syncd /mnt/lv-localp615:/>lslv lv-local
LOGICAL VOLUME:lv-local VOLUME GROUP:vg-local
LV IDENTIFIER:005c39ff00004c PERMISSION:read/write
0000000101b7d46b3a.3
VG STATE:active/complete LV STATE:opened/syncd
TYPE:jfs WRITE VERIFY:off
MAX LPs:512 PP SIZE:4 megabyte(s)
COPIES:1 SCHED POLICY:parallel
LPs:5 PPs:5
STALE PPs:0 BB POLICY:relocatable
INTER-POLICY:minimum RELOCATABLE:yes
INTRA-POLICY:middle UPPER BOUND:32
MOUNT POINT:/mnt/lv-local LABEL:/mnt/lv-local
MIRROR WRITE CONSISTENCY:on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?:yes
Serialize IO ?:NOp615:/>lslv -l lv-local
lv-local:/mnt/lv-local
PV COPIES IN BAND DISTRIBUTION
hdisk4 005:000:000 100% 000:005:000:000:000p615:/>lslv -m lv-local
lv-local:/mnt/lv-local
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 1538 hdisk4
0002 1539 hdisk4
0003 1540 hdisk4
0004 1541 hdisk4
0005 1542 hdisk4p615:/>mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ --
/dev/hd4 / jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd2 /usr jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd9var /var jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd3 /tmp jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd1 /home jfs Jan 17 17:17 rw,log=/dev/hd8
/proc /proc procfs Jan 17 17:17 rw
/dev/hd10opt /opt jfs Jan 17 17:17 rw,log=/dev/hd8
/dev/lv00 /ptf jfs Jan 17 17:17 rw,log=/dev/hd8
/dev/lv01 /TSM jfs Jan 17 17:17 rw,log=/dev/hd8
/dev/lv-fastt600-1 /mnt/lv-fastt600-1 jfs Jan 27 10:51 rw,log=/dev/loglv01
/dev/lv-local /mnt/lv-local jfs Jan 28 13:39 rw,log=/dev/loglv00
p615:/>df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 2621440 2174960 18% 2257 1% /
/dev/hd 26291456 1610328 75% 57768 8% /usr
/dev/hd9var 131072 73616 44% 836 6% /var
/dev/hd3 9437184 3330360 65% 6413 1% /tmp
/dev/hd1 131072 11952 91% 548 4% /home
/proc - - - - - /proc
/dev/hd10opt 131072 85848 35% 404 3% /opt
/dev/lv00 4194304 776776 82% 486 1% /ptf
/dev/lv01 10354688 6409096 39% 942 1% /TSM
/dev/lv-fastt600-1 122880 112712 9% 18 1% /mnt/lv-fastt600-1
/dev/lv-local 40960 33312 19% 28 1% /mnt/lv-localp615:/>ls /mnt/lv-local
lost+found usrlibp615:/>ls /mnt/lv-local/usrlib
libamqccu2a_r.a libarm4.a libc128.a test.txt
libarm.a libasl.a libc_r.a
libarm2.a libauthm.a libc_t.a数据都在。
在另外一个telnet中重新启动模拟工作进程,一切正常。p615:/>./work
a /mnt/lv-local/usrlib
a /mnt/lv-local/usrlib/libamqccu2a_r.a 645 blocks.
a /mnt/lv-local/usrlib/libarm.a 41 blocks.
a /mnt/lv-local/usrlib/libarm2.a 51 blocks.
a /mnt/lv-local/usrlib/libarm4.a 150 blocks
恢复到hdisk4上去:
p615:/>restvg -f /dev/rmt0 hdisk4Will create the Volume Group: vg-local
Target Disks: hdisk4
Allocation Policy:
Shrink Filesystems: no
Preserve Physical Partitions for each Logical Volume: noEnter y to continue: y
vg-local
loglv00
lv-local
New volume on /dev/rmt0:
Cluster size is 51200 bytes(100 blocks).
The volume number is 1.
The backup date is: Fri Jan 28 11:43:24 BEIST 2005
Files are backed up by name.
The user is root.
x 136 ./tmp/vgdata/vgdata.files19728
x 136 ./tmp/vgdata/vgdata.files
x 2699 ./tmp/vgdata/vg-local/filesystems
x 7 ./tmp/vgdata/vg-local/tapeblksz
x 2202 ./tmp/vgdata/vg-local/vg-local.data
x 336 ./tmp/vgdata/vg-local/backup.data
x 0 ./mnt/lv-local
x 0 ./mnt/lv-local/lost+found
x 0 ./mnt/lv-local/usrlib
x 330184 ./mnt/lv-local/usrlib/libamqccu2a_r.a
x 20852 ./mnt/lv-local/usrlib/libarm.a
x 25808 ./mnt/lv-local/usrlib/libarm2.a
x 76638 ./mnt/lv-local/usrlib/libarm4.a
x 202213 ./mnt/lv-local/usrlib/libasl.a
x 11024 ./mnt/lv-local/usrlib/libauthm.a
x 67571 ./mnt/lv-local/usrlib/libc128.a
x 1748480 ./mnt/lv-local/usrlib/libc_r.a
x 552448 ./mnt/lv-local/usrlib/libc_t.a
x 40 ./mnt/lv-local/usrlib/test.txt
The total size is 3040774 bytes.
The number of restored files is 19.查看结果
p615:/>lspv
hdisk0 005c39ff63baaa57 rootvg active
hdisk1 005c39ffbf1771fc None
hdisk4 005c39ffb2bc883d vg-local active
hdisk2 005c39ffb1d713f2 vg-fastt600 active
hdisk3 005c39ffb1d7161c vg-fastt600 activep615:/>lsvg
rootvg
vg-local
vg-fastt600p615:/>lsvg -o
vg-local
vg-fastt600
rootvgp615:/>lsvg -p vg-local
vg-local:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk4 active 7679 7673 1536..1530..1535..1536..1536p615:/>lsvg -l vg-local
vg-local:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfslog 1 1 1 open/syncd N/A
lv-local jfs 5 5 1 open/syncd /mnt/lv-localp615:/>lslv lv-local
LOGICAL VOLUME:lv-local VOLUME GROUP:vg-local
LV IDENTIFIER:005c39ff00004c PERMISSION:read/write
0000000101b7d46b3a.3
VG STATE:active/complete LV STATE:opened/syncd
TYPE:jfs WRITE VERIFY:off
MAX LPs:512 PP SIZE:4 megabyte(s)
COPIES:1 SCHED POLICY:parallel
LPs:5 PPs:5
STALE PPs:0 BB POLICY:relocatable
INTER-POLICY:minimum RELOCATABLE:yes
INTRA-POLICY:middle UPPER BOUND:32
MOUNT POINT:/mnt/lv-local LABEL:/mnt/lv-local
MIRROR WRITE CONSISTENCY:on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?:yes
Serialize IO ?:NOp615:/>lslv -l lv-local
lv-local:/mnt/lv-local
PV COPIES IN BAND DISTRIBUTION
hdisk4 005:000:000 100% 000:005:000:000:000p615:/>lslv -m lv-local
lv-local:/mnt/lv-local
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 1538 hdisk4
0002 1539 hdisk4
0003 1540 hdisk4
0004 1541 hdisk4
0005 1542 hdisk4p615:/>mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ --
/dev/hd4 / jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd2 /usr jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd9var /var jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd3 /tmp jfs Jan 17 17:15 rw,log=/dev/hd8
/dev/hd1 /home jfs Jan 17 17:17 rw,log=/dev/hd8
/proc /proc procfs Jan 17 17:17 rw
/dev/hd10opt /opt jfs Jan 17 17:17 rw,log=/dev/hd8
/dev/lv00 /ptf jfs Jan 17 17:17 rw,log=/dev/hd8
/dev/lv01 /TSM jfs Jan 17 17:17 rw,log=/dev/hd8
/dev/lv-fastt600-1 /mnt/lv-fastt600-1 jfs Jan 27 10:51 rw,log=/dev/loglv01
/dev/lv-local /mnt/lv-local jfs Jan 28 13:39 rw,log=/dev/loglv00
p615:/>df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 2621440 2174960 18% 2257 1% /
/dev/hd 26291456 1610328 75% 57768 8% /usr
/dev/hd9var 131072 73616 44% 836 6% /var
/dev/hd3 9437184 3330360 65% 6413 1% /tmp
/dev/hd1 131072 11952 91% 548 4% /home
/proc - - - - - /proc
/dev/hd10opt 131072 85848 35% 404 3% /opt
/dev/lv00 4194304 776776 82% 486 1% /ptf
/dev/lv01 10354688 6409096 39% 942 1% /TSM
/dev/lv-fastt600-1 122880 112712 9% 18 1% /mnt/lv-fastt600-1
/dev/lv-local 40960 33312 19% 28 1% /mnt/lv-localp615:/>ls /mnt/lv-local
lost+found usrlibp615:/>ls /mnt/lv-local/usrlib
libamqccu2a_r.a libarm4.a libc128.a test.txt
libarm.a libasl.a libc_r.a
libarm2.a libauthm.a libc_t.a数据都在。
在另外一个telnet中重新启动模拟工作进程,一切正常。p615:/>./work
a /mnt/lv-local/usrlib
a /mnt/lv-local/usrlib/libamqccu2a_r.a 645 blocks.
a /mnt/lv-local/usrlib/libarm.a 41 blocks.
a /mnt/lv-local/usrlib/libarm2.a 51 blocks.
a /mnt/lv-local/usrlib/libarm4.a 150 blocks
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询