一, 使用mdadm创建RAID

参考:https://wiki.archlinux.org/index.php/RAID

1.  安装 mdadm

/home/tong [tong@TStation] [:]
> pacman -Ss mdadm
core/mdadm 4.0- (base) [installed]
A tool for managing/monitoring Linux md device arrays, also known as Software RAID

2.  给单盘分区

  2.1  GPT分区。

  2.2  做好有分区,虽然裸盘也可以。

  2.3  分区尾部预留100M的空余,因为:

Even hard drives of the same manufacturer and model can have small size differences. By leaving a little space at the end of the disk unallocated one can 
compensate for the size differences between drives, which makes choosing a replacement drive model easier. Therefore, it is good practice to leave
about MB of unallocated space at the end of the disk.
(parted) print free
Model: ATA WDC WD3000FYYZ- (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number Start End Size File system Name Flags
.4kB 1049kB 1031kB Free Space
1049kB 3000GB 3000GB xfs
3000GB 3001GB 105MB Free Space
(parted) print
Model: ATA WDC WD3000FYYZ- (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number Start End Size File system Name Flags
1049kB 3000GB 3000GB

3.  使用mdadm制作RAID

/home/tong [tong@TStation] [:]
> sudo mdadm --create --verbose --level= --metadata=1.2 --raid-devices= /dev/md0 /dev/sdc1 /dev/sdd1
mdadm: size set to 2930030976K
mdadm: automatically enabling write-intent bitmap on large array
mdadm: array /dev/md0 started.

4. 后续详细设置参考:

https://wiki.archlinux.org/index.php/RAID#Installation

二, 使用lvm创建RAID

https://wiki.archlinux.org/index.php/LVM#RAID

0. 使用parted分区。

/home/tong [tong@TStation] [:]
> sudo parted /dev/sdc print
Model: ATA WDC WD3000FYYZ- (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number Start End Size File system Name Flags
2097kB 3000GB 3000GB /home/tong [tong@TStation] [:]
> sudo parted /dev/sdd print
Model: ATA WDC WD3000FYYZ- (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number Start End Size File system Name Flags
2097kB 3000GB 3000GB

1.  创建物理卷

/home/tong [tong@TStation] [:]
> sudo pvcreate /dev/sdc1 /dev/sdd1
Physical volume "/dev/sdc1" successfully created.
Physical volume "/dev/sdd1" successfully created.

2. 创建卷组

/home/tong [tong@TStation] [:]
> sudo vgcreate VG_storage /dev/sdc1 /dev/sdd1
Volume group "VG_storage" successfully created

3. 创建逻辑卷

more information: https://jlk.fjfi.cvut.cz/arch/manpages/man/lvmraid.7

How  LV data blocks are placed onto PVs is determined by the RAID level.  
RAID levels are commonly referred to as 'raid' followed by a number, e.g. raid1, raid5 or raid6.
/home/tong [tong@TStation] [:]
> sudo lvcreate --type raid1 -l %FREE -n storage_raid1 VG_storage /dev/sdc1 /dev/sdd1
Logical volume "storage_raid1" created.
/home/tong [tong@TStation] [:]
> sudo lvs -o name,segtype,size
LV Type LSize
storage_raid1 raid1 <.73t

4.  创建文件系统

/home/tong [tong@TStation] [:]
> sudo mkfs.xfs /dev/VG_storage/storage_raid1
meta-data=/dev/VG_storage/storage_raid1 isize= agcount=, agsize= blks
= sectsz= attr=, projid32bit=
= crc= finobt=, sparse=, rmapbt=, reflink=
data = bsize= blocks=, imaxpct=
= sunit= swidth= blks
naming =version bsize= ascii-ci= ftype=
log =internal log bsize= blocks=, version=
= sectsz= sunit= blks, lazy-count=
realtime =none extsz= blocks=, rtextents=

5。 挂载

/home/tong [tong@TStation] [:]
> tail -n /etc/fstab
# /dev/mapper/VG_storage-storage_raid1
UUID=c5b048a0-b376-4a00-9a6f-9a9e418d982b /home/tong/Storage xfs rw,relatime,attr2,inode64,noquota

[daily][archlinux][mdadm][RAID] 软RAID的更多相关文章

  1. 软RAID管理

    软RAID管理 软RAID 软RAID 提供管理界面:mdadm 软RAID为空余磁盘添加冗余,结合了内核中的md(multi devices). RAID 设备可命名为/dev/md0./dev/m ...

  2. Linux 常见 RAID 及软 RAID 创建

    RAID可以大幅度的提高磁盘性能,以及可靠性,这么好的技术怎么能不掌握呢!此篇介绍一些常见RAID,及其在Linux上的软RAID创建方法. mdadm 创建软RAID mdadm -C -v /de ...

  3. 软RAID管理命令mdadm详解

    软RAID管理命令mdadm详解 mdadm是linux下用于创建和管理软件RAID的命令,是一个模式化命令.但由于现在服务器一般都带有RAID阵列卡,并且RAID阵列卡也很廉价,且由于软件RAID的 ...

  4. mdadm 软RAID

    mdadm是linux下用于创建和管理软件RAID的命令,是一个模式化命令.但由于现在服务器一般都带有RAID阵列卡,并且RAID阵列卡也很廉价,且由于软件RAID的自身缺陷(不能用作启动分区.使用C ...

  5. Raid 介绍以及软raid的实现

    RAID: old Redundant Arrays of Inexpensive Disks (廉价磁盘冗余阵列) new Redundant Arrays of Independent Disks ...

  6. CentOS 6.3下配置软RAID(Software RAID)

    一.RAID 简介 RAID 是英文Redundant Array of Independent Disks 的缩写,翻译成中文意思是“独立磁盘冗余阵列”,有时也简称磁盘阵列(Disk Array). ...

  7. 网易视频云技术分享:linux软raid的bitmap分析

    网易视频云是网易倾力打造的一款基于云计算的分布式多媒体处理集群和专业音视频技术,提供稳定流畅.低时延.高并发的视频直播.录制.存储.转码及点播等音视频的PAAS服务,在线教育.远程医疗.娱乐秀场.在线 ...

  8. ☆RHEL6创建软raid的使用☆——经典之作

    raid主要的种类 1.raid0  扩展卷   raid 0又称Stripee或Striping,中文译为集带工作方式, 有时也可以理解为拼凑. 它是将要存取的数据以条带状的形式尽量平均分配到多个硬 ...

  9. linux磁盘管理系列-软RAID的实现

    1 什么是RAID RAID全称是独立磁盘冗余阵列(Redundant Array of Independent Disks),基本思想是把多个磁盘组合起来,组合一个磁盘阵列组,使得性能大幅提高. R ...

随机推荐

  1. GSSAPIAuthentication=no

    GSSAPI ( Generic Security Services Application Programming Interface) 是一套类似Kerberos 5的通用网络安全系统接口.该接口 ...

  2. pandas 学习总结

    pandas  学习总结 作者:csj 更新时间:2018.04.02 shenzhen email:59888745@qq.com home: http://www.cnblogs.com/csj0 ...

  3. spring aop 之annotation

    1.CutPointInterface public interface CutPointInterface { void method(); } 2.CutPointClass @Component ...

  4. 用panels 制作drupal首页

    1.下载zen主题 路径:https://www.drupal.org/project/zen2.“启用并设为默认”3.基于zen制作子主题 把zen目录下STARTERKIT文件夹,复制到sites ...

  5. 解决:android源码同步repo sync 时出现的fatal:duplicate path错误

    问题重现: 解决方法: 1.删除android项目里隐藏的 .repo 文件夹中除了以下几个文件夹的其他文件及文件夹 2.重新初始化android项目 repo init -u https//gith ...

  6. MyCAT简易入门 (Linux)

    MyCAT是mysql中间件,前身是阿里大名鼎鼎的Cobar,Cobar在开源了一段时间后,不了了之.于是MyCAT扛起了这面大旗,在大数据时代,其重要性愈发彰显.这篇文章主要是MyCAT的入门部署. ...

  7. laravel中artisan的用法

    如:

  8. jxl和POI的区别

    最近两个项目中分别用到jxl和POI,因为用的都是其中的简单的功能,所以没有觉得这其中有太大的区别.有人针对他们做了比较,这里也拿出来展示一下. 首先从优缺点上来说 一.jxl 优点: Jxl对中文支 ...

  9. Oracle:使用nginx做为代理访问

    nginx 必须启用 启用 --with-stream 模块. 可下载源码编译. nginx.conf的配置: worker_processes ; events { worker_connectio ...

  10. Web 文件上传 目录

    0. SpringMVC -- 梗概--源码--贰--上传 1. Web上传文件的原理及实现 2. Web文件上传方法总结大全 3. SpringMVC 文件上传配置,多文件上传,使用的Multipa ...