




已閱讀5頁,還剩3頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
實(shí)驗(yàn)八 文件系統(tǒng)和磁盤管理實(shí)驗(yàn)八 文件系統(tǒng)和磁盤管理(一)磁盤分區(qū)管理【需求】u 為一個有空閑空間的磁盤新建一個分區(qū);u 對該分區(qū)進(jìn)行格式化;u 把該分區(qū)掛載到/mnt/music目錄;u 要求每次機(jī)器啟動都自動掛載?!鞠到y(tǒng)及軟件環(huán)境】操作系統(tǒng):Red Hat AS 4.0【實(shí)驗(yàn)配置文件及命令】1配置文件:/etc/fstab2命令:/sbin/fdisk,/sbin/mkfs.ext3,/bin/mkdir,/bin/mount【實(shí)驗(yàn)步驟】1 系統(tǒng)當(dāng)前的分區(qū)表信息。rootlinux /# fdisk -lDisk /dev/hda: 80.0 GB, 80060424192 bytes255 heads, 63 sectors/track, 9733 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/hda1 * 1 13 104391 83 Linux/dev/hda2 14 1288 10241437+ 83 Linux/dev/hda3 1289 1415 1020127+ 82 Linux swap/dev/hda4 1416 9733 66814335 5 Extended/dev/hda5 1416 1496 650601 8e Linux LVM/dev/hda6 1497 1517 168651 fd Linux raid autodetect/dev/hda7 1518 1538 168651 fd Linux raid autodetect/dev/hda8 1539 1557 152586 83 Linux/dev/hda9 1558 2321 6136798+ 83 Linux/dev/hda10 2322 2386 522081 82 Linux swap由上面的信息可知,系統(tǒng)的擴(kuò)展分區(qū)/dev/hda4中還有空閑的空間(因?yàn)樵摯疟P共有9733個柱面,/dev/hda4的結(jié)束柱面為9733,而該擴(kuò)展分區(qū)中的最后一個邏輯分區(qū)/dev/hda10的結(jié)束柱面為2386,所以柱面23879733都是空閑的),于是可以新建一個100M的分區(qū)。2用fdisk新建一個分區(qū)。rootlinux /# fdisk /dev/hdaThe number of cylinders for this disk is set to 9733.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)Command (m for help): nFirst cylinder (2387-9733, default 2387): 2387Using default value 2387Last cylinder or +size or +sizeM or +sizeK (2387-9733, default 9733): +100MCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table.The new table will be used at the next reboot.Syncing disks.rootlinux /# reboot最后的警告,要求系統(tǒng)重啟,新的分區(qū)表才會生效。3再查看系統(tǒng)的分區(qū)表,可以看到多了1個分區(qū)/dev/hda11。rootlinux /# fdisk -lDisk /dev/hda: 80.0 GB, 80060424192 bytes255 heads, 63 sectors/track, 9733 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/hda1 * 1 13 104391 83 Linux/dev/hda2 14 1288 10241437+ 83 Linux/dev/hda3 1289 1415 1020127+ 82 Linux swap/dev/hda4 1416 9733 66814335 5 Extended/dev/hda5 1416 1496 650601 8e Linux LVM/dev/hda6 1497 1517 168651 fd Linux raid autodetect/dev/hda7 1518 1538 168651 fd Linux raid autodetect/dev/hda8 1539 1557 152586 83 Linux/dev/hda9 1558 2321 6136798+ 83 Linux/dev/hda10 2322 2386 522081 82 Linux swap/dev/hda11 2387 2399 104391 83 Linux4格式化該分區(qū)。rootlinux /# mkfs.ext3 /dev/hda115把該分區(qū)掛載到/mnt/music目錄。rootlinux /# mkdir /mnt/musicrootlinux /# mount /dev/hda11 /mnt/music6在/etc/fstab最后添加一項(xiàng),使其每次開機(jī)都自動掛載。rootlinux /# vi /etc/fstab# This file is edited by fstab-sync - see man fstab-sync for detailsLABEL=/ / ext3 defaults 1 1LABEL=/boot /boot ext3 defaults 1 2none /dev/pts devpts gid=5,mode=620 0 0none /dev/shm tmpfs defaults 0 0none /proc proc defaults 0 0none /sys sysfs defaults 0 0/dev/hda3 swap swap defaults 0 0LABEL=SWAP-hda10 swap swap defaults 0 0/dev/hda11 /mnt/music ext3 defaults 0 0【實(shí)驗(yàn)故障與分析】下面的表格中列出了在實(shí)驗(yàn)過程中可能會出現(xiàn)的故障及其解決方法??纯词遣皇菍δ愕膶?shí)驗(yàn)有所幫助?如果你在實(shí)驗(yàn)中還遇到了其他的問題或故障,不妨記錄在表格中,通過自己的實(shí)踐,或者與老師、同學(xué)一起找找解決問題的方法。序 號實(shí)驗(yàn)故障分析與解決1無法創(chuàng)建hda11邏輯分區(qū)的編號是從5開始,自動遞加23【啟發(fā)聯(lián)想】1系統(tǒng)中哪些分區(qū)的大小不能修改,哪些分區(qū)的大小可以修改?2如果硬盤沒有空閑空間,而又需要多建一個分區(qū),怎么處理?(二)U盤管理【需求】u 掛載一個文件系統(tǒng)為FAT32類型的U盤?!鞠到y(tǒng)及軟件環(huán)境】操作系統(tǒng):Red Hat AS 4.0【實(shí)驗(yàn)配置文件及命令】1配置文件:無2命令:/sbin/fdisk,/bin/mkdir,/bin/mount,/bin/umount【實(shí)驗(yàn)步驟】1插入U(xiǎn)盤后,就可查看該U盤的設(shè)備名及分區(qū)表信息。rootlinux /# fdisk -lDisk /dev/hda: 80.0 GB, 80060424192 bytes255 heads, 63 sectors/track, 9733 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/hda1 * 1 13 104391 83 Linux/dev/hda2 14 1288 10241437+ 83 Linux/dev/hda3 1289 1415 1020127+ 82 Linux swap/dev/hda4 1416 9733 66814335 5 Extended/dev/hda5 1416 1496 650601 8e Linux LVM/dev/hda6 1497 1517 168651 fd Linux raid autodetect/dev/hda7 1518 1538 168651 fd Linux raid autodetect/dev/hda8 1539 1557 152586 83 Linux/dev/hda9 1558 2321 6136798+ 83 Linux/dev/hda10 2322 2386 522081 82 Linux swap/dev/hda11 2387 2399 104391 83 LinuxDisk /dev/sda: 264 MB, 264110080 bytes16 heads, 32 sectors/track, 1007 cylindersUnits = cylinders of 512 * 512 = 262144 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 1 1008 257904 b W95 FAT32Partition 1 has different physical/logical endings:phys=(1023, 15, 32) logical=(1007, 7, 32)上面的/dev/sda即是剛插入的U盤,它只有一個分區(qū)/dev/sda1,類型為FAT32。在Red Hat AS 4.0中,只要插入U(xiǎn)盤,系統(tǒng)就會把它自動掛載到/media目錄下,但是存在一個問題就是,如果U盤里的文件名為中文的話,就不能正常顯示;如果想讓它能夠正常顯示中文文件名,就需要手動掛載。2先卸載,然后手動掛載。rootlinux /# umount /dev/sda1rootlinux /# mkdir /media/u-diskrootlinux /# mount -o iocharset=gb2312 /dev/sda1 /media/u-diskrootlinux /# ls /media/u-disk/碩士學(xué)位論文0525.doc 答辯建議.txtexe20040607.doc 計(jì)算機(jī)系2004級畢業(yè)答辯通知版.xls 掛載時,設(shè)置了iocharset選項(xiàng)后即可正常顯示中文文件名。【實(shí)驗(yàn)故障與分析】下面的表格中列出了在實(shí)驗(yàn)過程中可能會出現(xiàn)的故障及其解決方法??纯词遣皇菍δ愕膶?shí)驗(yàn)有所幫助?如果你在實(shí)驗(yàn)中還遇到了其他的問題或故障,不妨記錄在表格中,通過自己的實(shí)踐,或者與老師、同學(xué)一起找找解決問題的方法。序號實(shí)驗(yàn)故障分析與解決1無法掛載sdal這可能是因?yàn)橄到y(tǒng)中已經(jīng)有一個或多個SCSI設(shè)備,這個情況下U盤的名稱不再是sda23【啟發(fā)聯(lián)想】1U盤的名稱是如何約定的?2如果系統(tǒng)中插入了多個U盤,如何處理?(三)autofs服務(wù)【需求】u 利用autofs自動掛載一個nfs文件系統(tǒng);u 假設(shè)局域網(wǎng)中有一臺nfs服務(wù)器,其IP為,共享目錄為/tmp;本機(jī) 的IP為,要求把nfs服務(wù)器的/tmp目錄掛載到本機(jī)的/mnt/nfs目錄上?!鞠到y(tǒng)及軟件環(huán)境】1操作系統(tǒng):Red Hat AS 4.02軟件:autofs-4.1.3-169【實(shí)驗(yàn)配置文件及命令】1配置文件: /etc/auto.master,/etc/auto.misc2命令:/usr/bin/vim,/sbin/service【實(shí)驗(yàn)步驟】1編輯/etc/auto.master,在末尾添加一行。rootlinux tmp# vi /etc/auto.master# $Id: auto.master,v 1.3 2003/09/29 08:22:35 raven Exp $# Sample auto.master file# This is an automounter map and it has the following format# key -mount-options-separated-by-comma location# For details of the format look at autofs(5).#/misc /etc/auto.misc -timeout=60#/misc /etc/auto.misc#/net /etc/ /mnt /etc/auto.misc -timeout=302編輯/etc/auto.misc,在末尾添加一行。rootlinux tmp# vi /etc/auto.misc# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $# This is an automounter map and it has the following format# key -mount-options-separated-by-comma location# Details may be found in the autofs(5) manpagecd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom# the following entries are samples to pique your imagination#linux -ro,soft,intr :/pub/linux#boot -fstype=ext2 :/dev/hda1#floppy -fstype=auto :/dev/fd0#floppy -fstype=ext2 :/dev/fd0#e2floppy -fstype=ext2 :/dev/fd0#jaz -fstype=ext2 :/dev/sdc1#removable -fstype=ext2 :/dev/hddnfs -ro,soft,int
溫馨提示
- 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)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 網(wǎng)絡(luò)服務(wù)可靠性的評估試題及答案
- 軟考網(wǎng)絡(luò)管理員考試常變化試題及答案
- 網(wǎng)絡(luò)管理員職業(yè)規(guī)則試題及答案
- 網(wǎng)絡(luò)服務(wù)質(zhì)量保證的方法試題及答案
- 風(fēng)險(xiǎn)管理的標(biāo)準(zhǔn)化與流程化試題及答案
- 實(shí)戰(zhàn)派2025年軟件設(shè)計(jì)師考試試題及答案
- 2025屆山東省煙臺市龍口市八年級數(shù)學(xué)第二學(xué)期期末監(jiān)測模擬試題含解析
- 掌握網(wǎng)絡(luò)管理員考試試題及答案技巧
- 網(wǎng)絡(luò)管理員學(xué)習(xí)資料中的試題及答案
- 軟件設(shè)計(jì)師備考指南及試題及答案
- CAMDS操作手冊資料
- 長款厚大衣項(xiàng)目質(zhì)量管理方案
- 模擬試卷(7)-【中職專用】2025年職教高考語文沖刺模擬卷(職教高考)解析版
- 【MOOC】創(chuàng)新與創(chuàng)業(yè)管理-南京師范大學(xué) 中國大學(xué)慕課MOOC答案
- 《裝配式建筑工程施工》課件-裝配式隔墻與墻面構(gòu)造
- 少先隊(duì)活動課《民族團(tuán)結(jié)一家親-同心共筑中國夢》課件
- 物流運(yùn)輸環(huán)境保護(hù)制度
- 法律科技融合發(fā)展
- 《公路建設(shè)項(xiàng)目文件管理規(guī)程》
- 2024-2030年中國產(chǎn)權(quán)交易行業(yè)前景動態(tài)與未來發(fā)展形勢報(bào)告
- DB11∕T 854-2023 占道作業(yè)交通安全設(shè)施設(shè)置技術(shù)要求
評論
0/150
提交評論