设置后,cat / proc / mdstat输出如下所示:
proxmox:~# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdc2[1] sdb2[0] 293024832 blocks [2/2] [UU] unused devices: <none>
另外,我安装raid1后,我有以下几点:
proxmox:~# mdadm --examine --scan ARRAY /dev/md0 level=raid1 num-devices=2 UUID=fbda4051:61cbc27f:7f2b1f39:e153e83f
但是,重启后,cat / proc / mdstat输出:
proxmox:~# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active (auto-read-only) raid1 sdc[1] 293024832 blocks [2/1] [_U] unused devices: <none>
为什么现在使用sdc1?
另外,现在我得到:
proxmox:~# mdadm --examine --scan ARRAY /dev/md0 level=raid1 num-devices=2 UUID=fbda4051:61cbc27f:7f2b1f39:e153e83f ARRAY /dev/md0 level=raid1 num-devices=2 UUID=fbda4051:61cbc27f:9822ee23:9b948649 proxmox:~# dmesg | grep md0 md/raid1:md0: active with 1 out of 2 mirrors md0: detected capacity change from 0 to 300057427968 md0: p1 p2 md0: p2 size 586049840 exceeds device capacity, limited to end of disk
/ dev / md0上的两个分区是从哪里来的? 我从来没有做过他们。 此外, sdc1和sdc2未列在/ dev目录树中 。
这里是fdisk输出:
proxmox:~# fdisk -l /dev/sdb Disk /dev/sdb: 300.0 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x3bd84a48 Device Boot Start End Blocks Id System /dev/sdb1 1 2 10240 83 Linux Partition 1 does not end on cylinder boundary. /dev/sdb2 2 36482 293024920 fd Linux raid autodetect Partition 2 does not end on cylinder boundary. proxmox:~# fdisk -l /dev/sdc Disk /dev/sdc: 300.0 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x371c8012 Device Boot Start End Blocks Id System /dev/sdc1 1 2 10240 83 Linux Partition 1 does not end on cylinder boundary. /dev/sdc2 2 36482 293024920 fd Linux raid autodetect Partition 2 does not end on cylinder boundary.
一些信息:服务器运行Proxmox v1.9,这是debian lenny 64位。 sda是系统硬盘(硬件RAID)。 sdb和sdc是300GB全新Raptor硬盘。
首先,检查物理硬件,如连接线,电缆和正确安装的卡。 对于磁盘本身,请检查/ dev / sdb上的SMART数据以确保磁盘本身不会周期性地失效。 西部数据猛龙很快但很容易失败,我有一个失败的地方(甚至没有SMART数据预测它)。 使用smartctl读取SMART数据并运行testing。 它包含在smartmontools包中:
apt-get install smartmontools
拉数据并查找logging的exception或错误:
smartctl -a /dev/sdb
最后,进行手动自检,大约需要2分钟。 long可以代替short而且更彻底,但需要更长的时间(“几十分钟”):
smartctl -t short /dev/sdb
一旦testing完成,请查看结果:
smartctl -l selftest /dev/sdb
如果一切都恢复干净,您可以继续debuggingmdadm堆栈。
您的分区安排在RAID设备上有点奇怪。 如果这些设备专用于RAID,则根本不需要分区表。 假设没有数据,那么build议您保持简单并直接使用块设备。 在FDISK,他们会出现这样的:
Disk /dev/sdb: 300.0 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/sdb doesn't contain a valid partition table
为了消除任何分区问题并从头开始,只需在每个磁盘的开头添加一些零;
dd if=/dev/zero of=/dev/sdb count=128 bs=4096k
重复/ dev / sdc。 使用这两个设备创buildarrays:
mdadm --create --raid-devices=2 --level=raid1 --bitmap=internal --assume-clean --name=RAID1 /dev/sdb /dev/sdc
不要忘记检查任何磁盘相关的输出的dmesg!
Proxmox不支持软件RAID:
对于生产只有硬件RAID是可能的。 如果你使用一个自定义的软件,你会运行现在和将来的版本到问题意味着它将无法正常工作。 很有意思的是,人们并不相信我们Proxmox VE不会在软RAID中工作 – 我们是开发者,我们应该知道!
PS开发者似乎没有解释“为什么”它不起作用……这只是说,它不会。
http://forum.proxmox.com/threads/838-Install-on-Soft-Raid?p=4406#post4406
即使“这个”问题不是由于Proxmox造成的,通常也不值得付出努力,因为反正它不会工作。