Date: Thu, 1 Mar 2001 23:10:02 -0800 (PST) From: Alex Bakhtin <bakhtin@amt.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/25474: dump can't close fifo pipe correctly Message-ID: <200103020710.f227A2C80590@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/25474; it has been noted by GNATS.
From: Alex Bakhtin <bakhtin@amt.ru>
To: David Malone <dwmalone@maths.tcd.ie>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/25474: dump can't close fifo pipe correctly
Date: 02 Mar 2001 10:01:03 +0300
>>>>> "DM" == David Malone writes:
David,
>> I'm trying to dump my filesystems to fifo pipe (created by mkfifo) and
>> have got a problem. If we use dump -f FILE and FILE is fifo, it dumps
>> fs fine, but after that it fails to close this file. Looking into dump sources
>> (tape.c file) I have found a problem: after closing the file it tries to
>> reopen it several times:
>> while ((f = open(tape, 0)) < 0)
>> sleep (10);
>> (void) close(f);
>>
>> And because nobody is listening at the other end of this pipe,
>> we'll wait for a long time...
DM> Using dump -f doesn't seem to work that well for anything but tapes
DM> unless you specify stdout. I'd recommend that you try:
DM> dump -f - /usr > /my/fifo
DM> The man page should probably indicate that this is the case.
In this case it's impossible to split DUMP archive into
volumes. The problem with closing file is the only one with FIFO
pipes.
==================
{bakhtin}/home/bakhtin>dump -B 1000 -f - / > /dev/null
DUMP: Date of this level 0 dump: Fri Mar 2 09:52:52 2001
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/da0s1a (/) to standard output
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 34303 tape blocks.
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: DUMP: 34317 tape blocks
DUMP: finished in 31 seconds, throughput 1107 KBytes/sec
DUMP: DUMP IS DONE
==================
/ is only an example. I'll try to describe what I'm trying to
do. I'm trying to backup my filesystems to CDRW disks in my CDRW drive. I
have discovered that it is possible to do without making ISO9660 FS on CDRW
disk, I can just redirect all output from dump to cdrecord. But ALL my FSs
(except / ) are bigger than CDRW disk (650M), so I need to make
multi-volume backup. When DUMP is writing to STDOUT, it can't split file
into volumes. So, it seems that FIFO pipe is a good way to do such
backups.
--
Best regards, -- Alex Bakhtin.
AMT Group, Cisco Systems Gold Partner, http://www.amt.ru
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103020710.f227A2C80590>
