Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2002 20:48:53 -0600
From:      "Mike Meyer" <mwm-dated-1011581333.cbaae7@mired.org>
To:        Brian T.Schellenberger <bts@babbleon.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: HOWTO -- backup onto CDRs?
Message-ID:  <15428.59925.443917.666351@guru.mired.org>
In-Reply-To: <0a2d11623021012FE4@mail4.nc.rr.com>
References:  <15426.33499.296182.78699@guru.mired.org> <200201152209.g0FM9eI00811@i8k.babbleon.org> <15428.54969.119254.138926@guru.mired.org> <0a2d11623021012FE4@mail4.nc.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian T. Schellenberger <bts@babbleon.org> types:
> On Tuesday 15 January 2002 08:26 pm, Mike Meyer wrote:
> > There's one other type of screwy file: sparse files. These have
> > "holes" where there are no blocks on disk. You can create one
> > trivially:
> 
> Are these at all common?  For the matter, are they preserved by cp?  They 
> seem like a hyphothetical concern more than a practical one and a nuisance 
> more than a benefit.  But maybe that's just me.

Various implementations of db use them. The original implementation of
UniCOS didn't provide them, and when we plugged in the db'ified
version of the pwd routines and tried to make the password db, it ran
root out of space.

I'm not sure what else uses them, but the source for tar turn up a
test for sparseness that ought to work on all Unix systems: if the
stat structure's st_blocks times the file blocksize is less than the
same structure's st_size.

No, they aren't preserved by cp. Neither are flags, set*id bits, and a
number of other things that one would rather not lose. If the cp
crosses file systems, it also loses hard links.

> Regardless, if you do a compressed backup they should compress real nicely 
> (though not as efficiently as the sparse files), though they will spring to 
> full space on a restore if the backup/restore program isn't clueful about 
> them.

Springing back to full space can easily mean they don't fit on the
restore media, even though it's bigger than the file system you are
restoring.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15428.59925.443917.666351>