Re: Can't overwrite a particular swap partition

2007-10-24 Thread RW
On Thu, 25 Oct 2007 01:39:20 +0100
Bruce Cran <[EMAIL PROTECTED]> wrote:

> RW wrote:
> > I have two swap partitions, ad4s1b is part of my main slice, and
> > ad6s1b is on a second drive. The permissions are the same, but I
> > can't overwrite the second one. The same thing happens whether I
> > use swapoff or reboot into single user mode.
> > 
> > What's the difference?
> > 
> > # dd if=/dev/random of=/dev/ad4s1b bs=1m
> > dd: /dev/ad4s1b: end of device
> > 4097+0 records in
> > 4096+0 records out
> > 4294967296 bytes transferred in 245.745739 secs (17477281 bytes/sec)
> > 
> > # dd if=/dev/random of=/dev/ad6s1b bs=1m
> > dd: /dev/ad6s1b: Operation not permitted
> > 1+0 records in
> > 0+0 records out
> > 0 bytes transferred in 0.053829 secs (0 bytes/sec)
> > 
> > # ls -l /dev/ad*1b
> > crw-r-  1 root  operator0, 125 Oct 25 00:25 /dev/ad4s1b
> > crw-r-  1 root  operator0, 132 Oct 24 20:23 /dev/ad6s1b
> >
> 
> This looks like a geom permission problem, though it sounds like it 
> should't be occurring.  Does setting
> 
> kern.geom.debugflags=16
> 
> solve this?

Not unless it needs a reboot.

# sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16
gumby# dd if=/dev/zero of=/dev/ad6s1b bs=1m
dd: /dev/ad6s1b: Operation not permitted
1+0 records in
0+0 records out
0 bytes transferred in 0.001970 secs (0 bytes/sec)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can't overwrite a particular swap partition

2007-10-24 Thread Bruce Cran

RW wrote:

I have two swap partitions, ad4s1b is part of my main slice, and ad6s1b
is on a second drive. The permissions are the same, but I can't
overwrite the second one. The same thing happens whether I use swapoff
or reboot into single user mode.

What's the difference?

# dd if=/dev/random of=/dev/ad4s1b bs=1m
dd: /dev/ad4s1b: end of device
4097+0 records in
4096+0 records out
4294967296 bytes transferred in 245.745739 secs (17477281 bytes/sec)

# dd if=/dev/random of=/dev/ad6s1b bs=1m
dd: /dev/ad6s1b: Operation not permitted
1+0 records in
0+0 records out
0 bytes transferred in 0.053829 secs (0 bytes/sec)

# ls -l /dev/ad*1b
crw-r-  1 root  operator0, 125 Oct 25 00:25 /dev/ad4s1b
crw-r-  1 root  operator0, 132 Oct 24 20:23 /dev/ad6s1b



This looks like a geom permission problem, though it sounds like it 
should't be occurring.  Does setting


kern.geom.debugflags=16

solve this?

--
Bruce
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"