Opening raw disk while mounted in 5.x?

Dan Nelson dnelson at allantgroup.com
Wed May 25 10:54:28 PDT 2005


In the last episode (May 25), David Andersen said:
> Hoping someone knows the quick answer to this - in 4.x, it was
> possible to open /dev/ad0 while a filesystem one one of its slices
> was mounted.  This no longer appears possible under 5.x.  Could
> someone point me to the spot in the code where I'd need to disable a
> permissions check (or a sysctl, or anything) to permit this behavior
> again?
> 
> (The context:  mounting slice 2 of a disk and using it to store a
> compressed filesystem image.  Then opening the primary disk device to
> directly write the filesystem image onto slice 1.  The kernel seems
> to muck with the write calls if we try to do the write onto slice 1
> instead of the raw disk).  This is using the very cool
> imagezip/imageunzip utilities from the Utah Emulab project.

Try setting the kern.geom.debugflags sysctl to 16.  The kerenl
shouldn't have stopped you from writing to slice 1 though.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list