Centos7下安装配置开源存储虚拟化QuadStor(4)----Vdisk Clone

xiaoxiao2021-02-28  30

操作环境

同《 Centos7下安装配置开源存储虚拟化QuadStor(1)------初始化QuadStor》

QuadStor Server:10.10.200.227

iSCSi Initiator:10.10.200.50

操作步骤

1.创建Vdisk,名称设置为sourcedisk,容量为500GB

2.在iscsi initiator端挂在vdisk

[root@centos7-nfstest /]# iscsiadm -m discovery -t st -p 10.10.200.227 10.10.200.227:3260,1 iqn.2006-06.com.quadstor.vdisk.sourcedisk [root@centos7-nfstest /]# iscsiadm -m node -T iqn.2006-06.com.quadstor.vdisk.sourcedisk -l Logging in to [iface: default, target: iqn.2006-06.com.quadstor.vdisk.sourcedisk, portal: 10.10.200.227,3260] (multiple) Login to [iface: default, target: iqn.2006-06.com.quadstor.vdisk.sourcedisk, portal: 10.10.200.227,3260] successful.

3.在iscsi initiator端向sdc(vdisk)中写入数据

[root@centos7-nfstest source]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 14G 11G 2.7G 81% / devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 8.5M 3.9G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 1014M 189M 826M 19% /boot /dev/sdb 100G 5.1G 95G 6% /mnt tmpfs 799M 0 799M 0% /run/user/0 /dev/sdc 500G 7.6G 493G 2% /source

4.在quadstor server中对vdisk:sourcedisk进行clone,quadstor只能手动clone,不能自动clone

[root@quadstor-node1 bin]# ./qclone -s sourcedisk -d clonedisk2 Clone of sourcedisk to clonedisk2 successfully started

5.查看clone进度

[root@quadstor-node1 bin]# ./qclone -l Source Destination Progress Time sourcedisk clonedisk2 0% 3.3 [root@quadstor-node1 bin]# ./qclone -l Source Destination Progress Time sourcedisk clonedisk2 0% 5.4 [root@quadstor-node1 bin]# ./qclone -l Source Destination Progress Time sourcedisk clonedisk2 25% 6.1 [root@quadstor-node1 bin]# ./qclone -l Source Destination Progress Time sourcedisk clonedisk2 25% 6.9

如果clone进度完成后,显示如下

[root@quadstor-node1 bin]# ./qclone -l Source Destination Progress Time sourcedisk clonedisk2 Done 19.5

6.通过iscsi initiator连接clone vdisk:clonedisk2查看数据是否一致

[root@quadstor-node1 bin]# ./qclone -s sourcedisk -d clonedisk2 Clone of sourcedisk to clonedisk2 successfully started [root@centos7-nfstest /]# iscsiadm -m discovery -t st -p 10.10.200.227 10.10.200.227:3260,1 iqn.2006-06.com.quadstor.vdisk.sourcedisk 10.10.200.227:3260,1 iqn.2006-06.com.quadstor.vdisk.clonedisk2 [root@centos7-nfstest /]# iscsiadm -m node -T iqn.2006-06.com.quadstor.vdisk.clonedisk2 -l Logging in to [iface: default, target: iqn.2006-06.com.quadstor.vdisk.clonedisk2, portal: 10.10.200.227,3260] (multiple) Login to [iface: default, target: iqn.2006-06.com.quadstor.vdisk.clonedisk2, portal: 10.10.200.227,3260] successful.

查看硬盘,sdd为sdc的clone disk

[root@centos7-nfstest /]# lsscsi [0:0:0:0] disk VMware Virtual disk 1.0 /dev/sda [0:0:1:0] disk VMware Virtual disk 1.0 /dev/sdb [2:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 [10:0:0:0] disk QUADSTOR VDISK 2.0 /dev/sdc [11:0:0:0] disk QUADSTOR VDISK 2.0 /dev/sdd

挂在sdd

[root@centos7-nfstest /]# mount /dev/sdd /clone mount: wrong fs type, bad option, bad superblock on /dev/sdd, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.

提示报错,查看日志,提示uuid重复

[root@centos7-nfstest /]# tail -f /var/log/messages Mar 5 21:17:27 centos7-nfstest kernel: sd 11:0:0:0: [sdd] Write Protect is off Mar 5 21:17:27 centos7-nfstest kernel: sd 11:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA Mar 5 21:17:27 centos7-nfstest kernel: sdd: unknown partition table Mar 5 21:17:27 centos7-nfstest kernel: sd 11:0:0:0: [sdd] Attached SCSI disk Mar 5 21:17:28 centos7-nfstest iscsid: Connection9:0 to [target: iqn.2006-06.com.quadstor.vdisk.clonedisk2, portal: 10.10.200.227,3260] through [iface: default] is operational now Mar 5 21:17:29 centos7-nfstest kernel: end_request: I/O error, dev fd0, sector 0 Mar 5 21:17:29 centos7-nfstest kernel: floppy: error -5 while reading block 0 Mar 5 21:17:29 centos7-nfstest kernel: end_request: I/O error, dev fd0, sector 0 Mar 5 21:17:29 centos7-nfstest kernel: floppy: error -5 while reading block 0 Mar 5 21:18:09 centos7-nfstest kernel: XFS (sdd): Filesystem has duplicate UUID 839154e8-a088-4a35-ad66-3164a7f0e9d8 - can't mount

添加nouuid参数进行挂载

[root@centos7-nfstest /]# mount -o nouuid /dev/sdd /clone/

查看数据大小是否一致

[root@centos7-nfstest /]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/centos-root 14034944 11262660 2772284 81% / devtmpfs 4068400 0 4068400 0% /dev tmpfs 4087860 0 4087860 0% /dev/shm tmpfs 4087860 8684 4079176 1% /run tmpfs 4087860 0 4087860 0% /sys/fs/cgroup /dev/sda1 1038336 193368 844968 19% /boot /dev/sdb 104806400 5276840 99529560 6% /mnt tmpfs 817572 0 817572 0% /run/user/0 /dev/sdc 524032000 7922272 516109728 2% /source /dev/sdd 524032000 7922272 516109728 2% /clone [root@centos7-nfstest /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 14G 11G 2.7G 81% / devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 8.5M 3.9G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 1014M 189M 826M 19% /boot /dev/sdb 100G 5.1G 95G 6% /mnt tmpfs 799M 0 799M 0% /run/user/0 /dev/sdc 500G 7.6G 493G 2% /source /dev/sdd 500G 7.6G 493G 2% /clone

转载请注明原文地址: https://www.6miu.com/read-1650066.html

最新回复(0)