|
2.11 Mounting File Systems
Local ¹× ºÐ»êÆÄÀÏ ½Ã½ºÅÛ
´ëºÎºÐÀÇ °ü¸®ÀÚ´Â local(disk-based)ÆÄÀϽýºÅÛ°ú ¿ø°Ý(ºÐ»ê)ÆÄÀϽýºÅÛÀ¸·Î ÀÛ¾÷ÇÏ°Ô µÈ´Ù. ÀÌ ÀåÀº localÆÄÀϽýºÅÛ¿¡
´ëÇؼ¸¸ ¾ð±ÞÇÑ´Ù.
Local(disk-based)ÆÄÀϽýºÅÛ
À̵é ÆÄÀϽýºÅÛÀº disk³ª CD-ROM¶Ç´Â µð½ºÄÏó·³ ¹°¸®ÀûÀÎ ¹Ìµð¾î¿¡ ÀúÀåµÈ´Ù.
ufs ±âº» diskÆÄÀϽýºÅÛÀº BSDÀÇ fat fastÆÄÀϽýºÅÛ¿¡ ±âÃÊÇÑ´Ù.
hsfs CD-ROMÆÄÀϽýºÅÛ(High sierraÆÄÀϽýºÅÛ)
pcfs DOSµð½ºÄÏ dataÀÇ read/write¸¦ Áö¿øÇÏ´Â file system
ºÐ»êÆÄÀÏ ½Ã½ºÅÛ
ºÐ»êÆÄÀϽýºÅÛÀº network¿¡ Á¢¼ÓµÈ ´Ù¸¥ ½Ã½ºÅÛÀÇ access¸¦ Áö¿øÇÑ´Ù.
nfs NetworkÆÄÀϽýºÅÛ
rfs Remote file½Ã½ºÅÛ
File SystemÀÇ Mount¿Í Unmount
MountingÀº ºÐ»êµÈ file systemÀ» ÇϳªÀÇ µð·ºÅ丮¿¡ ¸ðÀ¸´Â ÀÏ·ÃÀÇ °úÁ¤ÀÌ´Ù. ÀϹÝÀûÀ¸·Î mounting°ú unmountingÀº
½Ã½ºÅÛÀÌ startup ¹× shutdownµÉ ¶§ ÀÚµ¿ÀûÀ¸·Î ½ÇÇàµÈ´Ù. ½Ã½ºÅÛÀÇ °ü¸®ÀÚ°¡ ÆÄÀϽýºÅÛ mount¶Ç´Â unmountÀÇ
ÀÛ¾÷ÀÌ ÇÊ¿äÇÑ »óȲÀº ÀϹÝÀûÀÎ °æ¿ì´Â ¾Æ´ÏÁö¸¸ ÀÖÀ» ¼ö ÀÖ´Ù. ÀÌ·¯ÇÑ »óȲÀº backupÀ» Çϰųª, ÆÄÀϽýºÅÛ ºÒÀÏÄ¡¸¦ check,
repartitionÇÏ´Â °æ¿ì¸¦ Æ÷ÇÔÇÑ´Ù. Ãß°¡ÀûÀ¸·Î, disk reconfiguration Àº ¶§¶§·Î file systemÀÌ
system startup ¹× shutdown½Ã ÀÚµ¿ mount¸¦ À§ÇØ /etc/vfstabÀÇ º¯°æÀÌ ÇÊ¿äÇÏ´Ù.
»õ·Î¿î File systemÀÇ Mount Test
¾Õ¿¡¼ »ý¼ºÇÑ file systemÀ» mountÇÑ´Ù.
#mkdir /database
#mount /dev/dsk/c0t0d0s0 /database
file systemÀ» unmountÇÏ¿© user°¡ access ºÒ°¡Çϵµ·Ï ÇÑ´Ù. ¾Æ·¡ÀÇ µÎ°¡Áö Áß Çϳª¸¦ »ç¿ëÇÑ´Ù. -device
special file system nameÀÌ¿ëÇÏ´Â ¹æ¹ý
# unmount /dev/dsk/c0t0d0s0
- /etc/vfstab file¿¡ ÁöÁ¤µÈ monut-pointÀÌ¿ëÇÏ´Â ¹æ¹ý
# unmount /database
À§¿¡¼¿Í °°ÀÌ ÆÄÀϽýºÅÛÀº mount¿Í unmount°¡ °¡´ÉÇѵ¥, ÀϹÝÀûÀ¸·Î ½Ã½ºÅÛ startupÀ̳ª shutdown½Ã¿¡ ÀÚµ¿À¸·Î
ÁøÇàµÈ´Ù.
Local File SystemÀÇ Mounting All startupÀ̳ª shutdown½Ã¿¡ ¸ðµç local file system´Â
ÇϳªÀÇ ¸í·ÉÀ¸·Î mount¶Ç´Â unmountµÈ´Ù
local file systemÀÇ mount all local file systemÀº systemÀÌ run level 2°¡ µÉ
¶§, Mountsys script¿¡ ÀÇÇØ mountµÈ´Ù. ÀÌ script¿¡¼ »ç¿ëÇÏ´Â ¸í·ÉÀº:
mountall -l (-l optionÀº local file systemÀ» ÀǹÌÇÑ´Ù)
mountall¸í·ÉÀº ¾î¶»°Ô ÀÛµ¿Çϴ°¡ mountall ¸í·ÉÀº Assembly instruction book¿¡ ÀÖ´Â "assembly
required"ÁßÀÇ "attach all screws."¿Í °°Àº stepÀÌ´Ù. stepÀÇ ¾îµò°¡¿¡ attachµÇ´Â screwµéÀÇ
list°¡ ÀÖ´Ù. mountall¸í·É¿¡¼ ÀÌ Á¤º¸µéÀº /etc/vfstab fileÀÇ mount at book field¿¡¼
Á¦°øµÈ´Ù.
/etc/vfstab File
ÀÌ fileÀº file system mount¸¦ À§ÇÑ defult settingÀ» Á¦°øÇÑ´Ù. fileÀÇ Çü½ÄÀº line´ç 7°³ÀÇ
field·Î ±¸¼ºµÈ record°¡ Á¸ÀçÇϸç dash(-)´Â fieldÀÇ value°¡ nullÀÓÀ» ÀǹÌÇÑ´Ù. ¾Æ·¡ÀÇ ¹öÆ°À» ´·¯
fileÀ» º¸ÀÚ.
fieldÀÇ Àǹ̴Â
device to mount |
local ufs file systemÀÇ logical(block)device name |
device to fsck |
local ufs file systemÀÇ logical(block)device name |
mount point |
local file resourceÀÇ default mount point |
FS type |
local file resource¿¡ ´ëÇؼ´Â Ç×»ó "ufs"ÀÌ´Ù. |
fsck pass |
ufs file systemÀº ÀÌ fieldÀÇ °ªÀÌ ¾ç¼öÀ̾î¾ß checkµÈ´Ù. dash (-)´Â
checkÇÏÁö ¾ÊÀ»°ÍÀ» ÀǹÌÇÑ´Ù. °ªÀÌ 1ÀÌ¸é °¢°¢ÀÇ ufs file systemÀº ¼øÂ÷ÀûÀ¸·Î checkµÇ¸ç, 1º¸´Ù
Å«°æ¿ì sck´Â ÃÖ´ëÀÇ È¿À²À» º¼ ¼ö ÀÖµµ·Ï ¼·Î ´Ù¸¥ disk¿¡ ÀÖ´Â ´Ù¼öÀÇ ufs file systemÀ» º´·Ä·Î checkÇÑ´Ù. |
mount at boot |
yes³ª no¸¦ Ç¥½ÃÇÏ¿© ½Ã½ºÅÛÀÌ run level 2°¡ µÇ°Å³ª, mountall ¸í·ÉÀÌ issue
µÇ¾úÀ» ¶§ file resource mountall ¿©ºÎ¸¦ °áÁ¤ÇÑ´Ù.
/(root>¿Í /usrÀº ÀÌ ±â´É°ú °ü°è¾øÀÌ /etc/rcs.d/S30rootusr.sh script¿¡ Á¤ÀǵǾî mountµÊÀ¸·Î
mount-at-boot field´Â noÀÌ´Ù. |
mount option |
comma·Î ±¸ºÐµÇ´Â mount option list |
mountÀ§Ä¡¸¦ Á¤ÇÏ´Â field
mountall¸í·ÉÀº boot½Ã¿¡ mountµÇ¾î¾ß ÇÒ Àå¼Ò¸¦ Á¤ÇÏ´Â entry¸¦ ÀÌ file¿¡¼ »ç¿ë ÇÑ´Ù. Ưº°È÷ mount-at-boot
field¿¡¼ file system typeÀ» °áÁ¤ÇÑ´Ù. ufs(local) file systemÀÇ 1¹ø°, 3¹ø°, field¿¡
À¯ÀÇÇÑ´Ù.
#device mount
#to mount point
/dev/dsk/c0t3d0s0 /
/dev/dsk/c0t3d0s6 /usr
/dev/dsk/c0t3d0s5 /opt
/dev/dsk/c0t3d0s0 /database
ÀÌ field´Â mountµÉ file system°ú mount point¸¦ listÇÑ´Ù.
MountµÉ File SystemÀÇ Á¤º¸Á¶È¸
mount´Â ÀϹÝÀûÀ¸·Î ÀÚµ¿¼öÇàµÇ±â¶§¹®¿¡, ÁÖ¾îÁø ¶§¿¡ ¾î¶² file systemÀ» mountÇÒ °ÍÀΰ¡¸¦ Á¤ÇÏ´Â °Íµµ ÇÊ¿äÇÏ´Ù.
O/S°¡ mount½ÃŲ file systemÀº argument¾øÀÌ mount¸í·ÉÀ¸·Î È®ÀÎÇÒ ¼ö ÀÖ´Ù
|