Bug #1937
closed
Added by nonsolosoft almost 14 years ago.
Updated over 9 years ago.
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
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.:
- vnconfig -c vn0 /dati/swapfile
- disklabel -rw vn0s0 auto
- disklabel -e vn0s0 # add b: * * swap
- swapon /dev/vn0s0b
- 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.
Also available in: Atom
PDF