NetBSD-Bugs archive

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

Re: kern/37425: fss_snapshot_mount panic during fsck

On 11/25/2008 6:20 AM, Juergen Hannken-Illjes wrote:
The following reply was made to PR kern/37425; it has been noted by GNATS.

From: Juergen Hannken-Illjes<>
Subject: Re: kern/37425: fss_snapshot_mount panic during fsck
Date: Tue, 25 Nov 2008 15:15:53 +0100

  On Mon, Nov 24, 2008 at 06:05:23PM -0800, Scott Ellis wrote:
  >  Script used to test is attached (yes, it's a hack, but it was quick to
  >  write!) as  It requires the directory structure of
  >  /.snapshot/.store to be created, and vnd 11-14 to be available.

  How should the /.snapshot/.store hierarchy look like?

I believe /.snapshot/.store/ will get populated with snapshot files (5 at a time?) with the filename of the date and time the snapshot was taken. The script should automatically do that for you.

  >          # Make a new store file
  >          exec(`fssconfig -c fss0 / $newfile`);
  >          exec(`fssconfig -u fss0`);
  >          # Attach it to the vnode
  >          exec(`vnconfig -r $vnd{""} $newfile`);

  If I get this right you are trying to create a vnd device from the
  snapshot backup.  If this succeeds, there is a bug in the vnd driver.
  Snapshot backups cannot be opened, read or written -- they can only
  be accessed through /dev/{r,}fss{n}.

It's been ages since I hacked together that script, but if memory serves, the general logic is supposed to be something like:

1) Create snapshot #1
2) Attach vnd11 to snapshot #1 (using "/.snapshot/.store/2008-11-25-whatever" as the vnd backing file)
3) Mount vnd11a (or whatever) as "/.snapshot/2008-11-25-whatever"
4) Create snapshot #2
5) Repeat steps 1-3 until vnd11-vnd14 are filled snapshots #1 through #4
6) umount and unconfigure vnd11/snapshot #1
7) Free the snapshot #1
8) Perform steps 1-3 (so that snapshot #1 is now the most recent snapshot)
9) Repeat steps 6-8 with the oldest snapshot, loop forever

The gist is that I tried to always have 4 snapshots configured and mounted (via vnd). As soon as all 4 are used, the oldest one is removed and a new snapshot is taken.

In my quick test, creating /.snapshots/.store/ and running the script twice gave the panic (the first time through it just created the first .store/foo file I get the process started).

Home | Main Index | Thread Index | Old Index