LINUX Raid 磁盘创建 (笔记)
原创
©著作权归作者所有:来自51CTO博客作者元宇宙V的原创作品,请联系作者获取转载授权,否则将追究法律责任
[root@test ~]# fdisk /dev/sdb
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.
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-130, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): 100M
……..一直建三个区
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): fd
Changed system type of partition 3 to fd (Linux raid autodetect)
……....一直做4个
Command (m for help): w
The partition table has been altered!
[root@test ~]# mdadm -C /dev/md0 -l 5 -n 3 -x 1 /dev/sdb[1-4]
[root@test ~]# mdadm /dev/md0
/dev/md0: 15.50MiB raid5 3 devices, 1 spare. Use mdadm --detail for more detail.
[root@test ~]# mke2fs -j /dev/md0
[root@test ~]# mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Tue Apr 7 15:54:37 2009
Raid Level : raid5
Array Size : 15872 (15.50 MiB 16.25 MB)
Device Size : 7936 (7.75 MiB 8.13 MB)
Raid Devices : 3
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Tue Apr 7 19:34:42 2009
State : clean
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
UUID : f927fef6:2c 876cf8:1ff11ab6:ce26e2a 6
Events : 0.2
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 18 1 active sync /dev/sdb2
2 8 19 2 active sync /dev/sdb3
3 8 20 - spare /dev/sdb4 (热备盘)
[root@test mnt]# mkdir raid5
[root@test mnt]# mount /dev/md0 /mnt/raid5
或者
[root@test raid5]# vi /etc/fstab
/dev/md0 /mnt/raid5 ext3 defaults 0 0
上一篇:Lvm 磁盘分区
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux 磁盘管理命令 mdadm:RAID设置工具
Linux 磁盘管理命令 mdadm:RAID设置工具
Linux 磁盘管理命令 mdadm:RAID设置工具 -
Python 实现Linux Raid信息监控
python脚本监控linux raid
zabbix raid python -
为软raid创建更换磁盘
此故障,发生在我的工作环境中,亲测!
磁盘 故障处理 raid -
Linux磁盘管理--RAID原理
本文主要描述常见的不同等级RAID的原理和特性
Linux 基础 磁盘管理 -
Linux磁盘阵列技术详解(二)--raid 1创建
raid 1的创建就是这么简单
raid Linux -
LINUX 下创建RAID5以及LVM磁盘配额
使用RAID5创建LVM磁盘配额
Linux LVM RAID5 磁盘配额
















