tech-kern archive

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

Re: Snapshot performances



Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:

> My experience is that I regularily take external snapshots (using
> fssconfig(8)) while doing TSM backups, and this works fine even for
> multi-TB filesystems. However, taking an internal snapshot (fsck -X) on
> that filesystem starved the machine, eventually paniced it (some WAPBL
> resource exhaustion) and the log replay on reboot took something like half
> an hour. On much smaller filesystems, fsck -X works fine.

Reading the sources, fsck_ffs -X or dump -X means using fss(4) with a
temporary file:

src/sbin/dump/main.c:snap_open()
        fss.fss_bstore = backup ? backup : fss.fss_mount;
(...)
        if (stat(fss.fss_bstore, &sb) == 0) {
                if (S_ISDIR(sb.st_mode)) {
                        snprintf(path, sizeof(path),
                            "%s/XXXXXXXXXX", fss.fss_bstore);
                        fd = mkstemp(path);
                        fss.fss_bstore = path;
                        dounlink = 1;

fss(4) man page does not tell us about internal snapshot. We have to dig
in src/sys/dev/fss.c to find some reference to it:

        /*
         * Check for file system internal snapshot.
         */ 
      
        error = namei_simple_user(fss->fss_bstore,
                                NSM_FOLLOW_NOEMULROOT, &vp);
        if (error != 0)
                return error;

        if (vp->v_type == VREG && vp->v_mount == sc->sc_mount) {

Hence I understand "internal" means using for backing store a regular
file that belongs to the same filesystem you are snapshotting. This can
be done by fsck_ffs -X, dump_ffs -X, or simply by feeding a backing
store to fsck_ffs -x, dump_ffs -x or fsconfig.

When you do it using fssconfig(8), you specify a backing store on the
same filesystem?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index