[Lustre-discuss] Selective e2fsprogs installation on Ubuntu
Jim Garlick
garlick at llnl.gov
Tue Jun 1 10:54:04 PDT 2010
I've attached our patch to e2fsprogs which turns it into ldiskfsprogs.
We also have a custom spec file for it but since you're using Ubuntu I assume
that's of no use to you.
This is against 1.41.5.sun1
Jim
On Tue, Jun 01, 2010 at 10:19:05AM -0700, Andreas Dilger wrote:
> On 2010-06-01, at 07:25, Ramiro Alba Queipo wrote:
> > On Tue, 2010-06-01 at 02:15 -0600, Andreas Dilger wrote:
> >> On 2010-06-01, at 01:23, Ramiro Alba Queipo wrote:
> >>> I've just compiled the last patched e2fsprogs (1.41.10) package suitable
> >>> for the last lustre version (1.8.3) and I had some booting problems when
> >>> overriding some existing files in original packages (Ubuntu LTS 10.04),
> >>> so I thought it would be better to install only the needed programs from
> >>> patched e2fsprogs:
> >>
> >> It is possible to build the lustre e2fsprogs as "ldiskfsprogs" via configure option.
> >
> > Fine. But, I can not see how to do it. No references to ldiskfsprogs
> > when doing ./configure --help. Only seen at 'e2fsprogs.spec.in, but I do
> > not know how to use. Please, could you give me a minimal guideline. I've
> > worked enough with autoconf/automake so that I can understand it .
>
> Hmm, possibly this is still in a patch at LLNL? Maybe Jim (CC'd) can send you their latest patch.
>
> Also, depending on what the problem actually is, you can build the e2fsprogs package without many of the optional components:
>
> --disable-libuuid do not build private uuid library
> --disable-libblkid do not build private blkid library
> --disable-debugfs disable support of debugfs program
> --disable-e2scan disable support of e2scan program
> --disable-imager disable support of e2image program
> --disable-resizer disable support of e2resize program
> --disable-tls disable use of thread local support
> --disable-uuidd disable building the uuid daemon
>
> Of course, it would also be good to figure out what was actually causing your booting problems, and fix that rather than just working around it.
>
> >>> Clients:
> >>> --------
> >>>
> >>> Only 'lfsck' (compiled with --with-lustre=_LUSTRE_SOURCE_DIR_) is useful
> >>>
> >>> Servers:
> >>> --------
> >>>
> >>> mke2fs -> called by 'mkfs.lustre'
> >>> e2fsck -> not called by lustre but needed to check a failed MDT/OST so
> >>> it can be installed as other name
> >>> tune2fs -> called by tunefs.lustre?/can be installed as a not existing
> >>> program
> >>> dumpe2fs -> useful but not essential?
> >>>
> >>> Please, tell me if I am missing/misunderstanding something?
> >>>
> >>> Cheers
> >>>
> >>> --
> >>> Ramiro Alba
> >>>
> >>> Centre Tecnològic de Tranferència de Calor
> >>> http://*www.*cttc.upc.edu
> >>>
> >>>
> >>> Escola Tècnica Superior d'Enginyeries
> >>> Industrial i Aeronàutica de Terrassa
> >>> Colom 11, E-08222, Terrassa, Barcelona, Spain
> >>> Tel: (+34) 93 739 86 46
> >>>
> >>>
> >>> --
> >>> Aquest missatge ha estat analitzat per MailScanner
> >>> a la cerca de virus i d'altres continguts perillosos,
> >>> i es considera que està net.
> >>>
> >>> _______________________________________________
> >>> Lustre-discuss mailing list
> >>> Lustre-discuss at lists.lustre.org
> >>> http://*lists.lustre.org/mailman/listinfo/lustre-discuss
> >>
> >>
> >> Cheers, Andreas
> >> --
> >> Andreas Dilger
> >> Lustre Technical Lead
> >> Oracle Corporation Canada Inc.
> >>
> >>
> > --
> > Ramiro Alba
> >
> > Centre Tecnològic de Tranferència de Calor
> > http://*www.*cttc.upc.edu
> >
> >
> > Escola Tècnica Superior d'Enginyeries
> > Industrial i Aeronàutica de Terrassa
> > Colom 11, E-08222, Terrassa, Barcelona, Spain
> > Tel: (+34) 93 739 86 46
> >
> >
> > --
> > Aquest missatge ha estat analitzat per MailScanner
> > a la cerca de virus i d'altres continguts perillosos,
> > i es considera que està net.
> >
>
>
> Cheers, Andreas
> --
> Andreas Dilger
> Lustre Technical Lead
> Oracle Corporation Canada Inc.
>
-------------- next part --------------
Rename various things for repackaging as ldiskfsprogs.
Signed-off-by: Jim Garlick <garlick at llnl.gov>
Index: e2fsprogs+chaos4/misc/mke2fs.c
===================================================================
--- e2fsprogs+chaos4.orig/misc/mke2fs.c
+++ e2fsprogs+chaos4/misc/mke2fs.c
@@ -1163,7 +1163,8 @@ static void PRS(int argc, char *argv[])
/* If called as mkfs.ext3, create a journal inode */
if (!strcmp(program_name, "mkfs.ext3") ||
- !strcmp(program_name, "mke3fs"))
+ !strcmp(program_name, "mke3fs") ||
+ !strcmp(program_name, "mkfs.ldiskfs"))
journal_size = -1;
}
Index: e2fsprogs+chaos4/misc/tune2fs.c
===================================================================
--- e2fsprogs+chaos4.orig/misc/tune2fs.c
+++ e2fsprogs+chaos4/misc/tune2fs.c
@@ -59,7 +59,7 @@ extern int optind;
#include "../version.h"
#include "nls-enable.h"
-const char *program_name = "tune2fs";
+const char *program_name = "tune.ldiskfs";
char *device_name;
char *new_label, *new_last_mounted, *new_UUID;
char *io_options;
@@ -618,7 +618,7 @@ err:
static void parse_e2label_options(int argc, char ** argv)
{
if ((argc < 2) || (argc > 3)) {
- fputs(_("Usage: e2label device [newlabel]\n"), stderr);
+ fputs(_("Usage: label.ldiskfs device [newlabel]\n"), stderr);
exit(1);
}
io_options = strchr(argv[1], '?');
@@ -626,7 +626,7 @@ static void parse_e2label_options(int ar
*io_options++ = 0;
device_name = blkid_get_devname(NULL, argv[1], NULL);
if (!device_name) {
- com_err("e2label", 0, _("Unable to resolve '%s'"),
+ com_err("label.ldiskfs", 0, _("Unable to resolve '%s'"),
argv[1]);
exit(1);
}
@@ -678,7 +678,7 @@ static void parse_tune2fs_options(int ar
open_flag = 0;
- printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ printf("tune.ldiskfs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
while ((c = getopt(argc, argv, "c:e:fg:i:jlm:o:p:r:s:u:C:E:I:J:L:M:O:T:U:")) != EOF)
switch (c) {
case 'c':
@@ -931,7 +931,7 @@ static void parse_tune2fs_options(int ar
*io_options++ = 0;
device_name = blkid_get_devname(NULL, argv[optind], NULL);
if (!device_name) {
- com_err("tune2fs", 0, _("Unable to resolve '%s'"),
+ com_err("tune.ldiskfs", 0, _("Unable to resolve '%s'"),
argv[optind]);
exit(1);
}
@@ -1587,7 +1587,7 @@ static int tune2fs_setup_tdb(const char
set_undo_io_backing_manager(*io_ptr);
*io_ptr = undo_io_manager;
set_undo_io_backup_file(tdb_file);
- printf(_("To undo the tune2fs operation please run "
+ printf(_("To undo the tune.ldiskfs operation please run "
"the command\n e2undo %s %s\n\n"),
tdb_file, name);
free(tdb_file);
@@ -1615,10 +1615,12 @@ int main(int argc, char **argv)
add_error_table(&et_ext2_error_table);
#ifdef CONFIG_BUILD_FINDFS
- if (strcmp(get_progname(argv[0]), "findfs") == 0)
+ if (strcmp(get_progname(argv[0]), "findfs") == 0
+ || strcmp(get_progname(argv[0]), "findfs.ldiskfs") == 0)
do_findfs(argc, argv);
#endif
- if (strcmp(get_progname(argv[0]), "e2label") == 0)
+ if (strcmp(get_progname(argv[0]), "e2label") == 0
+ || strcmp(get_progname(argv[0]), "label.ldiskfs") == 0)
parse_e2label_options(argc, argv);
else
parse_tune2fs_options(argc, argv);
@@ -1643,8 +1645,8 @@ retry_open:
device_name);
if (retval == EXT2_ET_MMP_FSCK_ON)
fprintf(stderr,
- _("If you are sure e2fsck is not running then "
- "use 'tune2fs -f -E clear_mmp {device}'\n"));
+ _("If you are sure fsck.ldiskfs is not running then "
+ "use 'tune.ldiskfs -f -E clear_mmp {device}'\n"));
else if (retval != EXT2_ET_MMP_FAILED)
fprintf(stderr,
_("Couldn't find valid filesystem superblock.\n"));
Index: e2fsprogs+chaos4/e2fsck/unix.c
===================================================================
--- e2fsprogs+chaos4.orig/e2fsck/unix.c
+++ e2fsprogs+chaos4/e2fsck/unix.c
@@ -230,7 +230,7 @@ static void check_mount(e2fsck_t ctx)
if (!ctx->interactive)
fatal_error(ctx, _("Cannot continue, aborting.\n\n"));
printf(_("\n\n\007\007\007\007WARNING!!! "
- "Running e2fsck on a mounted filesystem may cause\n"
+ "Running fsck.ldiskfs on a mounted filesystem may cause\n"
"SEVERE filesystem damage.\007\007\007\n\n"));
cont = ask_yn(_("Do you really want to continue"), -1);
if (!cont) {
@@ -703,7 +703,7 @@ static void parse_extended_opts(e2fsck_t
static void syntax_err_report(const char *filename, long err, int line_num)
{
fprintf(stderr,
- _("Syntax error in e2fsck config file (%s, line #%d)\n\t%s\n"),
+ _("Syntax error in fsck.ldiskfs config file (%s, line #%d)\n\t%s\n"),
filename, line_num, error_message(err));
exit(FSCK_ERROR);
}
@@ -821,7 +821,7 @@ static errcode_t PRS(int argc, char *arg
ctx->options |= E2F_OPT_TIME;
#else
fprintf(stderr, _("The -t option is not "
- "supported on this version of e2fsck.\n"));
+ "supported on this version of fsck.ldiskfs.\n"));
#endif
break;
case 'c':
@@ -1029,7 +1029,7 @@ int main (int argc, char *argv[])
retval = PRS(argc, argv, &ctx);
if (retval) {
- com_err("e2fsck", retval,
+ com_err("fsck.ldiskfs", retval,
_("while trying to initialize program"));
exit(FSCK_ERROR);
}
@@ -1040,7 +1040,7 @@ int main (int argc, char *argv[])
#endif
if (!(ctx->options & E2F_OPT_PREEN) || show_version_only)
- fprintf(stderr, "e2fsck %s (%s)\n", my_ver_string,
+ fprintf(stderr, "fsck.ldiskfs %s (%s)\n", my_ver_string,
my_ver_date);
if (show_version_only) {
@@ -1134,7 +1134,7 @@ restart:
ctx->filesystem_name);
if (retval == EXT2_ET_REV_TOO_HIGH) {
printf(_("The filesystem revision is apparently "
- "too high for this version of e2fsck.\n"
+ "too high for this version of fsck.ldiskfs.\n"
"(Or the filesystem superblock "
"is corrupt)\n\n"));
fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
@@ -1165,9 +1165,9 @@ restart:
dump_mmp_msg(fs->mmp_buf, NULL);
} else if (retval == EXT2_ET_MMP_FSCK_ON) {
dump_mmp_msg(fs->mmp_buf,
- _("If you are sure that e2fsck "
+ _("If you are sure that fsck.ldiskfs "
"is not running then use "
- "'tune2fs -f -E clear_mmp {device}'\n"));
+ "'tune.ldiskfs -f -E clear_mmp {device}'\n"));
}
else
fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
@@ -1229,7 +1229,7 @@ restart:
_("while trying to open %s"),
ctx->filesystem_name);
get_newer:
- fatal_error(ctx, _("Get a newer version of e2fsck!"));
+ fatal_error(ctx, _("Get a newer version of fsck.ldiskfs!"));
}
/*
@@ -1328,7 +1328,7 @@ print_unsupp_features:
#ifndef ENABLE_HTREE
if (sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) {
com_err(ctx->program_name, 0,
- _("E2fsck not compiled with HTREE support,\n\t"
+ _("Fsck.ldiskfs not compiled with HTREE support,\n\t"
"but filesystem %s has HTREE directories.\n"),
ctx->device_name);
goto get_newer;
@@ -1491,7 +1491,7 @@ no_journal:
goto restart;
}
if (run_result & E2F_FLAG_CANCEL) {
- printf(_("%s: e2fsck canceled.\n"), ctx->device_name ?
+ printf(_("%s: fsck.ldiskfs canceled.\n"), ctx->device_name ?
ctx->device_name : ctx->filesystem_name);
exit_value |= FSCK_CANCELED;
}
More information about the lustre-discuss
mailing list