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

Re: [Nbd] copy on write breakage



On Sun, Feb 11, 2007 at 09:17:24AM -0600, Phil Howard wrote:
> I just tried copy on write (-c option or copyonwrite config).  I think this
> needs a way to specify at least where the file will be written, if not even
> the exact file name itself.  I propose either overloading the existing option
> or adding a new option to allow specifying a path.  If the path is a directory
> then a generated-name file will be created within that directory.  If the path
> is a non-existing name then create file and use that.  If the file actually
> exists, that may be more complicated (e.g. supporting previously written copy
> on write file).  But at least for now I'd like to see a way to specify where.

Point.

I was thinking of modifying the copyonwrite option for 2.10 so that it
would allow stuff like "copy the whole file before doing the first
write", or to allow for running a script to create the copy, and similar
things. This might be a good addition to those ideas.

> Currently, nbd-server tries to create the copy on write file in "/dev".

Actually, it tries to create the file where the export is. If you export
a device node from /dev, it will indeed create it there.

A workaround hack could be that you create a symlink to the /dev entry
you want to export in a directory where you do have read access, and
export that.

> On my system, and an increasing number of others, "/dev" tmpfs, ramfs,
> or rootfs.  This will also be seen soon on embedded systems (something
> I am now working on).  There is also the permission issue to access
> "/dev" to create files when the effective uid nbd-server is running
> under is non-root.

Indeed.

-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22



Reply to: