Linux中软RAID常见问题解决
要在创建时使用/dev/md_d0来替代前面的/dev/md0.创建阵列是通过--auto=mdp(或者其缩写-ap)参数指定.
[root@fc5 mdadm-2.6.3]# ./mdadm -Cv --auto=mdp /dev/md_d0 -l5 -n6 /dev/sd[b-g] -x1 /dev/sdh mdadm: layout defaults to left-symmetric mdadm: chunk size defaults to 64K mdadm: size set to 1048512K mdadm: array /dev/md_d0 started. [root@fc5 mdadm-2.6.3]# fdisk /dev/md_d0 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won''t be recoverable. The number of cylinders for this disk is set to 1310640. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1310640, default 1):1 Using default value 1 Last cylinder or size or sizeM or sizeK (1-1310640, default 1310640): 1024M Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (250002-1310640, default 250002):250002 Using default value 250002 Last cylinder or size or sizeM or sizeK (250002-1310640, default 1310640):1310640 Using default value 1310640 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks. [root@fc5 mdadm-2.6.3]# fdisk -l /dev/md_d0 Disk /dev/md_d0: 5368 MB, 5368381440 bytes 2 heads, 4 sectors/track, 1310640 cylinders Units = cylinders of 8 * 512 = 4096 bytes Device Boot Start End Blocks Id System /dev/md_d0p1 1 250001 1000002 83 Linux /dev/md_d0p2 250002 1310640 4242556 83 Linux
MD设备支持两种块设备,一种是不可分区类型的名字是md设备,主设备号是9,另一种是可分区的名字是mdp设备,mdp的主设备号是动态分配的,一个mdp设备最多能支持63个分区.查看/proc/device信息能看到mdp的主设备号,查询/proc/partitions信息能看到md和mdp设备的主设备号和从设备号. [root@fc5 mdadm-2.6.3]# cat /proc/devices | grep md 1 ramdisk 9 md 253 mdp [root@fc5 mdadm-2.6.3]# cat /proc/partitions | grep md 9 1 2096896 md1 253 0 5242560 md_d0 253 1 1000002 md_d0p1 253 2 1000002 md_d0p2 8. 怎样扩展RAID设备 Grow模式中的容量扩展(resize)功能不但支持设备大小增加,也可以支持设备大小减少,但要求使用者自己来保证MD设备有效数据上不被截断 |
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |