Project

General

Profile

Actions

Bug #1937

closed

vnconfig and swapfile

Added by nonsolosoft over 13 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

probably there is something wrong or obsolete in:
http://www.dragonflybsd.org/docs/handbook/handbook-adding-swap-space/

lap# truncate -s700M /dati/swapfile
lap# chmod 0600 /dati/swapfile
lap# vnconfig -e vn0 /dati/swapfile swap
vnconfig: swapon: Device not configured
lap# vnconfig -l
vn0: covering /dati/swapfile on ad0s2h, inode 409
vn1: not in use
vn2: not in use
vn3: not in use
lap# ls /dev/vn*
/dev/vn /dev/vn0s0 /dev/vn2
/dev/vn0 /dev/vn1 /dev/vn3
lap# swapon /dev/vn0
swapon: /dev/vn0: Device not configured
lap# swapon /dev/vn0s0
swapon: /dev/vn0s0: Device not configured

Best wishes, \ferz

Actions #1

Updated by thomas.nikolajsen over 13 years ago

The link is to the old handbook, but problem is the same in new handbook;
will update it.
For the time being vnconfig(8) can't add swap file directly;
you will have to add vn file, label and do swapon(8), e.g.:
  1. vnconfig -c vn0 /dati/swapfile
  2. disklabel -rw vn0s0 auto
  3. disklabel -e vn0s0 # add b: * * swap
  4. swapon /dev/vn0s0b
Actions #2

Updated by swildner over 8 years ago

  • Description updated (diff)
  • Status changed from New to Closed

Setting up a swapfile just via vnconfig(8) does in fact work here (4.3 master), therefore I'm closing the issue.

advancer# truncate -s700M swap
advancer# vnconfig -e vn0 swap swap
advancer# swapinfo -k
Device 1K-blocks Used Avail Capacity Type
/dev/da0s1b 67108864 32 67108832 0% Interleaved
/dev/vn0 716800 0 716800 0% Interleaved
Total 67825664 32 67825632 0%

It can also be configured via rc.conf:

swapfile=/path/to/swapfile

I don't know what was wrong at the time this bug was filed.

Actions

Also available in: Atom PDF