Opened 10 years ago

Last modified 9 years ago

#198 assigned defect

Wrong ext3 block size after restore

Reported by: tboerkel Owned by: bruno
Priority: normal Milestone: 4.0.0
Component: mondo Version: 2.2.4
Severity: normal Keywords:
Cc:

Description

When I restore a backup to a new hard disk and let Mondo do the partioning and formatting, it uses 1024 as ext3 block size, but the original hard disk had 4096.

Change History (4)

comment:1 Changed 10 years ago by bruno

  • Milestone changed from 2.2.5 to 2.2.6
  • Status changed from new to assigned

comment:2 Changed 9 years ago by bruno

  • Milestone changed from 2.2.6 to 3.0.0

A workaround is to do the formating/partioning manually before launching mondorestore and not ask mondo to partition/format your disk.

I'll see on how to handle all those additional parameters which are not taken in account at the moment.

comment:3 Changed 9 years ago by martincpp

Hi,

I have made a quick fix for this problem, here is the diff file:

*** mondo-2.20/mondo/mondorestore/mondo-prep.c	Sat Aug  5 12:00:51 2006
--- mondo-2.20-new/mondo/mondorestore/mondo-prep.c	Wed Dec  3 15:24:03 2008
***************
*** 2528,2539 ****
  	} else if (strcmp(format, "jfs") == 0) {
  		strcpy(program, "mkfs.jfs");
  	} else if (strcmp(format, "ext3") == 0) {
! 		strcpy(program, "mkfs -t ext2 -F -j -q");
  	} else if (strcmp(format, "minix") == 0) {
  		strcpy(program, "mkfs.minix");
  #endif
  	} else if (strcmp(format, "ext2") == 0) {
! 		strcpy(program, "mke2fs -F -q");
  	} else {
  #ifdef __FreeBSD__
  		sprintf(program, "newfs_%s", format);
--- 2528,2539 ----
  	} else if (strcmp(format, "jfs") == 0) {
  		strcpy(program, "mkfs.jfs");
  	} else if (strcmp(format, "ext3") == 0) {
! 		strcpy(program, "mkfs -t ext2 -F -j -q -b 4096");
  	} else if (strcmp(format, "minix") == 0) {
  		strcpy(program, "mkfs.minix");
  #endif
  	} else if (strcmp(format, "ext2") == 0) {
! 		strcpy(program, "mke2fs -F -q -b 4096");
  	} else {
  #ifdef __FreeBSD__
  		sprintf(program, "newfs_%s", format);

This source is extract from the Debian's Etch package.

This code seems to be working after a recompilation.

comment:4 Changed 9 years ago by bruno

I agree that this solves *your* problem, but this alos forces everybody to have 4kB ext3 block size.

The right solution is to query the FS to get that info, store it and use it at restore time to setup correctly the FS. Not difficult, but requires changes to the way mondo is working I'm ready to make in 3.x line not in 2.x line.

Note: See TracTickets for help on using tickets.