




已阅读5页,还剩23页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Disk管理,5,InternalDisksDeviceNames,Theillustrationshowsthedisksstaticudevnames,whicharebasedonthesloteachdiskoccupies.YoucanusetheseudevnameswithstandardLinuxcommands,butdiskkernelnamesappearinfilessuchas/var/log/messagesand/proc/mdstat.,2,InternalDisksMirroringConventions,Tostandardizeandsimplifydiskadministration,mirroradiskfromoneenclosurewiththediskinthesamerelativelocationfromtheotherenclosure(forexample):/dev/sdawith/dev/sdi/dev/sdfwith/dev/sdn,3,InternalDiskManagement,UsesLinuxsoftwareRAIDforfaulttoleranceManagetheRAIDarrayswithmdadmMultipleDevicesAdminCreates,manages,andmonitorsRAIDarraysRAIDarraysare/dev/mdXXCansupportRAIDlevels1and“10”Systemssupporthotsparedisks,4,OverviewofmdadmCommand,UsedtoconfigureandmanageRAIDvolumesHasargumentstosupportthefollowingoperations:CreateRAIDarraysQueryRAIDarraysStart/stopaRAIDarrayMarkadiskasfaultyConfigurationfileis/etc/mdadm.conf,5,MirroredBootDisk,BootdiskpartitionsaremirroredatinstallationtimeBothdisksarebootableBothdiskscontaintheGRUBbootloaderDiskmirroringisperformedbyLinuxsoftware,6,DefaultBootDiskPartitionsonInternalDisks,7,ManagingPartitions,Youcanusethefdiskorsfdiskutilitiestodisplayandchangeadiskspartitiontableandgeometry(seefdisk(8)andsfdisk(8)fordetails).DuringtheLinuxoperatingsysteminstallation,allofthemirroredbootpartitionsarecreatedastype0 xfd(LinuxRAIDautodetect).Aftertheinstallation,usethefdiskcommandtoadddatadiskswiththetype0 x83(Linux).BothdisksofaRAIDpairmusthavethesamegeometry,partitiontable,andtype.,8,ThefdiskCommand,UsetocreatepartitionsondisksPartitiontablestoredinsector0ofdiskMaximumof15partitionsperdiskInternalSASdisksare/dev/sda-pPartitiondevicesare/dev/sda-p1-15Obtainsdiskgeometryautomatically,9,fdiskCommandOptions,10,fdiskCommandArguments,11,StepstoCreatingaRAID-1Array,Selectthedisks.Createanewpartitiontableandaddapartitionusingfdisk.ZerotheRAIDsuperblocks.CreateandstartaRAIDarraybyusingthemdadmcommandEnsurethattheRAIDarraysstartateachreboot.Otheractions:MakeandmountafilesystemontheRAIDarray.Addthemountpointentryto/etc/fstab.,12,Step1SelectingtheDisks,Selectapairofsame-sizeddisksandinsertthemintotwocorrespondingslotsindifferentCPU-I/Oenclosures.Thestepsinthisprocedureuse,asanexample,thediskintheleft-mostslotofthesecondrowoftheupperCPU-I/Oenclosure(theudevnameoftheslotissdb)andthelowerCPU-I/Oenclosure(theudevnameoftheslotissdj).,13,Step2CreatingaPartition,Thisexampleshowsthefdiskcommandoptionsandargumentsusedtocreateapartitiontableandaddapartition.#fdisk/dev/sdbOCreatesanewemptyDOSpartitiontable.NCreateanewpartition.Enterthefollowingactions:PCreatesaprimarypartition(useeforextendedpartition).1Specifiesthepartitionnumberyouwanttoassign.Specifiesdefaultstartingcylinder(pressEnterfordefaultvalueof1.Specifiesthelastcylindernumber(pressEnterfordefaultvalueof8924).,14,Step2CreatingaPartition(Continued),tTypethetcommand.EnterorfdEnteracceptsthedefaultID83(Linuxtype).fdselectsthetype(LinuxRAIDautodetect).pOptionally,printthepartitiontabletoverify.WWritepartitiontabletothediskandexitfsdisk.,15,Step3ZeroingtheRAIDSuperblocks,ZerotheRAIDsuperblocksoneachdisktobepairedbytypingacommandsuchasthefollowingforeachpartitiononthedisk:#mdadm-zero-superblock/dev/sdb1,16,Step4CreateandStartaRAID-1ArrayUsingmdadm,CreateandstarttheRAID-1array#mdadm-C/dev/md20-binternal-level=1-raid-devices=2/dev/sdb1/dev/sdj1The-binternaloptionimplementsRedHatLinuxRAID-1fastresync.Topreventsysteminstability,usethisoptionwhencreatingthearrayanddonotusethe-growoptionatalatertime.ViewthestatusofthenewRAID-1array#mdadm-detail/dev/md20,17,Step5EnsuringthattheRAIDArraysStartatEachReboot,Themdadm.conffilespecifieswhichRAIDarraysloadatboottime.Bydefault,itcontainsonelineforeachRAIDarraythatwascreatedduringinitialsoftwareinstallation.Addnewentriesfordatadisksthatyouadd.EachlinethatdefinesaRAIDdevicebeginswiththeARRAYkeywordOutputofthefollowingcommandprovidesthetexttoadd:#mdadm-detail-scan-verbose|grepARRAY/etc/mdadm.confSpecifyinggrepARRAYensuresthatonlytheARRAYlinesarewrittentothemdadm.conffile.,18,Step5(bandc),Youneedtoremovetheduplicateentriessothatonlyoneentryappearsforeacharray.Inatexteditor,openthe/etc/mdadm.conffileandremoveanyduplicateARRAYlines.Saveandclosethe/etc/mdadm.conffile.Executethefollowingcommandtobackuptheinitramfsramdisk,whichpreloadskernelmodulesthatarenecessarytosupporttheRAIDarraysinyoursystem.#cp/boot/initramfs-uname-r.img/boot/initramfs-uname-r-backup.imgTheuname-rcommandpassesthecurrentkernelbuildnumbertothecpcommandstring.,19,Step5(dthroughg),ExecutethefollowingcommandtorebuildtheinitramfsramdiskandmaketheRAIDarraysandmountpointspersistentacrossreboots:#dracut-force/boot/initramfs-uname-r.imguname-rExecutethefollowingcommandtorestartthekdumpservice:#servicekdumprestartExecutethefollowingcommandtoconfirmthatthekdumpserviceisrunning:#servicekdumpstatusVerifythatthekernelcommandlinedoesnotcontainrd_NO_MD.Examinetheetc/grub.conffileandifnecessaryremoverd_NO_MD.,20,Step5(h),Optionally,beforecreatingafilesystemontheRAIDarraysandcommittingdatatothem,youcanrebootthesystemtoensurethatRAIDarraysareautomaticallyassembledatboottime.Afterrebootingthesystemexecutethefollowingcommand:#mdadm-detail-scanverboseThiscommandshowsonlythecurrentlyoperationalarrays.Ifanarrayismissing,youmustrepeatthestepstocreatethearray,includingthesteptozerotheRAIDsuperblocksbeforecreatingthearray.,21,Samplemdadm.confFile,#cat/etc/mdadm.confMAILADDRrootAUTO+imsm+1.x-allARRAY/dev/md0level=raid1num-devices=2UUID=21816c38:798ab0c5:6daa9cbf:2f31005bARRAY/dev/md1level=raid1num-devices=2UUID=3a41b04c:849ca5e0:2baa1db0:1c1aaf32ARRAY/dev/md2level=raid1num-devices=2UUID=372b6dac:39b48f97:a856aad0:f58ce806ARRAY/dev/md3level=raid1num-devices=2UUID=32dcc665:fc6c02c2:4332a227:9ffc6d72ARRAY/dev/md20level=raid1num-devices=2metadata=1.2name=sys01.domain-:20UUID=9ffa9666:2212e568:498c0b6e:7e6047d0,22,MakeandMountaFileSysteminaRAIDArray,Makethefilesystemajournalingfilesystem(forexample,EXT4):#mkfs.ext4/dev/md20Makeamountpointdirectory:#mkdir/big_dataMountthefilesystem:#mount/dev/md20/mnt/big_dataAddthemounttothe/etc/fstabfile,tomountthisfilesystemeachtimethesystemboots.,23,StoppingandStartingaRAIDArray,TostopusingaRAIDarray:#umount/dev/md30#mdadm-stop/dev/md30TobeginusingaRAIDarrayagain:#mdadm-A/dev/md20#mount/dev/md30,24,ConfiguringaRAID“10”Array,RAID“10”isaRAID-0arraycomposedofRAID-1arrays.CreatetheRAID-1arrays/dev/md13,consistingofthepartitionssdb1andsdj1;and/dev/md14,consistingofthepartitionssdc1andsdk1.CreatetheRAID10array/dev/md30withthefollowingcommand:#mdadm-C/dev/md30level=0-raid-devices=2/dev/md13/dev/md14Createafilesystemofyourchoice.Addentriestothemdadm.conffile,inthefollowingorder:1stRAID-1array(forexample,md13usingsdb1andsdj1)2ndRAID-1array(forexample,md14usingsdc1andsdk1)RAID-0array(forexample,md30usingmd13andmd14)Backuptheinitramfsramdisk,executethedracutcommandandtheservicecommands.SeeslidesStep5(bandc)andStep5(dthroughg).,25,ExaminingaRAIDArray,Usemdadmcommand#mdadm-Q-detail/dev/md20ReturnsinformationaboutRAIDlevelArrayanddevicesizesNumberofdevicesSuperblockpersistenceState
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年度绿色仓储配送与环保型包装材料定制合同
- 2025年校园泳池设施升级与专业运营维护服务合同
- 2025年运动员转会佣金收益分成及管理服务合同
- 2025年智能财务预算执行与绩效评估系统销售服务协议
- 2025年金融科技领域风险管理与投资策略咨询合同
- 2025年金融机构财务风险评估与管理咨询合同
- 2025年金融资产交易法律顾问全程服务合同
- 2025年校园多功能厅租赁及校园文化活动组织服务合同
- 制冷设备公司合同付款管理办法
- 二手车辆买卖合同
- 高速铁路牵引供电系统课件
- 北师大版数学九年级上册全册同步练习附答案
- 国家赔偿法完整版教学ppt课件全套教程
- 《中华人民共和国职业分类大典》电子版
- 2022学校校服选用工作自查整改报告
- 星级酒店工程部培训课件精品ppt
- 五年级下册数学开学第一课.ppt课件
- 幼儿园教育案例分析20篇
- 填充墙施工正确和错误做法图文对照解说
- 数字电子技术基础:第9章 Verilog HDL基本语法
- 建筑设计费请款单文本格式
评论
0/150
提交评论