Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2024 20:43:07 -0800
From:      "Pat Maddox" <pat@patmaddox.com>
To:        freebsd-hackers@freebsd.org
Subject:   A proposal for makefs -t zfs to support more zpool layouts
Message-ID:  <cd133384-0c0b-4b56-b317-131017ae0b57@app.fastmail.com>

next in thread | raw e-mail | index | archive | help
Here's a valid zpool configuration that makefs -t zfs does not currently support:

truncate -s 100m file.zfs
zpool create -m none my-test-pool $(realpath)/file.zfs
zfs create -o mountpoint=/dataset1 my-test-pool/dataset1
zfs create -o mountpoint=/foo/dataset2 my-test-pool/dataset2
zfs list -r my-test-pool

NAME                    USED  AVAIL  REFER  MOUNTPOINT
my-test-pool            218K  39.8M    24K  none
my-test-pool/dataset1    24K  39.8M    24K  /dataset1
my-test-pool/dataset2    24K  39.8M    24K  /foo/dataset2

makefs has a few constraints that prevent this:

- there must be a dataset with a mountpoint matching the rootpath
- all mountpoints must descend from the root path
- root path must not be canmount=off

My assertion: makefs -t zfs should, as much as possible, be able to create zpool configurations equivalent to those produced by a series of zpool/zfs commands.

1. What are your thoughts on that as a worthwhile direction for makefs?
2. What obstacles do you see in terms of getting there?

I am interested in implementing these changes, and invite all ideas and feedback before proceeding.

Thanks,
Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cd133384-0c0b-4b56-b317-131017ae0b57>