NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: question about paritions/disklabel



On Mon, Feb 18, 2013 at 01:04:43AM -0800, Waitman Gobble wrote:
> I'm curious about why I'm receiving this error with dkctl
> 
> # dkctl wd1 getcache
> dkctl: /dev/rwd1: getcache: Inappropriate ioctl for device

Very strange.

> # /sbin/dkctl /dev/rwd1e 
> strategy:
> /dev/rwd1e: priocscan

Sounds like something is wrong in /dev on your machine, or you have a local
file "wd1" in your current directory. Many programs refering to disk devices
will use the opendisk library function, which will check the passed name
verbatim first, but then try to expand it - in your case it should change
"wd1" to /dev/rwd1d probably (or /dev/rwd1c, depending on architecture).

I can reproduce your output this way:

[/tmp] emmas #  touch wd1
[/tmp] emmas # dkctl wd1 
strategy:
dkctl: wd1: DIOCGSTRATEGY: Inappropriate ioctl for device
[/tmp] emmas # rm wd1 
[/tmp] emmas # touch wd1
[/tmp] emmas # ls -l wd1
-rw-r--r--  1 root  wheel  0 Feb 18 10:14 wd1
[/tmp] emmas # dkctl wd1 
strategy:
dkctl: wd1: DIOCGSTRATEGY: Inappropriate ioctl for device
[/tmp] emmas # rm wd1 
[/tmp] emmas # dkctl wd1
strategy:
/dev/rwd1d: priocscan

cache:
/dev/rwd1d: read cache enabled
/dev/rwd1d: write-back cache enabled
/dev/rwd1d: read cache enable is not changeable
/dev/rwd1d: write cache enable is changeable
/dev/rwd1d: cache parameters are not savable

wedges:
/dev/rwd1d: no wedges configured


If this is not your problem, you should double check the /dev/{r,}wd1* nodes,
maybe delete and use MAKEDEV to recreate them.


Martin


Home | Main Index | Thread Index | Old Index