Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2002 19:26:17 -0600
From:      "Mike Meyer" <mwm-dated-1011576378.402618@mired.org>
To:        "Brian T. Schellenberger" <bts@babbleon.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: HOWTO -- backup onto CDRs?
Message-ID:  <15428.54969.119254.138926@guru.mired.org>
In-Reply-To: <200201152209.g0FM9eI00811@i8k.babbleon.org>
References:  <15426.33499.296182.78699@guru.mired.org> <15428.29548.346178.21655@guru.mired.org> <57g057v1hx.057@localhost.localdomain> <200201152216.g0FMGjG00878@i8k.babbleon.org> <001601531120f12FE6@Mail6.nc.rr.com> <200201152209.g0FM9eI00811@i8k.babbleon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian T. Schellenberger <bts@babbleon.org> types:
> > > I did this all the time under Linux; even with a P-450 it worked just
> > > fine as long as the system wasn't overtaxed (as in, load < 2), using the
> > > stdin feature of cdrecord.  I tried with burncd under FreeBSD and had no
> > > success, though.  Of course, cdrecord doesn't support stdin input so I
> Drat.  I meant  "Of course, burncd doesn't support stdin . . . ."

Use /dev/stdin as the file to burn. That works with burncd for me.

Brian T. Schellenberger <bts@babbleon.org> types:
> On Tuesday 15 January 2002 02:48 pm, Gary W. Swearingen wrote:
> > Anybody know what FS-specific (dump/restore) and non-FS-specific (tar,
> > cpio, pax, afio) archivers SHOULD do with sockets and named pipes? (Are
> > there any other kind of weird "files" besides those and block- &
> > character-special files and symbolic links?)
> Anyway, these are the only types of files that perl knows aobut; looks pretty 
> complete to me:

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:

bash-2.05$ dd if=/dev/zero of=y oseek=1000 count=2
2+0 records in
2+0 records out
1024 bytes transferred in 0.000059 secs (17353403 bytes/sec)
bash-2.05$ ls -l y
-rw-r--r--  1 mwm  wheel  513024 Jan 15 19:19 y
bash-2.05$ df .
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
mfs:28         127023      111   116751     0%    /tmp
bash-2.05$ rm y

So I now have a file 513K long that occupies 1K of disk space. In
fact, the file is on a file system that's only 127K in size.

The nasty part about sparse files is that there is no way to recognize
them as such without examining the file systems internal
structures. For instance:

bash-2.05$ wc y
       0       1  513024 y

The system provides a block full of zeros for the blocks that are
missing. Tar tries to recognize them as such. Cpio only does that if
you use the --sparse option.

	<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.54969.119254.138926>