[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to configure vnode swapping
You really hould use the vnd devices, not the svnd ones for swapping,
to not suffer from performance problems. I think I mentioned that
in the vnd man page. Otherwise the problem you experience is that
currently you need to specify vnd0c in the config line of your kernel
config file, i.e.:
config bsd root on sd0a swap on sd0b and vnd0c dumps on sd0b
or similar (taken from memory). This is a pain, I know, and there is
free code available in NetBSD that makes this static configuration
unnecessary, but I have not had time to merge it in. Volunteers?
If you have the devices you potentially want to swap on in that line,
swapon(8) should later work.
Niklas
> Date: Tue, 30 Jun 1998 09:58:42 -0300
> From: Craig Metz <cmetz@inner.net>
>
> How do I configure swapping to a file via the vnode stuff in OpenBSD? It
> doesn't seem to work the way I'm used to. I did:
>
> jimbo# dd if=/dev/zero of=/big-swap-file bs=1k count=51200
> jimbo# vnconfig -c -v svnd0 /big-swap-file
> svnd0: 524288000 bytes on /big-swap-file
> jimbo# swapon /dev/svnd0
> swapon: /dev/svnd0: No such file or directory
> jimbo# swapon /dev/svnd0a
> swapon: /dev/svnd0a: Device not configured
> jimbo# swapon /dev/svnd0c
> swapon: /dev/svnd0c: Device not configured
>
> Do I need a disk label? So I tried:
>
> jimbo# disklabel -E /dev/svnd0c
>
> Initial label editor (enter '?' for help at any prompt)
> > p
> device: /dev/svnd0c
> type: SCSI
> disk: vnd device
> label: fictitious
> bytes/sector: 512
> sectors/track: 100
> tracks/cylinder: 1
> sectors/cylinder: 100
> cylinders: 10240
> total sectors: 1024000
> free sectors: 0
> rpm: 3600
>
> 16 partitions:
> # size offset fstype [fsize bsize cpg]
> c: 1024000 0 unused 0 0 # (Cyl. 0 - 10239)
> > a
> partition: [a] b
> offset: [0]
> size: [1024000]
> FS type: [swap]
> > w
> > p
> device: /dev/svnd0c
> type: SCSI
> disk: vnd device
> label: fictitious
> bytes/sector: 512
> sectors/track: 100
> tracks/cylinder: 1
> sectors/cylinder: 100
> cylinders: 10240
> total sectors: 1024000
> free sectors: 0
> rpm: 3600
>
> 16 partitions:
> # size offset fstype [fsize bsize cpg]
> b: 1024000 0 swap # (Cyl. 0 - 10239)
> c: 1024000 0 unused 0 0 # (Cyl. 0 - 10239)
> > q
> No changes.
> jimbo# vnconfig -u -v svnd0
> svnd0: cleared
> jimbo# vnconfig -c -v svnd0 /big-swap-file
> svnd0: 524288000 bytes on /big-swap-file
> jimbo# disklabel -rv /dev/svnd0c
> reading label from block 0 (0x0)
> # /dev/svnd0c:
> type: SCSI
> disk: vnd device
> label: fictitious
> flags:
> bytes/sector: 512
> sectors/track: 100
> tracks/cylinder: 1
> sectors/cylinder: 100
> cylinders: 10240
> total sectors: 1024000
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0 # milliseconds
> track-to-track seek: 0 # milliseconds
> drivedata: 0
>
> 16 partitions:
> # size offset fstype [fsize bsize cpg]
> b: 1024000 0 swap # (Cyl. 0 - 10239)
> c: 1024000 0 unused 0 0 # (Cyl. 0 - 10239)
> jimbo# swapon /dev/svnd0b
> swapon: /dev/svnd0b: Device not configured
> jimbo# swapon /dev/svnd0c
> swapon: /dev/svnd0c: Device not configured
>
> So, can anyone point out what step I'm missing?
>
> -Craig
>