使用vplex的mirror功能對儲存層LUN進行資料的遷移

lovehewenyu發表於2022-03-27

使用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/

########################################################################################


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-2882718/,如需轉載,請註明出處,否則將追究法律責任。

相關文章