Re: Feature request: nbd-server serves multiple (autogenerated) files in directory hierarchy
Hi Lars,
Sorry for the late reply; I'm a bit busy as a co-organizer of FOSDEM
these days, and I haven't gotten around to looking at my nbd mailbox in
a while...
On Thu, Jan 18, 2024 at 11:46:36AM +0100, Lars Rohwedder wrote:
> Some examples:
>
> Case A: 1 GiB device size, 1 MiB chunk size, 2000 nodes per directory:
> -> 1024 chunks -> fit in one directory.
> $BASEDIR/0000.bin
> ...
> $BASEDIR/1023.bin
>
> Case B: 1 TiB device size, 4 MiB chunk size, 2000 nodes per directory:
> -> 262144 chunks -> hierarchy depth of ceil(log(262144)/log(2000))=2.
> chunk #0: $BASEDIR/000/0000.bin
> ...
> chunk #1999: $BASEDIR/000/1999.bin
> chunk #2000: $BASEDIR/001/0000.bin
> ...
> chunk #3999: $BASEDIR/001/1999.bin
> ...
> chunk #262143: $BASEDIR/131/0143.bin (if I calculated correctly)
>
> Case C: 10 TB device, 64 KiB chunks, 1000 nodes per directory:
> -> 167'772'160 chunks -> hierarchy depth: 3.
> chunk #0: $BASEDIR/000/000/000.bin
> ...
> chunk #167772160: $BASEDIR/167/772/160.bin
This sounds a lot like the "treefiles" feature in nbd-server. Have you
looked at that? See "man 5 nbd-server" and search for "treefiles".
If that doesn't do what you're looking for, I'm always willing to look
at patches ;-)
--
w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}
I will have a Tin-Actinium-Potassium mixture, thanks.
Reply to: