Encrypting raid5 volume with geli
Ulf Lilleengen
ulf.lilleengen at gmail.com
Sun Dec 14 14:59:15 PST 2008
On Sun, Dec 14, 2008 at 11:56:49AM -0800, John-Mark Gurney wrote:
> Ulf Lilleengen wrote this message on Sat, Dec 13, 2008 at 14:59 +0100:
> > Then, I discovered in geom userland code that it opens the disk where
> > metadata should be written in write only mode. Then I discovered the reason:
> > gvinum tries to write to the stripe in question, but has to read back the
> > parity data from one of the other stripes. But, they are opened O_WRONLY, so
> > the request fails. I tried opening the device as O_RDWR, and everything is
> > find.
>
> Isn't this a bug in gvinum that it lets a disk be opened in O_WRONLY,
> when it needs read permissions? Shouldn't it add the read permission
> to it's provider open, and let the underlying fd still be O_WRONLY (so
> the OS will prevent any reads) or it should be documented in the
> gvinum man page that raid5 volumes cannot be opened in O_WRONLY mode..
>
Yes, I agree.
Michael, could you try the attached patch? It should fix the issue within
gvinum itself. The previous change will have to be reverted too.
--
Ulf Lilleengen
More information about the freebsd-geom
mailing list