磁盤配額實(shí)驗(yàn)報(bào)告316_第1頁
磁盤配額實(shí)驗(yàn)報(bào)告316_第2頁
磁盤配額實(shí)驗(yàn)報(bào)告316_第3頁
磁盤配額實(shí)驗(yàn)報(bào)告316_第4頁
磁盤配額實(shí)驗(yàn)報(bào)告316_第5頁
已閱讀5頁,還剩2頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

磁盤配額實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)?zāi)康模喊研沦I來的磁盤劃分分區(qū),然后指定文件類型,把文件進(jìn)行掛載。實(shí)驗(yàn)步驟:第一:首先在沒啟動起虛擬機(jī)之前添加一塊硬盤,下圖添加的為IDE的硬盤。LJevicesStartthisvirtualmachine轟Memory256MBEditvirtualmachinesettingsClonethisvirtualmachineClonetoACEmaster口Disk(SCSI0:Startthisvirtualmachine轟Memory256MBEditvirtualmachinesettingsClonethisvirtualmachineClonetoACEmaster口Disk(SCSI0:0;i8.0GB口Hai記Disk(IDE0:0::i 8.0GBUEing添加了一塊新的IDEW&fileIIEthernet@USBCGntrollerfli^SuiiiLilAdapterQHisplay翁Fr0匚Em:*H>:>et-口nlyPrHEentAutuhtHtAutohtECt1第二步:然后用fdiskT查看一下磁盤利用情況,出現(xiàn)下圖ErootP1oca1host~]#rfdisk-Diskpdeu/hda15heads.~bJbytescy1indersJ8589MB,858993459Zsectors/track,17753Diskpdeu/hda15heads.~bJbytescy1indersUnits=cu1Units=cu1indersof54_9=483840bytesDisk/deu/hdadoesntcontainavalidpartitiontableDiskpdeu/sda:|8589MB,858993459Zbytes255heads,~ ectors/trackj1044cy1indersUnits=cy1indersof16065*51Z=8ZZ5Z80bytesDeuiceBootzdeu/sdal*/deu/sdaZZdev/sda3Start134991044DeuiceBootzdeu/sdal*/deu/sdaZZdev/sda3Start134991044BlocksZ650415Z211Z+7598745Id83

8Z83SystemLinuxLinuxsuap/SolarisLinux第三步:利用fdisk/dev/had(這里的路徑可以修改,這要看你自己添加的磁盤是什么樣的丿這個(gè)命令創(chuàng)建分區(qū)IrootSloca1host~1#fdiMk/d"/hda|ui11remaininmemoryonlyjcoursejthepreviousthat,ui11remaininmemoryonlyjcoursejthepreviousthat,ofuiIdinganeuDOSdisklabe1.Changesnti1youdecidetowritethem.Afterontentwon'tberecoverable.rhenumberofcy1indersforthisdiskrhereisnothingwronguiththat,butindcouldincertainissetto17753.thisislargerthansetupscauseproblemswith:L)softwarethatrunsatboottime(e.g.,10Z4,I)bootingandpartitioningsoftwarefrom(e.g.jEarning:rhenumberofcy1indersforthisdiskrhereisnothingwronguiththat,butindcouldincertainissetto17753.thisislargerthansetupscauseproblemswith:L)softwarethatrunsatboottime(e.g.,10Z4,I)bootingandpartitioningsoftwarefrom(e.g.jEarning:inualidflag0x0000ofpartitionDOSFDISK,OS/ZFDISK)oldversionsofotherOSstable4ui11beLILO)correctedbyw(rite)□mmand(mforhelp):第四步:出現(xiàn)上圖時(shí),這時(shí)可以輸入幫助命令,一步一步按照提示進(jìn)行操作,在這輸入m,會出現(xiàn)各種常用的命令

Command(mforhelp):mCommandactiona toggleabootableflagb editbsddisklabe1匚 七0口口1匕th匕dos ibi1ityflag毗1氏匕npartition 1 listknounpartitiontypesm printthismenufnnddnhewpartition].肯匸訶I:譚:苗萄蹤(7ocreateaneuemptyDOSpartitiontable5printthupnrtitgntable] >昱石蘭uj乂壟的芬旦豎qquituithoutsavingchangesscreateaneuemptySundisklabe1tchangeapartition"ssystemidu changedisplay/entryunitsu verifythepartitiontablefwwritEtabletodisk exif] ^舉肓誇藝逞辻xextrafunctionality|(expertsonly)第五:如創(chuàng)建一個(gè)主分區(qū),就做如下操作。Command(mforhelp):Commandactioneextendedfault1):pprimarypartitiontfWjT曲氐fault1):Partitionnumber(1-4)Firstcylinder(1-1775UsingdefanItvalue1Lastcy1inderor+sizeor+sizeMor+sizeK(1-17753,default17753):|+Z048第六步:根據(jù)不同的命令創(chuàng)建不同的分區(qū),創(chuàng)建擴(kuò)展分區(qū)CommandCommand(mforhelp):action|eextended| pprimarypartition(1-4)eCommandCommand(mforhelp):action|eextended| pprimarypartition(1-4)eParTitionnumber(1-4):「2|Firstcylinder(Z050-17753,defaultUsingdefaultvalueZ050cy1inderor+sizeor+sizeMorZ05B):+sizeK(Z050-17753,default17753):[+1000|第七步:創(chuàng)建完分區(qū)后,輸入w然后進(jìn)行保存退出□mmand(mforhelp):fui|hepartitiontablehasbeenaltered?m11ing[_inut1qtore-readpartitiontable.ijtk:in口就isks.|— 號入VM第八步:到這時(shí),劃分分區(qū)的步驟結(jié)束,往下繼續(xù)做

指定文件類型的步驟,這時(shí)需要采用的命令為mkfs-t ext3(文件的類型丿 /dev/hdal(與添加的硬盤相符丿[rootOloca1host~]#(mkfs-t Muwhdhl'mkeZfs1.33(29-May-Z00&3Filesystemlabe1=OStype:LinuxBlocksize=4096(log=Z)Fragmentsize=4096(log=2)1Z1088inodes>Z4Z030blocks1Z101blocks(5.00z)reseruedforthesuperuserFirstdatablock=BMaximumfilesystemblocks=251658240Bblockgroups3Z768blockspergroupf3Z768fragmentspergroup15136inodespergroupSuperblockbackupsstoredonblocks:3Z768,98304,163840,ZZ9376Writinginodetables:doneCreatingjourna1(4096blocks):doneWritingsuperblocksandfilesystemaccountinginformation:doneThisfilesystemui11beautomatica1lycheckedeueryZ6mountsordnys,which亡com亡sfirst.Usetuin匕Efs一匚ur-ito亡rridu.這時(shí)注意的是,指定文件類型時(shí)輸入的文件設(shè)備最好不要輸入一塊磁盤(如/dev/had)或者是一個(gè)擴(kuò)展分區(qū)的設(shè)備名,因?yàn)樗鼤h除這個(gè)容器中的所有分區(qū)。第九步:然后利用mount命令進(jìn)行文件掛載,在這之前做好創(chuàng)建一個(gè)與真實(shí)物理分區(qū)相對應(yīng)的目錄,然后直接掛載,然后用df-查看一下掛載是否成功。第十步:前面的操作只是手動掛載,當(dāng)重啟后所有的操作就不會在有效,下面我們就把文件系統(tǒng)卸載,然

后采用系統(tǒng)啟動時(shí)自動掛載,利用如下命令,進(jìn)入vi編輯器,vi/etc/fstabLABEL"/ext3defauIts11LABEL=/boot /bootext3defauIts1zdeupts/dev/ptsdevptsgid=5,mode=6Z0eetmpfs/deu/shmtmpfsdefauIts00proc/procprocdefauIts00sysfs/syssysfsdefau1ts00-sdaZ suapsuapdefauIts_e_0zdev/hdal/mnt/hdalext3defauIts&輸入紅框里的內(nèi)容。第十一步,’輸入完后,進(jìn)行重啟,然后再用df-查看一下,這時(shí)會發(fā)現(xiàn)文件自動掛載上了— 3 [rootO1oca1host~1#df-hFilesystemSizeUsedAvai1UsezMountedon/deu/sda37.1GZ.8G4.0G4Zz//deu/sdal || Z51M16MZZ3M7z/boottmufslimnB113M曲/deu/shm/dev/hdal931M18M867MZz/mnt/hdal第十二步:再次打開vi/etc/fstab針對用戶和組進(jìn)行限制,下圖是對用戶進(jìn)行的限制,編寫完后保存退出,然后重啟LABEL=/LABEL=/bootdeuptstmpfsprocsysfsLABEL=SWAP-sdaZ/deu/hdal08/boot/deu/ptszdeu/shm/proc/syssuapzmnt/hdalLABEL=/LABEL=/bootdeuptstmpfsprocsysfsLABEL=SWAP-sdaZ/deu/hdal08/boot/deu/ptszdeu/shm/proc/syssuapzmnt/hdalext3ext3deuptstmpfsprocsysfsswapdefanItsdefanItsgid=5jmode=620defan1tsdefau1tsdefau1tsdefau1tsdefau11首jusrquota第十三步:然后用mount查看一下,會出現(xiàn)下圖[root@lo匚nlh□百t~1#mountzdeu/sda3on/typeext3(rw)procon/proctypeproc(rw)sysfson/systypesysfs(rw)tteuptson/deu/ptstypedeupts(rw,gid=5,mode=620)zdeu/sdalon/boottypeext3(rw)tmpfson/deu/shmtypetmpfs(rw)zdeu/hdalon/mnt/hdaltypeext3(ru,usrquota)nioneon/proc/sys/fs/binfmt_misctypebinfmt_misc(rw)sunrpcon/uar/1ib/nfs/rpc_pipefstypefpc_pipefs(rw)「1fiLH1 m"Iit 第十四步:然后quotacheck-uvg檢測一下看看是不是產(chǎn)生了支持配額的兩個(gè)文件[roots1oca1host~litquotacheck-auugquotacheck:ScanningTReu/hdal[/mnt/hdai]quotacheck:Cannotstatolduserquot卜file:Nosuchfileordirectoryquotacheck:Oldgroupfilenotfound?Useg巳ui11notbesubstracted?donequotacheck:Checked3directoriesandZfilesquotacheck:Oldfilenotfound?[ruotljlocnlhost~1#Is/mnt/hdalhqiiote.u百Er1 [第十五步:新建一個(gè)用戶useraddyypasswdyy123456,出現(xiàn)下圖[rootP1oca1host~1#fuseraddyy[rootP1oca1host小litpns百yyChangingpassuordforuseryy.NeuUNIXpassuord:pADFASSUORD:itistoosimp1istic/systematicRetypeneuUNIXpassuord:f |passud:allauthenticationtokensupdated[successfullu■第十六步:進(jìn)行配置edquotauyy然后出現(xiàn)下圖進(jìn)行編輯第十七步:編輯完后,保存退出,然后利用命令quotaon-av啟動配額服務(wù)

第十七步:給新建的用戶yy寫入hdal權(quán)限,輸入下列命令troot!?1oca1host~1#chmodo=rwx/mnt/hdal第十八步:然后進(jìn)入新建的用戶,利用下列命令進(jìn)行測試一下繼續(xù)寫入,看看是不

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論