MAC环境下使用Paralles Desktop实现DRBD
环境介绍
- MacOS Sierra 10.12.2
- Paralles Desktop 10.1.1
- CentOS-6.6-x86_64
操作步骤
配置服务器
安装好两台服务器后,修改/etc/sysconfig/network
中的HOSTNANME分别为node1
和node2
;
修改两台服务器的/etc/hosts
文件,将两台服务器的IP地址配置进去,示例环境如下:127.0.0.1 localhost node1 localhost4 localhost4.localdomain4
::1 localhost6 localhost6.localdomain6
10.211.55.26 node1
10.211.55.29 node2挂载磁盘(node1和node2均做类似配置)
在Paralles Desktop的虚拟机配置上挂载一块新的磁盘:进入虚拟机后输入
fdisk -l
可以看见该磁盘:Disk /dev/sdb: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders
Units = cylinders of 1819 * 512 = 931328 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xbebf5dec使用
fdisk -cu /dev/sdb
对磁盘分区,以下为示例:Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x2a0f1472.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.
Warning: invalid flag