Showing posts with label swapspace. Show all posts
Showing posts with label swapspace. Show all posts

Saturday, December 20, 2014

FreeBSD'de ek swap alanı oluşturma işlemleri

Aşağıdaki komut ile 10gb büyüklüğünde dosya oluşturulur.
dd if=/dev/zero of=/opt/swap0 bs=1024k count=10240

ile dosya oluşturulur.

mdconfig -a -t vnode -f /opt/swap0 -u 0 && swapon /dev/md0

ile aktif hale getirilir.

Aktifleme sonrası çıktı:

atakoy:/opt# server>  swapinfo -h
Device          1K-blocks     Used    Avail Capacity
/dev/label/swap0   1023996       0B       1G     0%
/dev/md0         10485760       0B      10G     0%
Total            11509756       0B      11G     0%

Açılışta aktif olması için /etc/rc.conf'a aşağıdaki satır eklenir.
swapfile="/opt/swap0"