linux raid auto 软raid parted,linux下的raid5配置方法.doc
要求:需要在三塊硬盤上創建RAID5 并掛載到 /raid5disk 目錄下!
先用fdisk -l 看一下三塊磁盤的設備號,在這里就是
/dev/sdb
/dev/sdc
/dev/sdd
1. 首先在三塊硬盤上分別創建一個分區!
# fdisk /dev/sdb
Command (m for help): n 按n創建新分區
Command action
e extended
p primary partition (1-4) 輸入p 選擇創建主分區
Partition number (1-4): 輸入 1 創建第一個主分區
First cylinder (1-204, default 1): 直接回車,選擇分區開始柱面這里就從 1 開始
Last cylinder or +size or +sizeM or +sizeK (1-204, default 204):
也是直接回車,最后一個柱面!我這里是204, 各人的硬盤大小不一樣大,這里的值也不一樣大!
這樣就將硬盤1柱面到204柱面創建了第一個主分區!
Command (m for help): t 輸入t 指定分區類型!
Selected partition 1
Hex code (type L to list codes):
可以直接輸入fd,指定分區類型就為Linux raid auto 也可以輸入l看一下所有支持的分區類型!
我這里倒數第三個就是raid的分區類型代號為fd
Command (m for help): w 然后輸入w寫盤!
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
按照此步驟在另外的兩塊磁盤上做同樣的操作!
全部做完后,運行 fdisk -l 應該可以看到如下信息!
Disk /dev/sdb: 214 MB, 214748160 bytes
64 heads, 32 sectors/track, 204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 204 208880 fd Linux raid autodetect
Disk /dev/sdc: 214 MB, 214748160 bytes
64 heads, 32 sectors/track, 204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 204 208880 fd Linux raid autodetect
Disk /dev/sdd: 214 MB, 214748160 bytes
64 heads, 32 sectors/track, 204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 204 208880 fd Linux raid autodetect
看到上面三個磁盤上分別建了一個分區,分區大小都一樣!
然后再運行
#mdadm -Cv /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1
這里就在三個分區上創建了raid5 軟件陳列, 新的分區設備號為md0
然后格式化一下
總結
以上是生活随笔為你收集整理的linux raid auto 软raid parted,linux下的raid5配置方法.doc的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2022年退伍时间一般几月份?退伍军人有
- 下一篇: 印度语中的lata是什么?