Subject: Re: Playing with dkwedge
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 08/24/2005 13:09:48
--o0ZfoUVt4BxPQnbU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 24, 2005 at 09:49:35PM +0200, Manuel Bouyer wrote:
> On Wed, Aug 24, 2005 at 12:37:51PM -0700, Bill Studenmund wrote:
> >=20
> > Yes and no. That's what softdeps uses snapshots for, or one of the thin=
gs=20
> > it uses them for. However snapshots are more for being able to make=20
> > self-consistent backups and for simple "undelete" (deleted something by=
=20
> > mistake? Chances are it's in the snapshot, so just bring it back).
>=20
> I meant snapshot are made to take a fixed, consistent image of a live
> filesystem. So it's possible to run fsck on this to detect problems.
> Of course there are other uses too :)

True. But I think we really only need to do that every few weeks at best.

> > If you (or I) really care about the data, we should be using a RAID 5 o=
r=20
> > better. And we should have a program that verifies parity. Not just rea=
ds=20
> > the whole disk, but verifies each stripe's parity. Run it say once a we=
ek=20
> > on the whole array, and things are good.
>=20
> Yes, that would be the best choise. Unless you're using a hardware RAID,
> in which case you can't do this check (and if the hardware controller doe=
s,
> you have to trust it).

Yes. We also would need some sort of ioctl to do this. Even software raid=
=20
will, I expect, not trigger parity verification on a good stripe read. So=
=20
we need a way to tell the unit, verify this.

> And, we can't afford to use ECC memory and RAID everywhere. A periodic fs=
ck
> helps detect hardware problems (not talking about software bugs :), and
> it would be a shame to loose this.

I don't think that wedges will lose this. And a snapshot may be a good way=
=20
to do periodic verification. For a snapshot to be useful in a wedge world,=
=20
it has to show up somewhere other than the main location (for any use of a=
=20
snapshot). So you could just fsck that.

> > > BTW, we should probably add the -x and -X options to fsck, similar to
> > > dump(8).
> >=20
> > What options are those? I do not see them in our dump(8).
>=20
> >From a 3.0_BETA system:
>      -x snap-backup
>              Use a snapshot with snap-backup as backup for this dump.  See
>              fss(4) for more details.  Snapshot support is experimental. =
 Be
>              sure you have a backup before you use it.
>=20
>      -X      Similar to -x but uses a file system internal snapshot on the
>              file system to be dumped.

Interesting. As I actually looked at the man pages on www.netbsd.org for=20
"NetBSD-current" and didn't find these options documented.

Take care,

Bill

--o0ZfoUVt4BxPQnbU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFDDNQMWz+3JHUci9cRAoQFAJ4sdhvAa0uTGXt7xcaWu9f1Ck310ACgjVqW
F4UegJwnTwSpiO+v6b6sfOo=
=haPl
-----END PGP SIGNATURE-----

--o0ZfoUVt4BxPQnbU--