Operating System/Solaris2007/07/25 16:13

8장. Swap

System의 물리적인 partition을 변경하지 않고 swap size를 늘리고자 하는 방법.

* Sun OS(Solaris 1.x)

# pstat –s; swap space 확인
# mkfile -nv 40m /home/swapfile; swap file 생성
# /usr/etc/swapon /home/swapfile; swap space 확장
# pstat -s or -T; swap space 확인

- booting시 자동 swap on 하려면 아래 file edit

# vi /etc/fstab
/home/swapfile swap swap rw 0 0

- swap_on 한 작업을 최소 하려면

# rm /home/swapfile
# vi /etc/fstab 하여 추가했던 entry 삭제

* Solaris 2.x

# pstat -s; swap space 확인
# /usr/sbin/mkfile -nv 40m /home/swapfile; swap file 생성
# swap -a /home/swapfile; swap 공간 확장
# pstat -s or swap -s; total swap_size 확인

- booting시 자동 swap on 하려면 아래 file edit

# vi /etc/vfstab
/home/swapfile - - swap - no -

* SWAP(참조)

The swap command is used to display swap space usage, and to add or remove swap areas on

disk;

#swap –l

swapfile dev swaplo blocks free
/dev/dsk/c0t3d0s1 32,25 8 187912 127088

Creating and Adding swap areas

#mkfile 10m /exp/swap
#swap -a /exp/swap
#swap -l

swapfile                dev    swaplo        blocks        free
/dev/dsk/c0t3d0s1 32,25        8     187912        127088
/exp/swap             -    8        20472        20472

Removing swap areas

#swap -d /exp/swap

Creative Commons License
Posted by BLUEDAY™