8.1 Linux Θ(ͧΒřƨ

8.1 Linux Θ(ͧΒřƨ

ˊ੥֜ޅ^ৰ 8 ত âிඣ ˆ ˤ 8 ϑ(ͧβȳƈ̎ ƨতᡅͥ ext2 ʐ ext3 âிඣ4 /proc3sysfs3swap âிඣ4 ¤ṁ3Ŧṁ^żṁ4 džाⒸՈūϬ4 ľՈūϬ4 ඗Ȁʐ֜ܰ QՈϬͩ4‑֜ޅ ƿ└᪂าՈ5ͩ4 8.1 Linux ϑ(ͧβŘƨ ̱ňிඣȑǎ5ǎ4âՈƌʔʐ੥ˊ ẝ£࿁ɥ«̱ňிඣՈâ੥ˊிඣ ੄ࢴ ◄ˊ੥ˊ4â੥֜ޅâிඣ4ƅâՈƌʔ3ᪿ΅਍̱ňՈƌń ɥPǎ5ǎ4ǪP£࿁ŷ ᡅY5☦ՈΓťâ੥ˊḳâ3ᝯ੥ˊâʐ੥ˊǍʻϔǒß4â੥ˊǒ┉Zɥ«ிඣȭ ੥ˊ5śƅ͢ư֜ޅ‑ʐඈඋ1ň4Linux Ոâ੥ˊʐ ƌʔ᪂̣͟zâ੥ˊ◄˖ՈाⒸ ੥ˊK«ϬΙ Linux ՈżȖƨՈ࿁ᡅ˖4֜ޅc˕â੥ˊʐ 47̠ 8.1.1 Linux ՈâிඣିƧ 1Mext2 ˼ ext3 ɻˊȌ ¤᫗Ո ext ிඣ« Extended File System Ո෭΅ ƷĉŐ ext13ext2 ʐ ext3 Y࢑4ext ி c& Linux ᪂ᩥՈ ͣƅѐՈ UNIX ĽǍ4Ʒ₋ϬrY൫௦š඗Ȁʐֲơʍ඗Ȁ4Ǹ» ̲PǔĽ/ՈŌ5« ext ிඣȺȈ࢑᪂̣῁Ɵtâǡ੥ˊ4ext2 ிâ੥ˊிඣ£࿁ ᩨՈâڌNŖ K«̶̓ϔ Linux ிඣ Ɔ̓3ƚϬ ֲQŤǒ Linux ிඣՈ̓ᾬ ੥ˊிඣ4 ext2 âிඣϬՈ௦šᅆͥ£࿁ିĨ Windows Ոâ ‑ᜬFAT ϬǡᩴơâǍʻ4 ņrⒸ3ǚΝrⒸ3ƿ└3¤ʒdzÑȺ௦šᅆͥ׏tPϔǒ඗Ȁ ͢ĉȯrâ⑃ò3 ி3ƌ΢Ჳǐ਍â੥ˊ¤◄Ոּ͟Ǎʻ4P௦šᅆͥɥ«Pϔඈ ̳PȭàP͟ ‑P௦šᅆͥǻ Ϭǡ̳Pʃ᪊ẝ âzֲơ4&rƫz੥ˊ ிඣႮ¬ඝɣ௦šᅆͥ ᅆͥ4ɣ௦šᅆͥǻʐ͢ȭàâՈâȑᝯȐrljƌńֲơ4ֲơɥ«Ⱥâȑǎ͢ȭ àՈ௦šᅆͥǻּ༘͟Ոᜬ4ֲơՈɣPȭ༘͟ᝯࢴ&P8Ảȉ94◄ᡅͼ͛Ո« ௦š ᅆͥǻʐâȑ« 1:n Ո͟ி PâՈ௦šᅆͥǻ«̳PՈ IJP௦šᅆͥdzÑȭà̶ 126 Linux ̱ňிඣ‑า^੥ˊ ZՈȐPâ4֜ޅâȑ4ẝ4᪂ᩥՈƣü«&ǒɴỞẋ]ȐՈᲳǐƿ᪃⒲ ᩨ̑Ρ[ Linux ūϬՈâிඣ« ext2 ͢Ľͥ«Ẕᜐࣷǎ3̠ˊʌά4IJƟ Linux ிڌ ඣᝯŰ̶ŌàϬ4ǔ̶ǽ͢ₑᡅՈᜐʐɳʟȒ ext2 Ո෾ͥKɥİ◶\Ἓ ext2 «☢aȣ âிඣNLFS 4êỞՈàϬ]ƌń͆̓Ո⒲L IJȭzὧǽ͢ₑᡅՈᜐɥ«PႸʁ ՈŽͥ4ẝK«&¬4ᡅǕʉ ext3 ிඣՈƣü4 ext3 º ext2 âிඣǕʉ໐ǡ « ext2 Ո¤ƆČ ȭaȣ£࿁¤ÑƆĚ4ƟQՈ ext3 ி ඣඓẋ⑃rⒸՈàϬʐΝẟ>ඓ☢tcࣷǎdz☤ Âúǀ͔ͨǭ ext2 ிඣ4ext2 ϬdzÑ ݑŌūϬ ext3 ிඣ \◄ƚLʐȕᩱẋ࣏4╠\ ext3 ிඣͣƅÑ[Ľͥ ʌࣷǎɳ4ext3 ிඣࣷǎɳǽΙ ǭ⏝࿁☢Ɔ4ń ext3 ிඣᝯ☢ͩ͟ƶΞॅϢ) Ϲ਍̑Ρ Ȓ ிඣ]◄ᡅ̼ɡâிඣ4໐ ext3 ிඣʮ̩ՈrⒸǮ◄̓Ņό࢖4 ϔǒǀϘɳljĈ£࿁4ext3 ிඣǽ̓ŌȴʌrâிඣՈǀϘɳ ࿁ὃ̹☢ͩ͟ƶȭ âிඣỤtՈ۸ū4ńϔǒǀϘɳljĈ£࿁Z ext3 ȴƇr࢑µśƇϬọō4 żϬKżǛƶẒՈɥ«8ȐrljťâிඣǎϔǒՈPႸɳ9µś4ẝ࢑µś[ ZՈ râ3âݒċ਍ƟŚ4֜ޅȺˌẠǘඡϵz☢ͩ͟ƶ໐ƊН ṇʌՈẔᜐợò4ext3 ńợòẝPɳ࿁Zȭɨ JFS2 ਍ிඣÂ]ŤĄÃ ໐ú ext3 ń ƌʔϔǒrƅdz࿁ẜ◄ᡅẟᜐ̶Ƶ΅ϔǒ̱ň4IJ͢වȌɳ࿁\ѕ«żΙՈ4ɘ͢« ext3 Γťº ext2 ிඣŋ൫ ໐\◄̣éʐʮ̩ϔǒ4Ǫ̲ ext3 ּɨ ReiserFS ʐ XFS Ոȥ֜ޅ῁«ü& ext3 Ոaȣ£࿁ȭ ਍ʌợிඣ ʼnƅŰĺՈ CPU ūϬɋ4ẝP ¬ᪿ΅͐ẟᜐrĄĚ ᪂ᩥTń᪂ᩥỿṕਜ਼ͩrɥ>ඓͨ2rȈ5☦Ո໇ₓ4 ΓťϔǒḰdž£࿁4º ext2 Ḱt ext3 ☢5ƫ ˊ᩾ZǮ◄⏲͑੄řʁÐŷdzǀt ϘḰdž1ň ú]ϬȴQɆ̣é3ʮ̩3ʸśĚ ľ਍1ň4ẝǔỆȌP᯳ūϬ ext ிிඣՈϬ Kͨ2r,ϬՈĿɀ4ext3 ẜȴƇrPɃ1ͣ tune2fs dzϬz Ⱥ ext2 ǔ5ƫŌḰdž& ext34Ǒẋǡ ext3 KdzÑ]ඓçŁŰΝ ໐ָȉ¤ṁt& ext2 âிඣ Ɇ4rᄳΙՈȕ[ͨǭ4 Γť̶࢑aȣµś4ext3 Γť̶࢑aȣµś P࢑aȣµś[data=journal µś ext3 Ⱥȭ¤ƅՈâϔǒǎ metadataǎ5âிඣϔǒՈϔǒ ŷϔǒՈϔǒ ẟᜐ aȣᩴơǪP࢑aȣµśdata=ordered z້ data=writeback µś [Ǯȭ metadata ᩴơaȣ ໐]ȭϔǒẟᜐaȣᩴơ4ிඣ੥ˊɜdzÑʵǒிඣՈǒ┉1ň◄ᡅ ń ிඣՈ1ňợò^âϔǒՈPႸɳ7ⒸɆϦọō4 Ⱥ ext2 âிඣḰdž& ext3 âிඣՈ̱ňǔ੄ř Ǯ◄ᡅṗ͑Ñ[ʁÐ tune2fs -j /dev/hda9 Ḱdž඗ȘΞĚ 8.1 ¤߾4 Ě 8.1 ext2 t£Ḱdž& ext3 ੥ˊ 127֜ޅ^ৰ 8 ত âிඣ ͼ͛ ext2 ɻˊȌLJ͈ɡ ext3 ɻˊȌðK^h˝̩ÛǫÜLJ͈KŰ4ģn tune2fs ʑLJΟæĄϙβƾÝɃfLJ͈ɵȔ̢Kşϙ /etc/fstab ƏƖƋKǫĝɻˊȌn°įĝ ext2 ɯȷɡ ext3 ᩨՈƌʔ᪂̣Z Ξ/dev/hda8 4ΞȘXƗńڌ☢ext3 aȣâdzÑƌ΢ńǪP /dev/hda8 ZņP ext3 âிඣ ÂȺaȣƌ΢ńǪP̲ᾬ᪂̣/dev/hda2 Z dzÑỞẋ ṗ͑Ñ[ʁÐǒɴ mke2fs -J device=/dev/hda8 /dev/hda2 Ո e2fsprogs Ո e2fsck Γť ext3 âிඣ4ƟP ext3 âிඣᝯ۸ūr ̴żṁ᪩, ᪂̣ ͹Ϭ e2fsck ǚ̩45ͩǔ੄ř Ǯ◄ᡅṗ͑Ñ[ʁÐŷdz umount /dev/hda8 e2fsck -fy /dev/hda8 වZ¤Ẵ tune2fs «ֲQ Linux ிඣϵ ext2 âிඣḰdž& ext3 âிඣՈż੄řúͨ ǭɳżΙՈỘǐ ͢ǒɴ¯ɉäƫ⒬ożĺ4njü& ext3 «ָȉº ext2 Ǖʉ໐ǡ âிඣ ẋÍŋ൫ẋ࣏ż&¿Ž ẝ 4 ɆdzÑż̓└òŌlj᪅ிඣϔǒՈƽ͔ɳ4¤ÑƟQ Linux ிඣ ᡅūϬaȣâிඣ żlj┭Ո5śɥ«ọōŋ൫4 ext34 2M/proc ɻˊȌ /proc âிඣ«PĖâிඣ ƷÑâிඣՈ5ś&Ϭ᪃⒲ிඣͱʴϔǒȴƇȉ »ǧ4¤᫗8Ėâிඣ9«ū/proc «ᔞŃՈ ƌńzͱƌ໐]«ܰ֜Z4/proc âிඣ P࢑ͱʴʐͱʴµųȕẟ࣏process ǕễǍʻՈƶ: ẝK«/proc ՈǣȑǡƊ4ẝĖ âிඣūϬ࿁^ƌńzͱʴͱᾬՈₑᡅϔǒ඗Ȁẟᜐ~ º໐ቻǚƅ͟ẟ࣏ՈƅϬǍʻ ÂńẔᜐỞẋΝǜͱʴdžϔǡΝǜிඣ᪂า4ϬʐàϬ࣏Û῁dzÑỞẋ/proc âிඣǣ 4ிඣǍʻ Â࿁Ởẋ/proc ΝǜͱʴՈɌǍʻ4◄ᡅͼ͛Ո« Ƿϵzẝ«PᔞŃՈி ņՈ ƷǮƌńzͱƌƟ4ǒƌńՈ /proc Ոͱǭ῁«¬ɍף»[῁ඣ üǸₐ☦Ոâ ŌǕ/proc Ո!᜻«&rȴƇPᩭϬቻǚிඣẟ࣏ǍʻՈ5ƫÌ἗ ඗ȘńūϬẋ࣏ ǕɴƷ☢ƅϬ ᱉Ϧr8ƛՈᡅ˖4z«¾࿊ᩭͱʴՈǔ̶̯௤KϬƷǡĉɎǍʻ z ȳϬ¬ɍẔᜐr‑า4 /proc «ϵͱʴȋ:Ո Â̵ƅPĭˊZãṁ/proc Ո᪂̣4ẝ«ü&/proc 'ᡅϬzƌ΢ ϵͱʴȋ:ՈிඣźɍǍʻ ໐̓ᾬ ẝǍʻՈỿṕĹาńϵͱʴȋ:Ոͱƌ4üǸΞȘ ȭ/proc ɆΞ[̱ň ls -l âՈ⑃ò῁« 0 IJΞȘȐrɡ׏ẝâՈͱǭ Ćǔ̖ͣŌ׏4Pɴᬥ ̓ᾬ ₐ☦ŸnjǒǒńńՈƅǔ̶Ǎʻ4ẝ«ü&/proc ʐ͢ÂᢈՈâிඣPʳ῁ȺႮ=ͼ͸4 ᔞŃâிඣVFS 4IJƷɩণǮ«PᔞŃՈâிඣ üǸń VFS ᡅ᫇ϬƷ᪻˖ »â3ֲơՈ i-node r /proc ±ĆʵǒͱʴՈǍʻńͱƌņএּàՈâʐֲơ4ẝK 4ὧâ¿r׏ʇ«& 0 Ոƣü4¬& ϬdzÑỞẋṗ͑Ñ[ʁÐǡ¤ṁ/proc âிඣ mount -t proc proc /proc ̵ƅ⒲LՈ̑Ρ[ɥĆt£¤ṁ/proc âிඣ4ϬƶZ4 proc âdzϬzቻǚƅ͟ͱʴźɍ3ᩥ ਜ਼ƶʒɳ3ǷńẔᜐՈẟ࣏źɍ਍ּ͟Ǎʻ4໐/ /proc ՈâʐֲơẜȴƇிඣĭˊɳʟż,ՈǍʻ4ΞZ¤Ẵ /proc Ոâ ú̓ᾬ 128 Linux ̱ňிඣ‑า^੥ˊ Ƿƌńzܰ֜Z IJϬẜ«dzÑʻūϬçŁǷâPʳ Ϭâේṕף[ᔞŃՈ » zିĨ more3less3cat ਍ʁÐɡ׏ƷØ4Ξƅේṕ࣏Û᪙Ě·ŌPᔞŃâ /proc Ć ņẝâ4ቻǚͱʴՈּàǍʻ ϢȒ8ϙा9̴ ᜬ 8.1 ᪸rPₑᡅՈᪿǚிඣǍʻՈ/proc â῁«ǮᪿՈ ǎͣ͢ĿňϬ4 ᜬ 8.1 ᪿǚிඣǍʻՈ/proc âǎͣ͢ĿňϬ âȑ ňϬ᪸ Cmdline ͱʴȳ¬džϔ Cpuinfo CPU Ǎʻ Iomem IO ᪂̣ՈͱƌūϬǍʻ Interrupts º߾ᝯŤϬՈ)ǍʻʐŤϬ້ՈǍʻ Ioports I/O ঳ǧՈūϬ Kcore ிඣĭˊͱƌʻ ]dzᪿǚ Loadavg ிඣ¿ţᯣṁ Meminfo ĭˊͱƌʐdž ľūϬǍʻ Modules ¤ṁµųᜬ Mounts ŦṁՈâிඣ Partitions ிඣ᪊/Ո ľᜬ Swaps džाⒸՈ-Ϭ̑Ρ Version ͱʴČƨǍʻ Uptime ிඣẔᜐrⒸ ń/proc ֲơ[¤ƅÑϔƋʁȑՈƄֲơ῁Ϭzƌʔẟּ࣏͟Ǎʻ ໐ɣƄֲơՈϔƋ ơȑɥ«͢ȭàՈẟ࣏ PID ẝâK«Ǯᪿʒɳ4Ǹ̲ẜƅPĽȞՈ/proc/self ֲơֲ ƷūȕƟQǷńËᜐẟ࣏Ո৪ǻẢȉ4ŷΞƟϬËᜐ cat/proc/self/cmdline r ĆẘúʁÐƨ ᵯ4ẟּ࣏͟ǍʻΞᜬ 8.2 ¤߾4 ᜬ 8.2 ẟּ࣏͟ǍʻâȳẴ â ȳẴ Cmdline ẟ࣏ȳ¬džϔ Environ ɳʟǜₓ Limits ẟ࣏└:Ǎʻ Status ẟ࣏źɍ Maps ẟ࣏ūϬՈ¬ɍ⏂ȉßâ ᜬ 8.13ᜬ 8.2 Ǯ«Ϧrżᢅ3żƅϬՈ/proc â ǒ┉ZՈ/proc âᡅẠẠ̶zẝ ϔₓ4ΞȘ້ᪿ̿ẟPǹrᢧႮ=ͫ͠ᱧՈâ dzÑȭּà/proc âūϬ more ʁÐ K ϣtՈâ̓Ƀکdzńඃቻǚּ͟Ǎʻ47¤ÑūϬ more ʁÐ໐☢ cat ʁÐ «ü&\ͩ8 ੥ˊ 129֜ޅ^ৰ 8 ত âிඣ ໐ƅâΞ kcore ɥƅdz࿁☢⑃4ẝʳՈ᪡Ϭ cat ºϢ«]ȌỆՈ4 3Msysfs ɻˊȌ sysfs âிඣିĨ/proc K«ĽȞՈâிඣ4ƷՈňϬńzȺிඣՈ᪂̣ඈඋt ɶƵ඗Ȁ ϢȒȕϬzƅ◄ᡅՈ࣏ÛȴƇͱʴՈϔǒ඗ȀǍʻ4ẝâிඣ΢ń/sys ֲơ 4ᜬ 8.3 «͢Ƅֲơǎ͢¤ȯͱǭ᪸4] ᜬ 8.3 sysfs âிඣՈƄֲơǎňϬ Ƅֲơ ňϬ Block ¤ƅՈų᪂̣ Bus ிඣ¤ƅՈʇඃିƧ Class ிඣՈ᪂̣ିƧ Ξ̌ť3ตť਍ Devices ிඣ¤ƅՈ᪂̣ _Ñ᪂̣ŦṁՈʇඃିƧඈඋtɶƵ඗Ȁ 4Mtmpfs ɻˊȌG͜˕ˍáɻˊȌH Linux ՈᔞŃͱƌʐ Windows Ոඈt5ś]Ȑ Linux ՈᔞŃͱƌϵᾬ ඈtĭˊͱ ƌʐdž ľ4tmpfs Ոż̓ǭₓɥ«ẝᾬ Ոʐ4tmpfs ǔ̡Ϗ ^dzÑūϬĭˊͱƌ KdzÑūϬdž ľ4໐úƷՈ̓Ƀdzʵǒ◄˖¬ɍ ‑ üǸ]ĆỤtᰈļ᯽4Ǹ̲ƷՈ ᪿ΅ợòǔȷ PჰƉ¥῁ϬƷǡȴŋɳ࿁4 5Mswap ɻˊȌ ʐ tmpfs ]Ȑ swap ǮϬzdž ľ4Linux ƅPĽͥ ŷdž ľՈ̓Ƀ«ிඣĭˊ ͱƌՈǹ ໐dž ľ« Linux ẔᜐՈȑ/ ľ4Ởîdž ľǯň swap ľ«ü& ƷǮňϬzdž ľ údž ľǮ࿁ūϬ swap âிඣ4swap ]ϵϬȋ: ໐« Linux ੥ˊՈȭᬥ4 6MΓƘƖŦsĝɻˊȌ ᔞŃâிඣ«PǔƅϬՈɁ dzÑǒɴȭ̶࢑âிඣՈΓť4Ǹ̲ ᔞŃâி ]ȐՈâிඣ4ẝʳ^ȴʌr Linux Ո̡Ϗɳ njǒɴr Z֜ޅඣẜ̭᩼ϬńȐPų ]Ṟ̏ňிඣ3ɳʟⒸՈᰈļ͝4┨rZ☦¤ẴՈ࢑ Linux âிඣ̲ Linux ẜΓťǔ ̶âிඣ Ξ FAT163FAT323sysV3nfs3iso9660 ਍4ƅPͥᡅ᪸Ո« ᰯᰯƅȑՈ NTFS Â]ᝯ RHEL 5 Sever ָȉΓť ◄ᡅƽញּàՈ RMP ĉÂŦṁ±dzÑūϬ4 8.1.2 ņ Linux âிඣ Ɵ◄ᡅ¤ṁP ľŷPâிඣ r Ŋ̴ᡅɆՈɥ«ܲᩨẝ ľՈâிඣି Ƨŷ ľʸśĚ ϢȒ±࿁ŦṁūϬ4ŦṁՈ5ͩƅǔ̶ ŷΞ mount z ້ǚΝ /etc/fstab ¤§ľ1ͣǡ ľ z«¤Pų,Ոܰ֜r ɥ◄ᡅϬ ǒɴŌƶႮ¬¤ṁ4Ɵ,ʺP,Ո ľ ϢȒ±࿁ņ ľՈâிඣ żȒ±«Ŧṁâிඣ4 1Mǫ ¬ľ«ȭƌʔ᪂̣໐ᣄՈ żᢅՈɥ«ƨŌܰ֜zࢿ¬ܰ֜ƟϢKĉŐ U ֜਍ࢿ ƌʔ᪂̣ 4 ľ«&rȺPųṇ̓ՈƌʔाⒸ tᆩ¾ṇɃՈľǻÑƍᱷūϬ◄˖4ń ḻ̌ňՈ1ͣƅ fdisk3parted3cfdisk ਍ ᕁϢȒ້ńɌ5☦ƅĄͥ Linux ẟᜐܰ֜ 130 Linux ̱ňிඣ‑า^੥ˊ IJɥֲQàϬ̑Ρǡ׏żΙϬՈẜ« fdisk4 Ξ parted Ոϔọ̌é£࿁ 2Mɤü̼ ʸśĚ࿁̻ᩭ ľt&Ɍ࢑ͣĿՈâிඣ ΞZ☦᩶4ẋՈ sysfs ਍4ϬՈʸśĚ1 ͣƅ mkfs3mkfs.ext33mkfs.reiserfs3mkfs.ext23mkfs.msdos3mkfs.vfat3mkswap ਍4◄ᡅͼ ͛Ո« ƅՈƶĆńʸśĚt reiserfs rȴ߾]࿁ņ reiserfs âிඣ ẝ«ü&᪩ƶZ ̵ƅ mkfs.reiserfs z້ mkreiserfs ºตZ[ṁPŷdzᢧΟẝ࢑⒲L4 mkfs ՈūϬ5ͩ ʁÐʸśmkfs -t filesystem device ʁÐ᪸ẝₐՈ filesystemâிඣ ȑ/ᡅūǎ Ξ ext33reiserfs3ext23fat323 ľ3ḳ֜3̵ȥ਍4◄ᡅͼ͛Ո ɥ«ƌʔ᪂̣ ΞPܰ֜Ո msdos ਍4໐ device᪂̣ ľ̑Ρ º໐lj᪅«ƅ⍌ȭɳՈʸśĚ4ūϬ fdisk-l ľ7QPǎᡅɡ׏ܰ֜ ńʸśĚ » ľ ľ̑Ρ4ẝǍʻǔₑᡅ ŷΞƅPϬ̿ʸśĚP U ֜ sda ՈP ǡɡ׏ à᪩ṗ͑ fdisk -l /dev/sda IJΞȘXƗȺ sda ʸśĚt ext3 à᪩ūϬΞ[ʁÐ mkfs -t ext3 /dev/sda ľr4 t£7ȒɥdzÑָȉŦṁẝ ͢Âό࢑Ϭͩ mkfs.ext3 /dev/sda6 Ⱥ ľʸśĚt ext3 âிඣ mke2fs -j /dev/sda6 Ⱥ ľʸśĚt ext3 âிඣ mkfs.ext2 /dev/sda6 Ⱥ ľʸśĚt ext2 âிඣ mke2fs /dev/sda6 Ⱥ ľʸśĚt ext2 âிඣ mkfs.reiserfs /dev/sda6 Ⱥ ľʸśĚt reiserfs âிඣ mkfs.vfat /dev/sda6 Ⱥ ľʸśĚt fat32 âிඣ mkfs.msdos /dev/sda6 Ⱥ ľʸśĚt fat16 âிඣ msdos âிඣɥ« fat16 mkdosfs /dev/sda6 Ⱥ ľʸśĚt fat16 âிඣ Ȑ mkfs.msdos mkswap ՈϬͩ mkswap /dev/sda6 ņǸ ľ& swap dž ľ swapon /dev/sda6 ¤ṁdž ľ swapoff /dev/sda6 ͟⒱dž ľ ľՈ5ś ɡ׏ swap swapon /dev/sda6 ¤ṁdž ľ ľ swapon -s ɡ׏ swap 8.1.3 Ŧṁʐżṁâிඣ ʐ Windows ]Ȑ Linux ¤ƅƌʔ᪂̣῁ᡅඓẋŦṁ̱ň±࿁ūϬ4ɘ͢«ϬՈܰ 3U ֜3̵ȥ਍᪂̣ !ƚ້ǔǭȤᩴŦṁ z«ūϬǀɩ7ȒՈżṁ̱ň ẝPͥȨ֜ ǣₑᢊ4 ᫗Ŧṁ ɥ«Ⱥƌʔ·ᯬՈͱǭɆPȸ ΢4PūǎՈֲơƿ4ẝֲơɥ¤ ੥ˊ 131֜ޅ^ৰ 8 ত âிඣ tr¤᫗ՈŦṁͥ4ẝʳPǡ ȭƌʔ·ᯬՈ᪃⒲ɥḰĚtrȭŦṁͥՈ᪃⒲4njü&ẝ ȸ«PȭP͟ி üǸPŦṁͥȐrǮΓťPƌʔ᪂̣4 ᩨ᪂า4ΞȘ]ūŦṁͥɥϵƷǡūǎŦṁֲơڌľՈ ֜ޅetc/fstab [Ոâ«Ȉ/ úǒɴ͟ƶrႮ¬żṁ̱ň4Ǹ̲ ࢿ¬ƌʔ᪂̣Ξ̵ȥ3U ֜3ࢿ¬ܰ֜਍^dzÑ᪂า&ȳ ¬Ⴎ¬Ŧṁ KdzÑń͢Ârȅʵǒ◄ᡅ¯¬Ŧṁzżṁ4ͼ͛ Ɵࢿ¬·ᯬūϬǀɩ7Ȓ Pǎᡅżṁ±࿁ǚϦ ȪĆϦɴ⏝᪳4 1MʣÛʑLJ mount ʁÐʸśmount [-t vfstype] [-o options] device dir ʁÐ᪸mount ʁÐdzÑȺūǎՈ᪂̣Ŧṁ4>ƌńՈֲơ ƟâிඣŦṁǀtȒ ϬdzỞẋȭ᪩ֲơ̱ňǡǒɴȭūǎ᪂̣Ոâᪿ΅Ո̱ň4 džϔ᪸ -aŦṁ fstab ĉȯՈ¤ƅâிඣ4 -fµŃϘŦṁՈẋ࣏ Â]ǒ┉Ŧṁ᪂̣4 -Fʐ-a džϔP᰻ūϬÑÂᜐ.ÛŦṁɣ᪂̣4 -lº߾¤ƅ>ŦṁՈிඣ ĉŐŻʃੂ4 -L<ʃੂ>ǮŦṁ৪ȌūǎʃੂՈ ľ4 -nńŦṁẋ࣏]ȕ/etc/mtab ΅͑ᰈ4 -o᪂าâிඣŦṁrՈ̱ňdžϔ4 -rÑǮᪿµśŦṁ᪂̣4 -tūǎᡅŦṁՈâିƧ4 -wÑᪿ΅µśŦṁ᪂̣4 bindₑ,ŦṁP᪂̣4,ֲơńŦṁͥ[᪂̣῁dzÑϬ4-- moveîŦṁ᪂̣Ŧṁ4,Ոֲơ[4-- ͼ͛mount ʑLJ^ˏ ŻʣÛļKƖjˌȶʣÛļ^áÝõKȶ˝ ŻȶʣÛļKɃ fʣÛ̢æhʣÛļʲdzįô˫Ƌʳ"ĝŸ̧Ȕ 2M̩ÛʑLJ umount ʁÐʸśumount [-ahnrvV][-t <filesystem type>][filesystem] ʁÐ᪸umount ʁÐdzÑżṁâிඣ4 džϔ᪸ -ażṁ/etc/mtab ᩴơՈ¤ƅâிඣ4 -hº߾z­4 -nżṁr]ᡅȺǍʻƌ͑/etc/mtab â4 -rᆩ\ͩt£żṁ ɑ᪙ÑǮᪿՈ5śₑ,Ŧ͑âிඣ4 -t<filesystem type>±żṁọ-¤ūǎՈâிඣ4 -vËᜐrº߾᪪ඊՈǍʻ4 -Vº߾ČƨǍʻ4 filesystem]┨rָȉūǎâிඣ̲ KdzÑϬ᪂̣ȑࢴzŦṁͥǡᜬ߾âிඣ4] ͼ͛Ɓ>ŶhÉaʐͿʣÛļųˏ umount ɻˊȌK^ˎȋ˲͆ĆȁˎʣÛļ̩ÛK ɷøh>şʣÛGɩÉaKƗɩʣÛļHð9Û͹ȉ 132 Linux ̱ňிඣ‑า^੥ˊ 8.2 ÙX̡ʧ͞ 8.2.1 §¤džाⒸ ᩨՈ swapڌľ Pჰ« swap ʸśՈ4ǔ̶rȅϬĆǕɴ džाⒸŷ 8.1 ᅆ¤᩶Ոdž džाⒸ\ͩƍᱷɌḳâՈżĺƽញᡅ˖4ŷΞ Linux [Ո Oracle ƟƅPϬ ‑Ոĭ ᩨՈdžाⒸǮƅ 1G ɥ◄ᡅȭ͢ẟڌ»ẜ◄ᡅ 2G Ո swap džाⒸ dz ͱƌ& 1Gˊ ᜐÍʉ4§¤ swap džाⒸՈǹɘΞ[4 üǸᡅܲljƅᱷ̻ՈाⒸǡϬň ֜ޅľᡅϬ4 ZՈmŅाⒸ dž֜ޅɡ̼ 1 swap džाⒸ4ȌሔūϬ KVM 1ͣ4̼ɡΙȒdzÑẟ͑[Pǹ4 ńPưএՈâிඣ§¤P swap džâ Âúń/opt/image ֲơ§¤ 2G 2 Ո swap džâ4§¤džâՈʁÐΞ[ dd if=/dev/zero of=/opt/image/swap bs=1024 count=2048000 ⍣Ȓ׏4º߾ZẘúΞ[඗Ș ⍣4Ņό ΞȘt£ PჰĆńό 2048000+0 records in 2048000+0 records out 2097152000 bytes (2.1 GB) copied, 272.867 seconds, 7.7 MB/s 3 ņÂ᪂าdž ľ ʁÐ& mkswap ūϬ5ͩΞ[ mkswap /opt/image/swap ΞȘt£ º߾ZĆẘúΞ[඗Ș Setting up swapspace version 1, size = 2097147 kB 4 ̼ɡɴƅՈdžाⒸ̓Ƀ ʁÐ& free free -m ΞȘt£ º߾ZĆẘúΞ[඗Ș Total used free shared buffers cached Mem: 1011 989 21 0 1 875 -/+ buffers/cache: 112 898 Swap: 1027 0 1027 KdzÑỞẋ̼ɡ meminfo âǡǒɴ 5ͩΞ[ grep SwapTotal /proc/meminfo 5 ȳ¬,ʺ¤Ո 2G swap džाⒸ ʁÐ& swapon swapon /opt/image/swap 6 ܲᩨ,ʺ¤Ո 2G džाⒸ>ඓϣά ʁÐ& free -m Total used free shared buffers cached Mem: 1011 995 15 0 4 877 -/+ buffers/cache: 113 897 Swap: 3027 0 3027 KdzÑỞẋ̼ɡ meminfo âǡǒɴ 5ͩΞ[ grep SwapTotal /proc/meminfo ੥ˊ 133֜ޅ^ৰ 8 ত âிඣ 7 ǚ Ν /etc/fstab â ū,§¤Ո swap džľȳ¬Ⴎ¬Ẕᜐ 5ͩ«ńâՈżȒ¤ ͑Ξ[Ƌ৪ /opt/image/swap swap swap defaults 0 0 ႷǸǀt§¤ swap dž ľՈ1ň4 8.2.2 $┨džाⒸ Ɵdžľ]͹ᝯ◄ᡅ ɥᡅǎr$┨dž ľÑ₎΢ᝯŤϬՈाⒸ4džâPჰ῁ͣƅ Ɵ̓ՈĿࢳ4ǎ r ₎΢ƷØȭȴʌிඣɳ࿁3ʺ¤ᰈļ-Ϭɋƅǔₑ̓Ո͛54IJ « $┨7ּ QPǎᡅܲᩨ᪩ाⒸ]͹ᝯ◄ᡅ4$┨Ոẋ࣏Ξ[¤߾ ľ]࿁ᝯȳϬ4 ľ]࿁ᝯŦṁ dž ȑ/̴ᩭܰ֜ȥ¬]࿁ණනᝯūϬ ŷ 1 ż੄řՈ¢ͩ«ńεɘµś[ȳ¬ிඣ4ΞȘȥ¬]ĉȯçŁᝯūϬՈ ľ dzÑūϬ ǡ͟⒱ܰ֜ȥ¬ZՈ¤ƅdžाⒸ4 ľՈʁЫ¬4 swapoff ʁÐúȒP[ȳ¬dž 2 Ñ root ᵯéẟ͑ிඣ ṗ͑Ñ[ʁÐǡܲǎdž ľ>ᝯࡅϬ ẝ ₐՈ/dev/hdb2 « dž ľ swapoff /dev/hdb2 º/etc/fstab $┨᪩-ֲ4 3 4 ūϬ parted ʁÐǡ$┨ ľ parted /dev/hdb ͼ͛ŃŪĝ/dev/hdb ĆϙáÝΓƏĝ swap ͈ĝW̝"ŦΦĝÉaʐKh̴ æɬ͛ϙ͈fDZΥĝÉaʐ ľÂ(ǎ ËᜐZPǹȒĆẟ͑ parted ȴ߾ ńẝȴ߾[ṗ͑ print ɡ׏ɴƌՈ 5 ̿$┨Ոdž ľՈƵ᪂̣ǻ ϢȒṗ͑ rm MINOR ẝ ₐՈ MINOR «Ϭ̿$┨Ո ľՈ Ƶ᪂̣ǻ4ẝPͥǔₑᡅ ü&ȭிඣՈΝǜĆএŷϣά ẝẋ࣏«]dzỊՈ üǸȑ/P Ƶɳ⏲͑ǷܲՈƵ᪂̣ǻ4 6 ⏲͑ quit ỄϦ parted ȴ߾৪4 7Z֜ޅľ IJdžâ¹Ϣƌńz ZẴǹɘ͔ᾬǀtȒɥ>ඓńிඣ$┨rdž úŤϬ؄̓ₓՈाⒸ üǸẜᡅËᜐΞ[̱ň$┨džâ 1 Ñ root ᵯéẟ͑ிඣ ࡅϬdžâ ʁÐΞ[ swapoff /swapfile Ǹ̠Ո swapfile ɥ«džâ ɣிඣ3ɣdžâՈȑࢴ῁Ć]Ȑ Ϭà᪩Żdž tႮ=Ոdžâȑ4 º/etc/fstab $┨᪩-ֲ4 2 3 $┨â ʁÐΞ[ rm /swapfile ႷǸ PdžाⒸɥǀ͔ᝯ$┨r ाⒸǣÑ₎΢4 8.3 Ν .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    24 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us