在生产环境中有时候会经常碰到不能停机维护的情况,或停机窗口时间不够用,比如希望更换存储系统,几十个T或更大的数据,在半天内是迁移不完的,那这个时候就只能在线做了。
下面测试使用LVM的物理卷迁移的方式来在线迁移数据:
1) 物理机已分配2块硬盘sdc,sdd
[root@test-204 ~]# fdisk -l
Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000