已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 18015.5-2025数字通信用对绞或星绞多芯对称电缆第5部分:具有1 000 MHz及以下传输特性的对绞或星绞对称电缆水平层布线电缆分规范
- 2026年中国水蒸气吸收测试仪行业市场规模及投资前景预测分析报告
- 2025湖北省新能源有限公司招聘笔试考试参考试题及答案解析
- 2025广东云浮市郁南县招聘机关事业单位紧缺人才15人考试笔试备考试题及答案解析
- 小微工贸企业安全管理指引-湖北省应急厅2025年10月10日发布
- 2026年山西省财政税务专科学校单招职业技能测试必刷测试卷附答案
- 2026年岳阳现代服务职业学院单招职业倾向性测试必刷测试卷必考题
- 2026年烟台南山学院单招职业技能考试必刷测试卷及答案1套
- 2026年山东服装职业学院单招职业技能考试题库附答案
- 2026年商丘学院单招职业倾向性考试题库新版
- 中国监控摄像机行业发展趋势及发展前景研究报告2025-2028版
- 校园餐资金管理制度
- 手术麻醉管理授权培训
- T/JSWP 01-2021政策类决策社会稳定风险评估规范
- 2025年保密知识竞赛考试题库及答案附答案(完整版)参考答案详解
- 小学二年级家长课堂课件
- 2025年上海房屋租赁合同的范本
- 绿化工程安全专项方案
- 讲解员培训方案
- GB/T 10485-2025道路车辆外部照明和光信号装置环境耐久性
- 《房屋市政工程类有限空间作业安全》专项培训
评论
0/150
提交评论