swap fileÀÇ Ãß°¡
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2003-08-13 23:51:01
 

1. "df -k" ¸í·ÉÀ» »ç¿ëÇÏ¿© Ãß°¡ÇÏ°í ½ÍÀº swap file Å©±â ¸¸Å­ÀÇ free space¸¦ °¡Áö°í
ÀÖ´Â file systemÀÌ ÀÖ´ÂÁö È®ÀÎÇÑ´Ù.

% df -k
ÆÄÀϽýºÅÛ K¹ÙÀÌÆ® »ç¿ë °¡¿ë ¿ë·® ¼³Ä¡ÁöÁ¡
/dev/dsk/c0t0d0s0 962582 779074 87258 90% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 865774 731198 48006 94% /opt
swap 67664 8408 59256 13% /tmp
/dev/dsk/c0t1d0s3 8316189 933423 6551156 13% /doc
/dev/dsk/c0t2d0s3 8316189 2529292 4955287 34% /export

2. À§ÀÇ °á°ú¿¡ µû¶ó /export file system¿¡ 50MÀÇ swap fileÀ» Ãß°¡ ÇÑ´Ù¸é,
root ·Î loginÇÏ¿© ¾Æ·¡¿Í °°ÀÌ ÇÑ´Ù.

# cd /export
# /usr/sbin/mkfile 50m new-swap-file
^^^^^^^^^^^^^^ -> »õ·Î¿î swap fileÀÇ À̸§
# /etc/swap -a

3. À§¿Í °°ÀÌ ÇÑÈÄ "swap -l" ¸í·ÉÀ¸·Î »õ·Î ¸¸µç swap fileÀÌ Ãß°¡µÇ¾ú´ÂÁö È®ÀÎÇÑ´Ù.

# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,1 16 410384 371216
/export/new-swap-file - 16 102384 102384

4. »õ·Î Ãß°¡ÇÑ swap fileÀÌ ½Ã½ºÅÛ rebooting ÈÄ¿¡µµ »ç¿ëµÇ°Ô ÇÏ·Á¸é ¾Æ·¡¿Í °°Àº
³»¿ëÀ» /etc/vfstab¿¡ Ãß°¡ÇÑ´Ù.

# vi /etc/vfstab

/export/new-swap-file - - swap - no -


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦