linux raid auto 软raid parted,linux下的raid5配置方法.doc
要求:需要在三塊硬盤(pán)上創(chuàng)建RAID5 并掛載到 /raid5disk 目錄下!
先用fdisk -l 看一下三塊磁盤(pán)的設(shè)備號(hào),在這里就是
/dev/sdb
/dev/sdc
/dev/sdd
1. 首先在三塊硬盤(pán)上分別創(chuàng)建一個(gè)分區(qū)!
# fdisk /dev/sdb
Command (m for help): n 按n創(chuàng)建新分區(qū)
Command action
e extended
p primary partition (1-4) 輸入p 選擇創(chuàng)建主分區(qū)
Partition number (1-4): 輸入 1 創(chuàng)建第一個(gè)主分區(qū)
First cylinder (1-204, default 1): 直接回車(chē),選擇分區(qū)開(kāi)始柱面這里就從 1 開(kāi)始
Last cylinder or +size or +sizeM or +sizeK (1-204, default 204):
也是直接回車(chē),最后一個(gè)柱面!我這里是204, 各人的硬盤(pán)大小不一樣大,這里的值也不一樣大!
這樣就將硬盤(pán)1柱面到204柱面創(chuàng)建了第一個(gè)主分區(qū)!
Command (m for help): t 輸入t 指定分區(qū)類(lèi)型!
Selected partition 1
Hex code (type L to list codes):
可以直接輸入fd,指定分區(qū)類(lèi)型就為L(zhǎng)inux raid auto 也可以輸入l看一下所有支持的分區(qū)類(lèi)型!
我這里倒數(shù)第三個(gè)就是raid的分區(qū)類(lèi)型代號(hào)為fd
Command (m for help): w 然后輸入w寫(xiě)盤(pán)!
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
按照此步驟在另外的兩塊磁盤(pán)上做同樣的操作!
全部做完后,運(yùn)行 fdisk -l 應(yīng)該可以看到如下信息!
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
看到上面三個(gè)磁盤(pán)上分別建了一個(gè)分區(qū),分區(qū)大小都一樣!
然后再運(yùn)行
#mdadm -Cv /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1
這里就在三個(gè)分區(qū)上創(chuàng)建了raid5 軟件陳列, 新的分區(qū)設(shè)備號(hào)為md0
然后格式化一下
總結(jié)
以上是生活随笔為你收集整理的linux raid auto 软raid parted,linux下的raid5配置方法.doc的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 2022年退伍时间一般几月份?退伍军人有
- 下一篇: linux 其他常用命令