存储设备设置raid和centos7搭建isc…

本文介绍了在Dell R710服务器上,如何利用硬件RAID设置系统盘,以及通过mdadm创建软RAID 5来组建12TB存储设备。详细步骤包括了RAID配置、4T硬盘的gpt分区以及使用targetcli配置iSCSI共享。此外,还特别强调了在CentOS 7中targetcli的配置注意事项,如保存配置、共享磁盘无需格式化、简化配置流程等。
摘要由CSDN通过智能技术生成

硬件: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,需要在开机启动的工程中进行设置。在Dell R710版本中,在开机启动过程中,会有提示:按【ctrl+c】进入raid 选择界面。进去之后会有Raid 0 和raid 1两个大选项。点击两个选项进去后,在选项下的二级目录会按插槽的顺序罗列出所有的系统磁盘,并在磁盘的右边有选项:【no】,你可以通过空白键对键值进行修改。这里,我把磁盘1和磁盘0在raid1的模式下选择了yes的键值。save and exit后进入raid 主菜单,确认raid情况是否正确,正常情况下,在我们设置后,可以看到磁盘0和磁盘1已经已raid 1的形式显示。

对于其余的四块硬盘来说呢,由于系统并没有支持raid 5,则需要我们通过进入系统,使用软raid工具,这里我使用的mdadm。具体如下:

系统盘设置软raid:

      一般系统只能支持2T大小的文件,4T的磁盘面前,我们又得考虑空间大小识别的问题。这里使用了gdisk工具,其用法和fdisk差不多,不同的是,gdisk可以识别到更大的空间,而fdisk只能是2T只能。

比如,当前的/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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值