[OpenAFS] Volume stays offline

Hartmut Reuter reuter@rzg.mpg.de
Thu, 18 Dec 2003 12:08:06 +0100


This is a multi-part message in MIME format.
--------------010704020702020902070509
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


Apply this patch to dumptool.c, then it schould work also with big dump 
files.

Hartmut

Frank Burkhardt wrote:
> On Tue, Dec 16, 2003 at 05:32:35PM +0100, Hartmut Reuter wrote:
> [snip]
> 
>>>Maybe there's a chance to get the files back from a volume-dump.
>>>Is there a tool which is able to extract files out of a volume dump
>>>or are files in a volume staying offline lost without a chance
>>>to restore them from a backup?
>>
>>you may use dumptool which is compiled in src/tests. It allows you to 
>>navigate inside the dump by cd  and to save single
>>files to disk.
> 
> 
> frank@orinocco:/SCR > ls -la m6.dump
> -rw-r--r--    1 root     root     9946560538 Dec 13 17:43 "m6.dump"
> frank@orinocco:/SCR > dumptool -f m6.dump
> open of dumpfile m6.dump failed: File too large
> 
> dumptool seems to be useful for small files (< 2G ?) only :-( .
> 
> Regards,
> 
> Frank
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info


-- 
-----------------------------------------------------------------
Hartmut Reuter                           e-mail reuter@rzg.mpg.de
					   phone +49-89-3299-1328
RZG (Rechenzentrum Garching)               fax   +49-89-3299-1301
Computing Center of the Max-Planck-Gesellschaft (MPG) and the
Institut fuer Plasmaphysik (IPP)
-----------------------------------------------------------------

--------------010704020702020902070509
Content-Type: text/plain;
 name="diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diffs"

--- dumptool.c	2003-12-18 12:04:22.000000000 +0100
+++ /afs/ipp/.cs/openafs/openafs-1.2.10/src/tests/dumptool.c	2002-01-20 10:18:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * $Id: dumptool.c,v 1.2 2003/11/18 15:31:25 hwr Exp $
+ * $Id: dumptool.c,v 1.1.2.1 2002/01/20 09:18:07 shadow Exp $
  *
  * dumptool - A tool to manage MR-AFS dump files
  *
@@ -71,7 +71,6 @@
 #include <errno.h>
 #include <termios.h>
 #include <fnmatch.h>
-#include <fcntl.h>
 
 #include <lock.h>
 #include <afs/param.h>
@@ -84,9 +83,6 @@
 #include <afs/vnode.h>
 #include <afs/volume.h>
 
-#ifdef AFS_LINUX24_ENV
-#define _LARGEFILE64_SOURCE 1
-#endif
 #ifdef RESIDENCY
 #include <afs/rsdefs.h>
 #include <afs/remioint.h>
@@ -312,7 +308,6 @@
 	char *p;
 	struct winsize win;
 	FILE *f;
-	int fd;
 
 #ifdef RESIDENCY
 	for (i = 0; i < RS_MAXRESIDENCIES; i++) {
@@ -440,20 +435,11 @@
 	 * Try opening the dump file
 	 */
 
-#ifdef O_LARGEFILE
-	if ((fd = open(argv[optind], O_RDONLY | O_LARGEFILE)) < 0) {
-#else
-	if ((fd = open(argv[optind], O_RDONLY)) < 0) {
-#endif
+	if ((f = fopen(argv[optind], "rb")) == NULL) {
 		fprintf(stderr, "open of dumpfile %s failed: %s\n", argv[optind],
 			strerror(errno));
 		exit(1);
 	}
-	if ((f = fdopen(fd, "rb")) == NULL) {
-		fprintf(stderr, "fdopen of dumpfile %s failed: %s\n", argv[optind],
-			strerror(errno));
-		exit(1);
-	}
 
 	if (ReadDumpHeader(f, &dheader)) {
 		fprintf(stderr, "Failed to read dump header!\n");

--------------010704020702020902070509--