手机版
你好,游客 登录 注册
背景:
阅读新闻

Linux 中软件 RAID 使用常见问题解决

[日期:2009-12-12] 来源:IBM  作者:张志斌 [字体:大 中 小]
7. 可分区的RAID设备
如果想对支持分区的MD设备(Partitionable raid array)进行分区,需要在创建时使用/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  Linuxlinux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款