张老大给的资料,刘老大帮忙讲解的.
相当有意思!
***************************************************
* 目的: 通过逻辑卷的镜像,实现数据迁移 *
* 环境: 服务器 - HP 2000 *
* 存储1 - HP XP512 (OPEN-E: 8EA) *
* 存储2 - HP EVA8K (LUN 30GB: 4EA) *
* 注:XP512 的数据迁移到EVA8K *
***************************************************
***************************************************
* Step 1:创建新的Volume Group *
* vg name:vg21 *
* pvg name:vg_21_a *
* storage:XP512 *
***************************************************
mkdir /dev/vg21
mknod /dev/vg21/group c 64 0x210000
vgcreate -s 16 -p 64 -e 10000 -g pvg_21_a vg21 /dev/dsk/c14t1d0
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d1
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d2
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d3
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d4
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d5
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d6
vgextend -g pvg_21_a vg21 /dev/dsk/c14t1d7
***************************************************
* Step 2:创建新的Logical Volume *
* lv name:lvdt01 *
* Size : 10GB *
* storage:XP512 *
***************************************************
lvcreate -s g -D y -n lvdt01 -L 10240 /dev/vg21
lvchange -r N /dev/vg21/lvdt01
mkdir -p /test070420
newfs -F vxfs -b 8192 -o largefiles /dev/vg21/rlvdt01
mount -F vxfs -o rw,suid,largefiles,delaylog,datainlog /dev/vg21/lvdt01 /test070420
***************************************************
* Step 3:扩容 Volume Group *
* vg name:vg21 *
* pvg name:vg_21_b *
* storage:EVA8K *
***************************************************
pvcreate /dev/rdsk/c6t0d1
pvcreate /dev/rdsk/c6t0d2
pvcreate /dev/rdsk/c6t0d3
pvcreate /dev/rdsk/c6t0d4
vgcreate -s 16 -p 64 -e 10000 -g pvg_21_b vg21 /dev/dsk/c6t0d1
vgextend -g pvg_21_b vg21 /dev/dsk/c6t0d2
vgextend -g pvg_21_b vg21 /dev/dsk/c6t0d3
vgextend -g pvg_21_b vg21 /dev/dsk/c6t0d4
***************************************************
* Step 4:创建 LV 镜像 *
* lv name:lvdt01 *
* storage:EVA8K *
***************************************************
lvextend -m 1 /dev/vg21/lvdt01 pvg_21_b
***************************************************
* Step 5:监控同步 *
* XP512<==> EVA8K *
***************************************************
lvdisplay -v /dev/vg21/lvdt01 |grep stale
***************************************************
* Step 6:拆除 LV 镜像 *
* lv name:lvdt01 *
* storage:XP512 *
***************************************************
lvreduce -m 0 /dev/vg21/lvdt01 /dev/dsk/c14t1d0 /dev/dsk/c14t1d1 /dev/dsk/c14t1d2 /dev/dsk/c14t1d3 /dev/dsk/c14t1d4 /dev/dsk/c14t1d5 /dev/dsk/c14t1d6 /dev/dsk/c14t1d7
***************************************************
* Step 7:确认数据是否可用 *
* storage:EVA8K *
***************************************************
--- Logical volumes ---
LV Name /dev/vg21/lvdt01
VG Name /dev/vg21
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 640
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation PVG-strict/distributed
IO Timeout (Seconds) default
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c6t0d1 160 160
/dev/dsk/c6t0d2 160 160
/dev/dsk/c6t0d3 160 160
/dev/dsk/c6t0d4 160 160
--- Logical extents ---
阅读(1970) | 评论(1) | 转发(0) |