使用vplex的mirror功能对存储层LUN进行数据的迁移
导读:作为一个懂存储的DBA,涉及底层存储迁移时,多半我会选择使用vplex来完成存储层的数据迁移。这样只要保证底层block是一致的,应用层无需任何验证且时间窗口小。备注:公司需要购买vplex硬件设备。
本人10年间也运维多个emc的存储,包含PowerStore3000T/PowerStore1000T/Unity 550F/Unity 450F/Unity 500/Isilon S210/VNX5700/VNX5400/VNXe3200等等。所以,存储问题也可以咨询我。欢迎骚扰!!!
下面介绍使用vplex将DB数据从旧存储(Unity 550F)迁移至新存储(PowerStore3000T)的案例。
1.首要,存储层各个不同品牌的存储需要一个vplex统一纳管。 2.其次,存储层迁移最小逻辑单位是LUN(物理单位是block),通常vplex层迁移最小逻辑单位是device(EMC原厂大哥建议的)。 3.最后,使用vplex的mirror功能对存储层LUN(vplex层叫device)进行数据的迁移。
3.1 新存储(PowerStore3000T)创建与旧存储(Unity 550F)相同大小的LUN,加入vplex集群,并封装成device。
3.1.1 新存储(PowerStore3000T)创建LUN步骤省略。VM-PS-PROD-10TB-003(新创建) naa.68ccf098000dacd41996a23a84a2a563
3.1.2 vplex层迁移目标:源端:device_VM_UNITY002_LUN_00000_1(旧550f) 目标端:device_VM-PS-PROD-10TB-003_1(新3000t)
3.1.3 Vplex将存储的LUN封装成device
a)###查看claim状态### VPlexcli:/clusters/cluster-1/storage-elements/storage-volumes> ll VPD83T3:68ccf098000dacd41996a23a84a2a563 /clusters/cluster-1/storage-elements/storage-volumes/VPD83T3:68ccf098000dacd41996a23a84a2a563: Name Value ----------------------------- ------------------------------------------------ application-consistent false block-count 2684354560 block-size 4K capacity 10T description - free-chunks ['0-2684354559'] health-indications [] health-state ok io-status alive itls 0xc0014487927e0a00/0x58ccf0904d200b01/3, 0xc0014487927e0a00/0x58ccf0904d220b01/3, 0xc0014487927e0a00/0x58ccf0984d200b01/3, 0xc0014487927e0a00/0x58ccf0984d220b01/3, 0xc0014487927e0b00/0x58ccf0904d210b01/3, 0xc0014487927e0b00/0x58ccf0904d230b01/3, 0xc0014487927e0b00/0x58ccf0984d210b01/3, 0xc0014487927e0b00/0x58ccf0984d230b01/3, 0xc001448792cb0a00/0x58ccf0904d200b01/3, 0xc001448792cb0a00/0x58ccf0904d220b01/3, ... (24 total) largest-free-chunk 10T locality - operational-status ok provision-type legacy storage-array-family other storage-array-name DellEMC-PowerStore-f090cd storage-volumetype traditional system-id VPD83T3:68ccf098000dacd41996a23a84a2a563 thin-capable false thin-rebuild false total-free-space 10T underlying-storage-block-size 512 use unclaimed used-by [] vendor-specific-name - b)###vplex claim powerstore3000T lun### VPlexcli:/clusters/cluster-1/storage-elements/storage-volumes> storage-volume claim -n VM-PS-PROD-10TB-003 -d VPD83T3:68ccf098000dacd41996a23a84a2a563 Claimed 1 of 1 storage-volumes. c)###vplex device powerstore3000T lun### vplex图形截图创建device(使用图形化的原因:方便全选批量操作) Storage Volumes=>Extents=>Devices # 图形界面device_VM-PS-PROD-10TB-003_1的WWN:VPD83T3:68ccf098000dacd41996a23a84a2a563 VPlexcli:/clusters/cluster-1/devices> ll Name Operational Health Block Block Capacity Geometry Visibility Transfer Virtual Volume ------------------------------------------------- Status State Count Size -------- -------- ---------- Size ---------------------------------------- ------------------------------------------------- ----------- ------ ----- ----- -------- -------- ---------- -------- ---------------------------------------- device_VM-PS-PROD-10TB-003_1 ok ok 2.5G 4K 10T raid-0 local - -
3.2 通过Vplex确认旧存储550f需要迁移的
device数据(即存储层的LUN)
确认路径:Storage Views=>Virtual Volumes=>device
确认结果:device_VM_UNITY002_LUN_00000_1是需要迁移的device
3.3 使用attach-mirror将新device与旧device组成mirror,vplex层自动触发存储层数据同步并完成
a)###查看即将要进行迁移到volume信息,即将要mirror的device(device_VM_UNITY002_LUN_00002_1)### VPlexcli:/clusters/cluster-1/virtual-volumes> ll Name Operational Health Service Block Block Capacity Locality Supporting Device Cache Mode Expandable Expandable Consistency VPD ID Thin -------------------------------------------------- Status State Status Count Size -------- ----------- ------------------------------------------------- ----------- ---------- Capacity Group ---------------------------------------- Enabled -------------------------------------------------- ----------- ------ ---------- ---------- ----- -------- ----------- ------------------------------------------------- ----------- ---------- ---------- -------------- ---------------------------------------- ----------- device_VM_UNITY002_LUN_00000_1_vol ok ok running 2684354560 4K 10T local device_VM_UNITY002_LUN_00000_1 synchronous true 0B - VPD83T3:6000144000000010f0127e47093565bd unavailable b)###对device_VM_UNITY002_LUN_00002_1添加一条来自powerstore3000T的腿### VPlexcli:/clusters/cluster-1/virtual-volumes> device attach-mirror -d device_VM_UNITY002_LUN_00000_1 -m device_VM-PS-PROD-10TB-003_1 c)###查看添加腿后的状态### VPlexcli:/clusters/cluster-1/devices> ll device_VM_UNITY002_LUN_00000_1/components/ /clusters/cluster-1/devices/device_VM_UNITY002_LUN_00000_1/components: Name Slot Type Operational Health State Capacity ---------------------------------------------- Number ------------ Status ---------------- -------- ---------------------------------------------- ------ ------------ ----------- ---------------- -------- device_VM-PS-PROD-10TB-003_1 1 local-device error critical-failure 10T device_VM_UNITY002_LUN_00000_12022Mar22_153118 0 local-device ok ok 10T
3.4 检查数据同步状态
###查看同步状态### VPlexcli:/clusters/cluster-1/devices> rebuild status [1] storage_volumes marked for rebuild Global rebuilds: No active global rebuilds. cluster-1 local rebuilds: device rebuild type rebuilder director rebuilt/total percent finished throughput ETA ------------------------------ ------------ ------------------ ------------- ---------------- ---------- ---------- device_VM_UNITY002_LUN_00000_1 full s1_127e_spa 5.66G/10T 0.06% 61.7M/s 1.97days # 待rebuild status返回无结果即同步完成。这个时候就可以选择时间窗口进行删除mirror leg # mirror数据有些慢(61.7M/s),因为tranfer size只有128k
3.5 使用detach-mirror将从device mirror中删除mirror leg(旧存储550f对应的device),完成detaching mirror。此时仅保留新device(3000T对应的device)提供服务,这样业务数据已经仅写在新device上,也就是数据已迁移至新存储(PowerStore3000T)
cd /clusters/cluster-1/devices device detach-mirror -d device_VM_UNITY002_LUN_00000_1 -m device_VM_UNITY002_LUN_00000_12022Mar22_153118 -–discard --force
########################################################################################
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!【QQ交流群:53993419】
QQ:14040928 E-mail:dbadoudou@163.com
本文链接: http://blog.itpub.net/26442936/viewspace-2882718/
########################################################################################