From owner-freebsd-bugs Thu Mar 1 23:10: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1578037B718 for ; Thu, 1 Mar 2001 23:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f227A2C80590; Thu, 1 Mar 2001 23:10:02 -0800 (PST) (envelope-from gnats) Date: Thu, 1 Mar 2001 23:10:02 -0800 (PST) Message-Id: <200103020710.f227A2C80590@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Alex Bakhtin Subject: Re: bin/25474: dump can't close fifo pipe correctly Reply-To: Alex Bakhtin Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/25474; it has been noted by GNATS. From: Alex Bakhtin To: David Malone 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