1. swap 이란?
=> 가상메모리 공간, 많으면 좋고 없으면 안되고
=> 서버의 물리 Memory 에 따라 swap 을 할당해준다.
2. swap 공간 확인
[amerry:/]swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d20 85,20 16 8390640 8390640
/fkl/swap - 16 2097136 2097136
[amerry:/]swap -s
total: 177392k bytes allocated + 31056k reserved = 208448k used, 6585120k available
3. swap 을 파일로 추가하기
[amerry:/home/test]mkfile 100m swap_add
[amerry:/home/test]swap -a /home/test/swap_add
[amerry:/home/test]swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d20 85,20 16 8390640 8390640
/fkl/swap - 16 2097136 2097136
/home/test/swap_add - 16 204784 204784
[amerry:/home/test]swap -s
total: 177288k bytes allocated + 31160k reserved = 208448k used, 6687440k available
4. 자동마운트 되기 위해 /etc/vfstab 수정
[amerry:/home/test]cp /etc/vfstab /etc/vfstab_bakup.20131229
[amerry:/home/test]cd /etc/
[amerry:/etc]ls -al | grep vfstab
-rw-r--r-- 1 root sys 530 Dec 29 00:55 vfstab
-rw-r--r-- 1 root root 530 Dec 29 17:20 vfstab_bakup.20131229
[amerry:/home/test]cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d20 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
/dev/md/dsk/d60 /dev/md/rdsk/d60 /fkl ufs 2 yes -
/dev/dsk/c1t2d0s0 /dev/rdsk/c1t2d0s0 /home ufs 2 yes -
/fkl/swap - - swap - no -
/home/test/swap_add - - swap - no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
=> /etc/vfstab 파일을 반드시 백업 하고, 수정해주면 된다.
5. swap 삭제 하기
[amerry:/home/test]swap -d /home/test/swap_add
[amerry:/home/test]swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d20 85,20 16 8390640 8390640
/fkl/swap - 16 2097136 2097136
[amerry:/home/test]swap -s
total: 177512k bytes allocated + 31256k reserved = 208768k used, 6584712k available
/etc/vfstab 파일도 수정했다면 수정해주면 된다.
'Work > Solaris' 카테고리의 다른 글
Oracle Logical Domain Manager ( LDOM or OVM ) (0) | 2014.05.29 |
---|---|
Solaris10 IP 설정하기 (0) | 2013.12.29 |
Solaris10 네트워크 장치 확인 (0) | 2013.12.29 |
Solaris10 네트워크설정 (0) | 2013.12.29 |
Solaris10 설치 및 SVM 설정 (0) | 2013.07.10 |