Opened 17 years ago
Last modified 16 years ago
#198 assigned defect
Wrong ext3 block size after restore
Reported by: | tboerkel | Owned by: | Bruno Cornec |
---|---|---|---|
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 by , 17 years ago
Milestone: | 2.2.5 → 2.2.6 |
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
Milestone: | 2.2.6 → 3.0.0 |
---|
comment:3 by , 16 years ago
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 by , 16 years ago
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.
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.