硬件:Dell R710 server
磁盘:2*300G +4*4T
系统:centos 7
布局:系统盘由两个300G的磁盘经由raid 1组成,其余4个4T经由raid 5 组成一个12T的存储设备。
正常情况下,服务器硬件配置都有支持raid设置,这在很大程度上提高了效率。但是,Dell R710目前硬件设置上只能提供raid 0 和raid 1,无法达到我们的需求,则需要通过另外一种工具“mdadm”进行软raid的操作。具体流程如下:
系统盘设置raid:
对于其余的四块硬盘来说呢,由于系统并没有支持raid 5,则需要我们通过进入系统,使用软raid工具,这里我使用的mdadm。具体如下:
系统盘设置软raid:
比如,当前的/dev/sda/大小是4000G,gdisk的操作如下:
[root@localhost ~]# gdisk /dev/mapper/centos-root#对 /dev/mapper/centos-root 进行分区和修改磁盘系统
GPT fdisk (gdisk) version 0.8.6
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): ?#查看gdisk命令附加参数
b back up GPT data to a file
c change a partition's name
d delete a partition
i show detailed information on a partition
l list known partition types
n add a new partition
o create a new empty GUID partition table (GPT)
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Command (? for help): n#选择分区
Partition number (1-128, default 1):#默认一块
First sector (34-104857566, default = 2048) or {+-}size{KMGTP}:#默认初始
Last sector (2048-104857566, default = 104857566) or {+-}size{KMGTP}: #默认全部大小,没有范围,fdisk的话只能是2T
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): L#查看个系统类型的id号
0700 Microsoft basic data 0c01 Microsoft reserved 2700 Windows RE
4200 Windows LDM data 4201 Windows LDM metadata 7501 IBM GPFS
7f00 ChromeOS kernel 7f01 ChromeOS root 7f02 ChromeOS reserved
8200 Linux swap 8300 Linux filesystem 8301 Linux reserved
8e00 Linux LVM a500 FreeBSD disklabel a501 FreeBSD boot
a502 FreeBSD swap a503 FreeBSD UFS a504 FreeBSD ZFS
a505 FreeBSD Vinum/RAID a580 Midnight BSD data a581 Midnight BSD boot
a582 Midnight BSD swap a583 Midnight BSD UFS a584 Midnight BSD ZFS
a585 Midnight BSD Vinum a800 Apple UFS a901 NetBSD swap
a902 NetBSD FFS a903 NetBSD LFS a904 NetBSD concatenated
a905 NetBSD encrypted a906 NetBSD RAID ab00 Apple boot
af00 Apple HFS/HFS+ af01 Apple RAID af02 Apple RAID offline
af03 Apple label af04 AppleTV recovery af05 Apple Core Storage
be00 Solaris boot bf00 Solaris root bf01 Solaris /usr & Mac Z
bf02 Solaris swap bf03 Solaris backup bf04 Solaris /var
bf05 Solaris /home bf06 Solaris alternate se bf07 Solaris Reserved 1
bf08 Solaris Reserved 2 bf09 Solaris Reserved 3 bf0a Solaris Reserved 4
bf0b Solaris Reserved 5 c001 HP-UX data c002 HP-UX service
ed00 Sony system partitio ef00 EFI System ef01 MBR partition scheme
ef02 BIOS boo