NetBSD-Bugs archive

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

Re: bin/60383: fssconfig(8): distinguish between taking and loading a snapshot



    Date:        Sat, 18 Jul 2026 20:30:28 +0000
    From:        Taylor R Campbell <riastradh%NetBSD.org@localhost>
    Message-ID:  <20260718203030.422B284DA5%mail.netbsd.org@localhost>

  | - Mount a snapshot:
  | 	# mount -t snapshot /home/.snap/20260718 /mnt

If you're meaning to mount an existing snapshot that way, then fine,
just needs a mount_snapshot command to make it work I expect.  But
if you expect that to create the snapshot, and mount it, the same way
that dump -x creates the snapshot and dumps it, it would need more or
perhaps just different, information than that - in what you give there
there's no information about what filesystem to snapshot.

You can't assume it is /home as there is no requirement the snapshot
backing file is on the same filesystem as is being snapshot (snapshotted?)

What could be done, and would be more akin to what dump does is

	mount -t snapshot /home /mnt

which would make a snapshot of /home in some unnamed file on its
filesystem, and mount that on /mnt - destroying the snapshot when
/mnt is umounted, just as dump destroys its when the backup has
completed.

I kind of agree on making fss into a cloner - the only issue is that
this one (like cgd and raid etc) is one where the user (or script)
needs to know what it is getting, because it needs to be able to use
the same one again later, most users of cloning devices don't care
which minor dev is assigned to them, whatever it is just gets used,
and closed.

I have a script (which I will attach below) that I find useful when
dealing with all these pseudo-disk type devices (vnd, cgd, ...) which
finds the first free one, and prints its name - it isn't race proof,
two instances of it run at once will return the same name, but for most
normal uses it works just fine.  Usage is just something like "next_avail ffs"
and it will output fss0 (or fss3 or whatever is the first free).

kre

ps: I don't expect the attachment will survive into gnats, and perhaps
not even to netbsd-bugs, if anyone, if anyone else wants a copy, let me
know, I will either e-mail them, or make it available on munnari.oz.au
for anon ftp (no http servers there).

Attachment: next_avail
Description: next_avail



Home | Main Index | Thread Index | Old Index