cluster: RHEL58 - rgmanager: Fix for deadlock
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=07fbe0eb3b1...
Commit: 07fbe0eb3b1593270b117bbefa5ddf415952c643
Parent: 9a98cfc8e11273ca14135245132d9adc90dbd754
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Mon Oct 1 11:28:35 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Nov 16 12:55:38 2012 -0500
rgmanager: Fix for deadlock
This patch fixes a deadlock in rgmanager that could occur when a node
starts rgmanager while a service is recovering.
Resolves: rhbz#834459
Acked-by: Lon Hohberger <lhh(a)redhat.com>
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/rg_state.c | 1 +
rgmanager/src/daemons/rg_thread.c | 17 ++++++++++++++++-
rgmanager/src/daemons/service_op.c | 1 +
3 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index a8b1e36..525543d 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2009,6 +2009,7 @@ retry:
/* Deliberate */
case RG_EDEPEND:
case RG_EFAIL:
+ case RG_EDEADLCK:
/* Uh oh - we failed to relocate to this node.
ensure that we tell the next node to start it from
the 'recovering' state. */
diff --git a/rgmanager/src/daemons/rg_thread.c b/rgmanager/src/daemons/rg_thread.c
index 769ca1e..60bf0c6 100644
--- a/rgmanager/src/daemons/rg_thread.c
+++ b/rgmanager/src/daemons/rg_thread.c
@@ -23,6 +23,7 @@
#include <rg_queue.h>
#include <assert.h>
#include <members.h>
+#include <clulog.h>
/**
* Resource thread list entry.
@@ -749,13 +750,27 @@ rt_enqueue_request(const char *resgroupname, int request,
msg_free_ctx(response_ctx);
break;
}
- fprintf(stderr, "Failed to queue request: Would block\n");
+ pthread_mutex_unlock(resgroup->rt_queue_mutex);
+ pthread_mutex_unlock(&reslist_mutex);
+ clulog(LOG_DEBUG, "Failed to queue request: Would block\n");
/* EWOULDBLOCK */
+ return -1;
+ }
+
+ if (resgroup->rt_request == RG_START &&
+ (request == RG_START_REMOTE || request == RG_START_RECOVER)) {
+ send_ret(response_ctx, resgroup->rt_name, RG_EDEADLCK,
+ request, 0);
+ msg_free_ctx(response_ctx);
pthread_mutex_unlock(resgroup->rt_queue_mutex);
pthread_mutex_unlock(&reslist_mutex);
+ clulog(LOG_DEBUG,
+ "Failed to queue %d request for %s: Would block\n",
+ request, resgroupname);
return -1;
}
+
ret = rq_queue_request(resgroup->rt_queue, resgroup->rt_name,
request, 0, 0, response_ctx, 0, target,
arg0, arg1);
diff --git a/rgmanager/src/daemons/service_op.c b/rgmanager/src/daemons/service_op.c
index 2ea59f9..bf0e1fc 100644
--- a/rgmanager/src/daemons/service_op.c
+++ b/rgmanager/src/daemons/service_op.c
@@ -82,6 +82,7 @@ service_op_start(char *svcName,
++dep;
continue;
case RG_EFAIL:
+ case RG_EDEADLCK:
++fail;
continue;
case RG_EABORT:
11 years, 5 months
gfs2-utils: master - mkfs.gfs2: Improve strings for translation
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=fb0957b0...
Commit: fb0957b0bb4c5f821e2bac5c3d364c9e46ed6796
Parent: 7ca1dc87deda9682005711f33eb95b5e4050a41d
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Nov 16 12:19:50 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Fri Nov 16 12:19:50 2012 +0000
mkfs.gfs2: Improve strings for translation
Separate strings from formatting where possible, e.g. in usage(), and
improve strings for reuse and to simplify translations.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/mkfs/main_grow.c | 67 ++++---
gfs2/mkfs/main_jadd.c | 41 +++--
gfs2/mkfs/main_mkfs.c | 127 +++++++------
po/gfs2-utils.pot | 475 ++++++++++++++++++++++++++++++-------------------
4 files changed, 429 insertions(+), 281 deletions(-)
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 7bcfce2..8c8f23b 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -61,17 +61,28 @@ static int discard_blocks(int fd, uint64_t start, uint64_t len)
static void usage(void)
{
- fprintf(stdout,
- _("Usage:\n"
- "\n"
- "gfs2_grow [options] /path/to/filesystem\n"
- "\n"
- "Options:\n"
- " -h Usage information\n"
- " -q Quiet, reduce verbosity\n"
- " -T Test, do everything except update FS\n"
- " -V Version information\n"
- " -v Verbose, increase verbosity\n"));
+ int i;
+ const char *option, *param, *desc;
+ const char *options[] = {
+ "-h", NULL, _("Display this usage information"),
+ "-q", NULL, _("Quiet, reduce verbosity"),
+ "-T", NULL, _("Do everything except update FS"),
+ "-V", NULL, _("Display version information"),
+ "-v", NULL, _("Increase verbosity"),
+ NULL, NULL, NULL /* Must be kept at the end */
+ };
+
+ printf("%s\n", _("Usage:"));
+ printf(" gfs2_grow [%s] <%s>\n\n", _("options"), _("device"));
+ printf(_("Expands a GFS2 file system after the device upon which the file system resides has been expanded"));
+ printf("\n\n%s\n", _("Options:"));
+
+ for (i = 0; options[i] != NULL; i += 3) {
+ option = options[i];
+ param = options[i+1];
+ desc = options[i+2];
+ printf("%3s %-15s %s\n", option, param ? param : "", desc);
+ }
}
static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
@@ -85,7 +96,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
override_device_size <<= 20;
break;
case 'V':
- printf("%s %s (built %s %s)\n", argv[0],
+ printf(_("%s %s (built %s %s)\n"), argv[0],
VERSION, __DATE__, __TIME__);
printf(REDHAT_COPYRIGHT "\n");
exit(0);
@@ -96,7 +107,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
decrease_verbosity();
break;
case 'T':
- printf( _("(Test mode--File system will not "
+ printf( _("(Test mode - file system will not "
"be changed)\n"));
test = 1;
break;
@@ -109,7 +120,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
fprintf(stderr, _("Please use '-h' for help.\n"));
exit(EXIT_FAILURE);
default:
- fprintf(stderr, _("Invalid option %c\n"), opt);
+ fprintf(stderr, _("Invalid option '%c'\n"), opt);
exit(EXIT_FAILURE);
break;
}
@@ -234,8 +245,7 @@ static void fix_rindex(struct gfs2_sbd *sdp, int rindex_fd, int old_rg_count)
lseek(rindex_fd, 0, SEEK_END);
count = write(rindex_fd, buf, sizeof(struct gfs2_rindex));
if (count != sizeof(struct gfs2_rindex)) {
- log_crit(_("Error writing first new rindex entry;"
- "aborted.\n"));
+ log_crit(_("Error writing first new rindex entry; aborted.\n"));
if (count > 0)
goto trunc;
else
@@ -244,8 +254,7 @@ static void fix_rindex(struct gfs2_sbd *sdp, int rindex_fd, int old_rg_count)
count = write(rindex_fd, buf + sizeof(struct gfs2_rindex),
writelen - sizeof(struct gfs2_rindex));
if (count != writelen - sizeof(struct gfs2_rindex)) {
- log_crit(_("Error writing new rindex entries;"
- "aborted.\n"));
+ log_crit(_("Error writing new rindex entries; aborted.\n"));
if (count > 0)
goto trunc;
else
@@ -260,7 +269,7 @@ out:
return;
trunc:
count = (count / sizeof(struct gfs2_rindex)) + old_rg_count;
- log_crit(_("truncating rindex to %ld\n"),
+ log_crit(_("truncating rindex to %ld entries\n"),
(off_t)count * sizeof(struct gfs2_rindex));
ftruncate(rindex_fd, (off_t)count * sizeof(struct gfs2_rindex));
free(buf);
@@ -272,15 +281,15 @@ trunc:
*/
static void print_info(struct gfs2_sbd *sdp)
{
- log_notice("FS: Mount Point: %s\n", sdp->path_name);
- log_notice("FS: Device: %s\n", sdp->device_name);
- log_notice("FS: Size: %llu (0x%llx)\n",
+ log_notice("FS: %-22s%s\n", _("Mount point:"), sdp->path_name);
+ log_notice("FS: %-22s%s\n", _("Device:"), sdp->device_name);
+ log_notice("FS: %-22s%llu (0x%llx)\n", _("Size:"),
(unsigned long long)fssize, (unsigned long long)fssize);
- log_notice("FS: RG size: %u (0x%x)\n", rgsize, rgsize);
- log_notice("DEV: Size: %llu (0x%llx)\n",
+ log_notice("FS: %-22s%u (0x%x)\n", _("Resource group size:"), rgsize, rgsize);
+ log_notice("DEV: %-22s%llu (0x%llx)\n", _("Length:"),
(unsigned long long)sdp->device.length,
(unsigned long long)sdp->device.length);
- log_notice("The file system grew by %lluMB.\n",
+ log_notice(_("The file system grew by %lluMB.\n"),
(unsigned long long)fsgrowth / MB);
}
@@ -359,13 +368,13 @@ main_grow(int argc, char *argv[])
exit(EXIT_FAILURE);
}
if (read_sb(sdp) < 0)
- die( _("gfs: Error reading superblock.\n"));
+ die( _("Error reading superblock.\n"));
if (sdp->gfs1) {
die( _("cannot grow gfs1 filesystem\n"));
}
fix_device_geometry(sdp);
if (mount_gfs2_meta(sdp)) {
- perror("GFS2 metafs");
+ perror(_("GFS2 metafs mount failed"));
exit(EXIT_FAILURE);
}
@@ -373,12 +382,12 @@ main_grow(int argc, char *argv[])
rindex_fd = open(rindex_name, (test ? O_RDONLY : O_RDWR) | O_CLOEXEC);
if (rindex_fd < 0) {
cleanup_metafs(sdp);
- die( _("GFS2 rindex not found. Please run gfs2_fsck.\n"));
+ die( _("GFS2 rindex not found. Please run fsck.gfs2.\n"));
}
/* Get master dinode */
sdp->master_dir = lgfs2_inode_read(sdp, sdp->sd_sb.sb_master_dir.no_addr);
if (sdp->master_dir == NULL) {
- perror("Could not read master");
+ perror(_("Could not read master directory"));
exit(EXIT_FAILURE);
}
gfs2_lookupi(sdp->master_dir, "rindex", 6, &sdp->md.riinode);
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
index e060cc2..da4a401 100644
--- a/gfs2/mkfs/main_jadd.c
+++ b/gfs2/mkfs/main_jadd.c
@@ -59,12 +59,12 @@ rename2system(struct gfs2_sbd *sdp, const char *new_dir, const char *new_name)
error = snprintf(oldpath, PATH_MAX, "%s/new_inode",
sdp->metafs_path);
if (error >= PATH_MAX)
- die( _("rename2system (1)\n"));
+ die("rename2system (1)\n");
error = snprintf(newpath, PATH_MAX, "%s/%s/%s",
sdp->metafs_path, new_dir, new_name);
if (error >= PATH_MAX)
- die( _("rename2system (2)\n"));
+ die("rename2system (2)\n");
return rename(oldpath, newpath);
}
@@ -76,16 +76,30 @@ rename2system(struct gfs2_sbd *sdp, const char *new_dir, const char *new_name)
static void print_usage(const char *prog_name)
{
- printf( _("Usage:\n\n"
- "%s [options] /path/to/filesystem\n\n"
- "Options:\n\n"
- " -c <MB> Size of quota change file\n"
- " -D Enable debugging code\n"
- " -h Print this help, then exit\n"
- " -J <MB> Size of journals\n"
- " -j <num> Number of journals\n"
- " -q Don't print anything\n"
- " -V Print program version information, then exit\n"), prog_name);
+ int i;
+ const char *option, *param, *desc;
+ const char *options[] = {
+ "-c", "<size>", _("Size of quota change file, in megabytes"),
+ "-D", NULL, _("Enable debugging code"),
+ "-h", NULL, _("Display this help, then exit"),
+ "-J", "<size>", _("Size of journals, in megabytes"),
+ "-j", "<number>", _("Number of journals"),
+ "-q", NULL, _("Don't print anything"),
+ "-V", NULL, _("Display version information, then exit"),
+ NULL, NULL, NULL /* Must be kept at the end */
+ };
+
+ printf("%s\n", _("Usage:"));
+ printf("%s [%s] <%s>\n\n", prog_name, _("options"), _("device"));
+ printf(_("Adds journals to a GFS2 file system."));
+ printf("\n\n%s\n", _("Options:"));
+
+ for (i = 0; options[i] != NULL; i += 3) {
+ option = options[i];
+ param = options[i+1];
+ desc = options[i+2];
+ printf("%3s %-15s %s\n", option, param ? param : "", desc);
+ }
}
/**
@@ -386,8 +400,7 @@ find_current_journals(struct gfs2_sbd *sdp)
close:
closedir(dirp);
if (existing_journals <= 0) {
- die( _("There are no journals for this "
- "gfs2 fs! Did you mkfs.gfs2 correctly?\n"));
+ die( _("No journals found. Did you run mkfs.gfs2 correctly?\n"));
}
sdp->orig_journals = existing_journals;
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 3bbb5b4..b83ffec 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -49,22 +49,37 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...)
static void
print_usage(const char *prog_name)
{
- printf( _("Usage:\n\n"
- "%s [options] <device> [ block-count ]\n\n"
- "Options:\n\n"
- " -b <bytes> Filesystem block size\n"
- " -c <MB> Size of quota change file\n"
- " -D Enable debugging code\n"
- " -h Print this help, then exit\n"
- " -J <MB> Size of journals\n"
- " -j <num> Number of journals\n"
- " -K Don't try to discard unused blocks\n"
- " -O Don't ask for confirmation\n"
- " -p <name> Name of the locking protocol\n"
- " -q Don't print anything\n"
- " -r <MB> Resource Group Size\n"
- " -t <name> Name of the lock table\n"
- " -V Print program version information, then exit\n"), prog_name);
+ int i;
+ const char *option, *param, *desc;
+ const char *options[] = {
+ "-b", _("<size>"), _("File system block size, in bytes"),
+ "-c", _("<size>"), _("Size of quota change file, in megabytes"),
+ "-D", NULL, _("Enable debugging code"),
+ "-h", NULL, _("Display this help, then exit"),
+ "-J", _("<size>"), _("Size of journals, in megabytes"),
+ "-j", _("<number>"), _("Number of journals"),
+ "-K", NULL, _("Don't try to discard unused blocks"),
+ "-O", NULL, _("Don't ask for confirmation"),
+ "-p", _("<name>"), _("Name of the locking protocol"),
+ "-q", NULL, _("Don't print anything"),
+ "-r", _("<size>"), _("Size of resource groups, in megabytes"),
+ "-t", _("<name>"), _("Name of the lock table"),
+ "-V", NULL, _("Display program version information, then exit"),
+ NULL, NULL, NULL /* Must be kept at the end */
+ };
+
+ printf("%s\n", _("Usage:"));
+ printf("%s [%s] <%s> [%s]\n\n", prog_name, _("options"), _("device"), _("size"));
+ printf(_("Create a gfs2 file system on a device. If a size, in blocks, is not "
+ "specified, the whole device will be used."));
+ printf("\n\n%s\n", _("Options:"));
+
+ for (i = 0; options[i] != NULL; i += 3) {
+ option = options[i];
+ param = options[i+1];
+ desc = options[i+2];
+ printf("%3s %-15s %s\n", option, param ? param : "", desc);
+ }
}
#ifndef BLKDISCARD
@@ -83,7 +98,7 @@ static int discard_blocks(struct gfs2_sbd *sdp)
(unsigned long long)range[1]);
if (ioctl(sdp->device_fd, BLKDISCARD, &range) < 0) {
if (sdp->debug)
- printf("error = %d\n", errno);
+ printf("%s = %d\n", _("error"), errno);
return errno;
}
if (sdp->debug)
@@ -167,7 +182,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
break;
case 'V':
- printf("gfs2_mkfs %s (built %s %s)\n", VERSION,
+ printf("mkfs.gfs2 %s (built %s %s)\n", VERSION,
__DATE__, __TIME__);
printf(REDHAT_COPYRIGHT "\n");
exit(EXIT_SUCCESS);
@@ -227,8 +242,8 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
printf(" override = %d\n", sdp->override);
printf(" proto = %s\n", sdp->lockproto);
printf(" quiet = %d\n", sdp->quiet);
- if (sdp->rgsize==-1)
- printf( _(" rgsize = optimize for best performance\n"));
+ if (sdp->rgsize == (unsigned int)-1)
+ printf(" rgsize = %s\n", _("Optimize for best performance"));
else
printf(" rgsize = %u\n", sdp->rgsize);
printf(" table = %s\n", sdp->locktable);
@@ -249,6 +264,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
static void test_locking(char *lockproto, char *locktable)
{
char *c;
+ const char *errprefix = _("Invalid lock table:");
if (strcmp(lockproto, "lock_nolock") == 0) {
/* Nolock is always ok. */
@@ -260,31 +276,27 @@ static void test_locking(char *lockproto, char *locktable)
}
for (c = locktable; *c; c++) {
if (!isalnum(*c) && (*c != '-') && (*c != '_') && (*c != ':'))
- die( _("locktable error: invalid character '%c'\n"), *c);
+ die("%s %s '%c'\n", errprefix, _("invalid character"), *c);
}
c = strstr(locktable, ":");
if (!c)
- die( _("locktable error: missing colon in the locktable\n"));
+ die("%s %s\n", errprefix, _("missing colon"));
if (c == locktable)
- die( _("locktable error: missing cluster name\n"));
+ die("%s %s\n", errprefix, _("cluster name is missing"));
if (c - locktable > 16)
- die( _("locktable error: cluster name too long\n"));
+ die("%s %s\n", errprefix, _("cluster name is too long"));
c++;
- if (!c)
- die( _("locktable error: missing filesystem name\n"));
-
if (strstr(c, ":"))
- die( _("locktable error: more than one colon present\n"));
-
+ die("%s %s\n", errprefix, _("contains more than one colon"));
if (!strlen(c))
- die( _("locktable error: missing filesystem name\n"));
+ die("%s %s\n", errprefix, _("file system name is missing"));
if (strlen(c) > 16)
- die( _("locktable error: filesystem name too long\n"));
+ die("%s %s\n", errprefix, _("file system name too long"));
} else {
- die( _("lockproto error: %s unknown\n"), lockproto);
+ die( _("Invalid lock protocol: %s\n"), lockproto);
}
}
@@ -490,30 +502,27 @@ print_results(struct gfs2_sbd *sdp, uint64_t real_device_size,
return;
if (sdp->expert)
- printf( _("Expert mode: on\n"));
-
- printf( _("Device: %s\n"), sdp->device_name);
-
- printf( _("Blocksize: %u\n"), sdp->bsize);
- printf( _("Device Size %.2f GB (%llu blocks)\n"),
- real_device_size / ((float)(1 << 30)),
- (unsigned long long)real_device_size / sdp->bsize);
- printf( _("Filesystem Size: %.2f GB (%llu blocks)\n"),
- sdp->fssize / ((float)(1 << 30)) * sdp->bsize,
- (unsigned long long)sdp->fssize);
- printf( _("Journals: %u\n"), sdp->md.journals);
- printf( _("Resource Groups: %llu\n"),
- (unsigned long long)sdp->rgrps);
- printf( _("Locking Protocol: \"%s\"\n"), sdp->lockproto);
- printf( _("Lock Table: \"%s\"\n"), sdp->locktable);
+ printf("%-27s%s\n", _("Expert mode:"), _("on"));
+
+ printf("%-27s%s\n", _("Device:"), sdp->device_name);
+
+ printf("%-27s%u\n", _("Block size:"), sdp->bsize);
+ printf("%-27s%.2f %s (%llu %s)\n", _("Device size:"),
+ real_device_size / ((float)(1 << 30)), _("GB"),
+ (unsigned long long)real_device_size / sdp->bsize, _("blocks"));
+ printf("%-27s%.2f %s (%llu %s)\n", _("Filesystem size:"),
+ sdp->fssize / ((float)(1 << 30)) * sdp->bsize, _("GB"),
+ (unsigned long long)sdp->fssize, _("blocks"));
+ printf("%-27s%u\n", _("Journals:"), sdp->md.journals);
+ printf("%-27s%llu\n", _("Resource groups:"), (unsigned long long)sdp->rgrps);
+ printf("%-27s\"%s\"\n", _("Locking protocol:"), sdp->lockproto);
+ printf("%-27s\"%s\"\n", _("Lock table:"), sdp->locktable);
if (sdp->debug) {
- printf("\n");
- printf( _("Writes: %u\n"), sdp->writes);
+ printf("\n%-27s%u\n", _("Writes:"), sdp->writes);
}
- printf( _("UUID: %s\n"), str_uuid(uuid));
- printf("\n");
+ printf("%-27s%s\n\n", _("UUID:"), str_uuid(uuid));
}
@@ -527,7 +536,7 @@ static int is_symlink(char *path, char **abspath)
struct stat lnkstat;
if (lstat(path, &lnkstat) == -1) {
- perror("Failed to lstat the device");
+ perror(_("Failed to lstat the device"));
exit(EXIT_FAILURE);
}
if (!S_ISLNK(lnkstat.st_mode)) {
@@ -617,7 +626,7 @@ void main_mkfs(int argc, char *argv[])
sdp->bsize = GFS2_DEFAULT_BSIZE;
if (sdp->debug)
- printf("\nUsing block size: %u\n", sdp->bsize);
+ printf("\n%s %u\n", _("Using block size:"), sdp->bsize);
}
verify_bsize(sdp);
@@ -631,11 +640,11 @@ void main_mkfs(int argc, char *argv[])
sdp->orig_fssize *= sdp->bsize;
sdp->orig_fssize >>= GFS2_BASIC_BLOCK_SHIFT;
if (sdp->orig_fssize > sdp->device.length) {
- fprintf(stderr, _("%s: Specified block count is bigger "
- "than the actual device.\n"), argv[0]);
- die( _("Device Size is %.2f GB (%llu blocks)\n"),
- sdp->dinfo.size / ((float)(1 << 30)),
- (unsigned long long)sdp->dinfo.size / sdp->bsize);
+ fprintf(stderr, "%s:%s\n", argv[0],
+ _("Specified size is bigger than the device."));
+ die("%s %.2f %s (%llu %s)\n", _("Device size:"),
+ sdp->dinfo.size / ((float)(1 << 30)), _("GB"),
+ (unsigned long long)sdp->dinfo.size / sdp->bsize, _("blocks"));
}
sdp->device.length = sdp->orig_fssize;
}
diff --git a/po/gfs2-utils.pot b/po/gfs2-utils.pot
index 44456dc..1b082a2 100644
--- a/po/gfs2-utils.pot
+++ b/po/gfs2-utils.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gfs2-utils master\n"
"Report-Msgid-Bugs-To: linux-cluster(a)redhat.com\n"
-"POT-Creation-Date: 2012-11-14 13:58+0000\n"
+"POT-Creation-Date: 2012-11-15 18:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
@@ -17,288 +17,366 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gfs2/mkfs/main_mkfs.c:52
+#: gfs2/mkfs/main_mkfs.c:55 gfs2/mkfs/main_mkfs.c:56 gfs2/mkfs/main_mkfs.c:59
+#: gfs2/mkfs/main_mkfs.c:65
+msgid "<size>"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:55
+msgid "File system block size, in bytes"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:56 gfs2/mkfs/main_jadd.c:82
+msgid "Size of quota change file, in megabytes"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:57 gfs2/mkfs/main_jadd.c:83
+msgid "Enable debugging code"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:58 gfs2/mkfs/main_jadd.c:84
+msgid "Display this help, then exit"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:59 gfs2/mkfs/main_jadd.c:85
+msgid "Size of journals, in megabytes"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:60
+msgid "<number>"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:60 gfs2/mkfs/main_jadd.c:86
+msgid "Number of journals"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:61
+msgid "Don't try to discard unused blocks"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:62
+msgid "Don't ask for confirmation"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:63 gfs2/mkfs/main_mkfs.c:66
+msgid "<name>"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:63
+msgid "Name of the locking protocol"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:64 gfs2/mkfs/main_jadd.c:87
+msgid "Don't print anything"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:65
+msgid "Size of resource groups, in megabytes"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:66
+msgid "Name of the lock table"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:67
+msgid "Display program version information, then exit"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:71 gfs2/mkfs/main_grow.c:75 gfs2/mkfs/main_jadd.c:92
+msgid "Usage:"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:72 gfs2/mkfs/main_grow.c:76 gfs2/mkfs/main_jadd.c:93
+msgid "options"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:72 gfs2/mkfs/main_grow.c:76 gfs2/mkfs/main_jadd.c:93
+msgid "device"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:72
+msgid "size"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:73
#, c-format
msgid ""
-"Usage:\n"
-"\n"
-"%s [options] <device> [ block-count ]\n"
-"\n"
-"Options:\n"
-"\n"
-" -b <bytes> Filesystem block size\n"
-" -c <MB> Size of quota change file\n"
-" -D Enable debugging code\n"
-" -h Print this help, then exit\n"
-" -J <MB> Size of journals\n"
-" -j <num> Number of journals\n"
-" -K Don't try to discard unused blocks\n"
-" -O Don't ask for confirmation\n"
-" -p <name> Name of the locking protocol\n"
-" -q Don't print anything\n"
-" -r <MB> Resource Group Size\n"
-" -t <name> Name of the lock table\n"
-" -V Print program version information, then exit\n"
-msgstr ""
-
-#: gfs2/mkfs/main_mkfs.c:81
+"Create a gfs2 file system on a device. If a size, in blocks, is not "
+"specified, the whole device will be used."
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:75 gfs2/mkfs/main_grow.c:78 gfs2/mkfs/main_jadd.c:95
+msgid "Options:"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:96
#, c-format
msgid "Issuing discard ioctl: range: %llu - %llu..."
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:90
+#: gfs2/mkfs/main_mkfs.c:101
+msgid "error"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:105
#, c-format
msgid "Successful.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:150
+#: gfs2/mkfs/main_mkfs.c:165
#, c-format
msgid "lock protocol name %s is too long\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:165
+#: gfs2/mkfs/main_mkfs.c:180
#, c-format
msgid "lock table name %s is too long\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:182 gfs2/mkfs/main_grow.c:109
-#: gfs2/mkfs/main_jadd.c:138 gfs2/fsck/main.c:103 gfs2/fsck/main.c:114
+#: gfs2/mkfs/main_mkfs.c:197 gfs2/mkfs/main_grow.c:120
+#: gfs2/mkfs/main_jadd.c:152 gfs2/fsck/main.c:103 gfs2/fsck/main.c:114
#, c-format
msgid "Please use '-h' for help.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:199
+#: gfs2/mkfs/main_mkfs.c:214
msgid "More than one device specified (try -h for help)\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:203 gfs2/mkfs/main_jadd.c:145 gfs2/tune/main.c:92
+#: gfs2/mkfs/main_mkfs.c:218 gfs2/mkfs/main_jadd.c:159 gfs2/tune/main.c:92
#, c-format
msgid "Invalid option: %c\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:212 gfs2/convert/gfs2_convert.c:1722
+#: gfs2/mkfs/main_mkfs.c:227 gfs2/convert/gfs2_convert.c:1722
#: gfs2/convert/gfs2_convert.c:1726
#, c-format
msgid "No device specified. Please use '-h' for help\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:218 gfs2/mkfs/main_jadd.c:157
+#: gfs2/mkfs/main_mkfs.c:233 gfs2/mkfs/main_jadd.c:171
#, c-format
msgid "Unrecognized argument: %s\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:221 gfs2/mkfs/main_jadd.c:160
+#: gfs2/mkfs/main_mkfs.c:236 gfs2/mkfs/main_jadd.c:174
#, c-format
msgid "Command Line Arguments:\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:231
-#, c-format
-msgid " rgsize = optimize for best performance\n"
+#: gfs2/mkfs/main_mkfs.c:246
+msgid "Optimize for best performance"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:267
+msgid "Invalid lock table:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:258
+#: gfs2/mkfs/main_mkfs.c:274
#, c-format
msgid "No lock table specified.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:263
-#, c-format
-msgid "locktable error: invalid character '%c'\n"
+#: gfs2/mkfs/main_mkfs.c:279
+msgid "invalid character"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:268
-msgid "locktable error: missing colon in the locktable\n"
+#: gfs2/mkfs/main_mkfs.c:284
+msgid "missing colon"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:271
-msgid "locktable error: missing cluster name\n"
+#: gfs2/mkfs/main_mkfs.c:287
+msgid "cluster name is missing"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:273
-msgid "locktable error: cluster name too long\n"
+#: gfs2/mkfs/main_mkfs.c:289
+msgid "cluster name is too long"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:277 gfs2/mkfs/main_mkfs.c:283
-msgid "locktable error: missing filesystem name\n"
+#: gfs2/mkfs/main_mkfs.c:293
+msgid "contains more than one colon"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:280 gfs2/tune/super.c:205
-#, c-format
-msgid "locktable error: more than one colon present\n"
+#: gfs2/mkfs/main_mkfs.c:295
+msgid "file system name is missing"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:285
-msgid "locktable error: filesystem name too long\n"
+#: gfs2/mkfs/main_mkfs.c:297
+msgid "file system name too long"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:287
+#: gfs2/mkfs/main_mkfs.c:299
#, c-format
-msgid "lockproto error: %s unknown\n"
+msgid "Invalid lock protocol: %s\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:305
+#: gfs2/mkfs/main_mkfs.c:317
#, c-format
msgid "Are you sure you want to proceed? [y/n]"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:315
+#: gfs2/mkfs/main_mkfs.c:327
msgid "aborted\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:335
+#: gfs2/mkfs/main_mkfs.c:347
#, c-format
msgid "block size must be a power of two between 512 and %d\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:339
+#: gfs2/mkfs/main_mkfs.c:351
#, c-format
msgid "Error: Block size %d is less than minimum logical block size (%d).\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:345
+#: gfs2/mkfs/main_mkfs.c:357
#, c-format
msgid ""
"WARNING: Block size %d is inefficient because it is less than the physical "
"block size (%d).\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:361 gfs2/mkfs/main_mkfs.c:364
+#: gfs2/mkfs/main_mkfs.c:373 gfs2/mkfs/main_mkfs.c:376
msgid "bad resource group size\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:368 gfs2/mkfs/main_jadd.c:173
+#: gfs2/mkfs/main_mkfs.c:380 gfs2/mkfs/main_jadd.c:187
msgid "no journals specified\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:371 gfs2/mkfs/main_jadd.c:175
+#: gfs2/mkfs/main_mkfs.c:383 gfs2/mkfs/main_jadd.c:189
msgid "bad journal size\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:374 gfs2/mkfs/main_jadd.c:177
+#: gfs2/mkfs/main_mkfs.c:386 gfs2/mkfs/main_jadd.c:191
msgid "bad quota change size\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:459
+#: gfs2/mkfs/main_mkfs.c:471
#, c-format
msgid ""
"Content of file or device unknown (do you have GNU fileutils installed?)\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:463
+#: gfs2/mkfs/main_mkfs.c:475
#, c-format
msgid "It appears to contain: %s"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:493
-#, c-format
-msgid "Expert mode: on\n"
+#: gfs2/mkfs/main_mkfs.c:505
+msgid "Expert mode:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:495
-#, c-format
-msgid "Device: %s\n"
+#: gfs2/mkfs/main_mkfs.c:505
+msgid "on"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:497
-#, c-format
-msgid "Blocksize: %u\n"
+#: gfs2/mkfs/main_mkfs.c:507 gfs2/mkfs/main_grow.c:285
+msgid "Device:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:498
-#, c-format
-msgid "Device Size %.2f GB (%llu blocks)\n"
+#: gfs2/mkfs/main_mkfs.c:509
+msgid "Block size:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:501
-#, c-format
-msgid "Filesystem Size: %.2f GB (%llu blocks)\n"
+#: gfs2/mkfs/main_mkfs.c:510 gfs2/mkfs/main_mkfs.c:645
+msgid "Device size:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:504
-#, c-format
-msgid "Journals: %u\n"
+#: gfs2/mkfs/main_mkfs.c:511 gfs2/mkfs/main_mkfs.c:514
+#: gfs2/mkfs/main_mkfs.c:646
+msgid "GB"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:505
-#, c-format
-msgid "Resource Groups: %llu\n"
+#: gfs2/mkfs/main_mkfs.c:512 gfs2/mkfs/main_mkfs.c:515
+#: gfs2/mkfs/main_mkfs.c:647
+msgid "blocks"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:507
-#, c-format
-msgid "Locking Protocol: \"%s\"\n"
+#: gfs2/mkfs/main_mkfs.c:513
+msgid "Filesystem size:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:508
-#, c-format
-msgid "Lock Table: \"%s\"\n"
+#: gfs2/mkfs/main_mkfs.c:516
+msgid "Journals:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:512
-#, c-format
-msgid "Writes: %u\n"
+#: gfs2/mkfs/main_mkfs.c:517
+msgid "Resource groups:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:515
-#, c-format
-msgid "UUID: %s\n"
+#: gfs2/mkfs/main_mkfs.c:518
+msgid "Locking protocol:"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:519
+msgid "Lock table:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:538
+#: gfs2/mkfs/main_mkfs.c:522
+msgid "Writes:"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:525
+msgid "UUID:"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:539
+msgid "Failed to lstat the device"
+msgstr ""
+
+#: gfs2/mkfs/main_mkfs.c:547
msgid "Could not find the absolute path of the device"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:541
+#: gfs2/mkfs/main_mkfs.c:550
#, c-format
msgid "%s is a symlink to %s\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:590
+#: gfs2/mkfs/main_mkfs.c:599
msgid "Failed to build string"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:596
+#: gfs2/mkfs/main_mkfs.c:605
#, c-format
msgid "This will destroy any data on %s.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:625 gfs2/mkfs/main_grow.c:358
-#: gfs2/mkfs/main_jadd.c:506
-msgid "Bad constants (1)"
+#: gfs2/mkfs/main_mkfs.c:629
+msgid "Using block size:"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:634
-#, c-format
-msgid "%s: Specified block count is bigger than the actual device.\n"
+#: gfs2/mkfs/main_mkfs.c:634 gfs2/mkfs/main_grow.c:367
+#: gfs2/mkfs/main_jadd.c:519
+msgid "Bad constants (1)"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:636
-#, c-format
-msgid "Device Size is %.2f GB (%llu blocks)\n"
+#: gfs2/mkfs/main_mkfs.c:644
+msgid "Specified size is bigger than the device."
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:662
+#: gfs2/mkfs/main_mkfs.c:671
msgid "Error building jindex"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:667
+#: gfs2/mkfs/main_mkfs.c:676
msgid "Error building per-node directory"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:672
+#: gfs2/mkfs/main_mkfs.c:681
msgid "Error building inum inode"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:678
+#: gfs2/mkfs/main_mkfs.c:687
msgid "Error building statfs inode"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:684
+#: gfs2/mkfs/main_mkfs.c:693
msgid "Error building rindex inode"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:689
+#: gfs2/mkfs/main_mkfs.c:698
msgid "Error building quota inode"
msgstr ""
@@ -306,139 +384,168 @@ msgstr ""
msgid "Unknown mode\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:65
+#: gfs2/mkfs/main_grow.c:67
+msgid "Display this usage information"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:68
+msgid "Quiet, reduce verbosity"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:69
+msgid "Do everything except update FS"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:70
+msgid "Display version information"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:71
+msgid "Increase verbosity"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:77
#, c-format
msgid ""
-"Usage:\n"
-"\n"
-"gfs2_grow [options] /path/to/filesystem\n"
-"\n"
-"Options:\n"
-" -h Usage information\n"
-" -q Quiet, reduce verbosity\n"
-" -T Test, do everything except update FS\n"
-" -V Version information\n"
-" -v Verbose, increase verbosity\n"
+"Expands a GFS2 file system after the device upon which the file system "
+"resides has been expanded"
msgstr ""
#: gfs2/mkfs/main_grow.c:99
#, c-format
-msgid "(Test mode--File system will not be changed)\n"
+msgid "%s %s (built %s %s)\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:112 gfs2/fsck/main.c:106
+#: gfs2/mkfs/main_grow.c:110
#, c-format
-msgid "Invalid option %c\n"
+msgid "(Test mode - file system will not be changed)\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:200
+#: gfs2/mkfs/main_grow.c:123
+#, c-format
+msgid "Invalid option '%c'\n"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:211
#, c-format
msgid "%d new rindex entries.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:227
+#: gfs2/mkfs/main_grow.c:238
#, c-format
msgid "Incorrect rindex size. want %ld(%d RGs), have %ld\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:237
-msgid "Error writing first new rindex entry;aborted.\n"
+#: gfs2/mkfs/main_grow.c:248
+msgid "Error writing first new rindex entry; aborted.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:247
-msgid "Error writing new rindex entries;aborted.\n"
+#: gfs2/mkfs/main_grow.c:257
+msgid "Error writing new rindex entries; aborted.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:263
+#: gfs2/mkfs/main_grow.c:272
#, c-format
-msgid "truncating rindex to %ld\n"
+msgid "truncating rindex to %ld entries\n"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:284
+msgid "Mount point:"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:286
+msgid "Size:"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:288
+msgid "Resource group size:"
msgstr ""
-#: gfs2/mkfs/main_grow.c:351 gfs2/fsck/initialize.c:1306
+#: gfs2/mkfs/main_grow.c:289
+msgid "Length:"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:292
+#, c-format
+msgid "The file system grew by %lluMB.\n"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:360 gfs2/fsck/initialize.c:1306
msgid "Initializing lists...\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:362
-msgid "gfs: Error reading superblock.\n"
+#: gfs2/mkfs/main_grow.c:371
+msgid "Error reading superblock.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:364
+#: gfs2/mkfs/main_grow.c:373
msgid "cannot grow gfs1 filesystem\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:376
-msgid "GFS2 rindex not found. Please run gfs2_fsck.\n"
+#: gfs2/mkfs/main_grow.c:377
+msgid "GFS2 metafs mount failed"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:385
+msgid "GFS2 rindex not found. Please run fsck.gfs2.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:393
+#: gfs2/mkfs/main_grow.c:390
+msgid "Could not read master directory"
+msgstr ""
+
+#: gfs2/mkfs/main_grow.c:402
msgid "Error: No resource groups found.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:401
+#: gfs2/mkfs/main_grow.c:410
msgid "Error: The device has grown by less than one Resource Group (RG).\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:403
+#: gfs2/mkfs/main_grow.c:412
#, c-format
msgid "The device grew by %lluMB. "
msgstr ""
-#: gfs2/mkfs/main_grow.c:405
+#: gfs2/mkfs/main_grow.c:414
#, c-format
msgid "One RG is %uMB for this file system.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:426
+#: gfs2/mkfs/main_grow.c:435
msgid "gfs2_grow complete.\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:62
-msgid "rename2system (1)\n"
-msgstr ""
-
-#: gfs2/mkfs/main_jadd.c:67
-msgid "rename2system (2)\n"
+#: gfs2/mkfs/main_jadd.c:88
+msgid "Display version information, then exit"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:79
+#: gfs2/mkfs/main_jadd.c:94
#, c-format
-msgid ""
-"Usage:\n"
-"\n"
-"%s [options] /path/to/filesystem\n"
-"\n"
-"Options:\n"
-"\n"
-" -c <MB> Size of quota change file\n"
-" -D Enable debugging code\n"
-" -h Print this help, then exit\n"
-" -J <MB> Size of journals\n"
-" -j <num> Number of journals\n"
-" -q Don't print anything\n"
-" -V Print program version information, then exit\n"
+msgid "Adds journals to a GFS2 file system."
msgstr ""
-#: gfs2/mkfs/main_jadd.c:154
+#: gfs2/mkfs/main_jadd.c:168
msgid "no path specified (try -h for help)\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:197
+#: gfs2/mkfs/main_jadd.c:211
#, c-format
msgid "Filesystem: %s\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:198
+#: gfs2/mkfs/main_jadd.c:212
#, c-format
msgid "Old Journals %u\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:199
+#: gfs2/mkfs/main_jadd.c:213
#, c-format
msgid "New Journals %u\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:389
-msgid "There are no journals for this gfs2 fs! Did you mkfs.gfs2 correctly?\n"
+#: gfs2/mkfs/main_jadd.c:403
+msgid "No journals found. Did you run mkfs.gfs2 correctly?\n"
msgstr ""
#: gfs2/tune/main.c:99
@@ -556,6 +663,11 @@ msgstr ""
msgid "locktable error: fsname too long\n"
msgstr ""
+#: gfs2/tune/super.c:205
+#, c-format
+msgid "locktable error: more than one colon present\n"
+msgstr ""
+
#: gfs2/convert/gfs2_convert.c:554
msgid "Error: Can't allocate memory for indirect block fix\n"
msgstr ""
@@ -2878,6 +2990,11 @@ msgstr ""
msgid "GFS2 fsck %s (built %s %s)\n"
msgstr ""
+#: gfs2/fsck/main.c:106
+#, c-format
+msgid "Invalid option %c\n"
+msgstr ""
+
#: gfs2/fsck/main.c:118
#, c-format
msgid "No device specified (Please use '-h' for help)\n"
11 years, 5 months
gfs2-utils: master - gfs2-utils: Update translation files
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=7ca1dc87...
Commit: 7ca1dc87deda9682005711f33eb95b5e4050a41d
Parent: 110117a426f1edc0c3110a7776f10db186bc6f7d
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Nov 15 12:00:27 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Nov 15 12:00:27 2012 +0000
gfs2-utils: Update translation files
Repopulate POTFILES.in with files from the utils we want translated and
regenerate gfs2-utils.pot.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
po/POTFILES.in | 62 +-
po/gfs2-utils.pot | 4263 +++++++++++++++++++++++++++--------------------------
2 files changed, 2230 insertions(+), 2095 deletions(-)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b7f8269..faa56d7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,40 +1,34 @@
-# List of source files which contain translatable strings.
-#
-#edit tool
-gfs2/edit/extended.c
-gfs2/edit/gfs2hex.c
-gfs2/edit/hexedit.c
-gfs2/edit/savemeta.c
-
-#fsck tool
-gfs2/fsck/eattr.c
-gfs2/fsck/fs_recovery.c
-gfs2/fsck/hash.c
-gfs2/fsck/initialize.c
-gfs2/fsck/inode_hash.c
-gfs2/fsck/link.c
-gfs2/fsck/lost_n_found.c
-gfs2/fsck/main.c
-gfs2/fsck/metawalk.c
-gfs2/fsck/pass1b.c
-gfs2/fsck/pass1.c
-gfs2/fsck/pass1c.c
-gfs2/fsck/pass2.c
-gfs2/fsck/pass3.c
-gfs2/fsck/pass4.c
-gfs2/fsck/pass5.c
-gfs2/fsck/rgrepair.c
-gfs2/fsck/util.c
-
-#mkfs tool
+gfs2/mkfs/main_mkfs.c
+gfs2/mkfs/gfs2_mkfs.h
gfs2/mkfs/main.c
gfs2/mkfs/main_grow.c
gfs2/mkfs/main_jadd.c
-gfs2/mkfs/main_mkfs.c
-
-#tune tool
gfs2/tune/main.c
gfs2/tune/super.c
-
-#convert tool
+gfs2/tune/tunegfs2.h
gfs2/convert/gfs2_convert.c
+gfs2/fsck/inode_hash.c
+gfs2/fsck/initialize.c
+gfs2/fsck/util.h
+gfs2/fsck/pass3.c
+gfs2/fsck/pass2.c
+gfs2/fsck/eattr.c
+gfs2/fsck/metawalk.c
+gfs2/fsck/util.c
+gfs2/fsck/lost_n_found.c
+gfs2/fsck/metawalk.h
+gfs2/fsck/fsck.h
+gfs2/fsck/rgrepair.c
+gfs2/fsck/inode_hash.h
+gfs2/fsck/main.c
+gfs2/fsck/fs_recovery.c
+gfs2/fsck/fs_recovery.h
+gfs2/fsck/lost_n_found.h
+gfs2/fsck/link.c
+gfs2/fsck/pass4.c
+gfs2/fsck/pass1c.c
+gfs2/fsck/pass1b.c
+gfs2/fsck/link.h
+gfs2/fsck/pass5.c
+gfs2/fsck/pass1.c
+gfs2/fsck/eattr.h
diff --git a/po/gfs2-utils.pot b/po/gfs2-utils.pot
index 3c514d8..44456dc 100644
--- a/po/gfs2-utils.pot
+++ b/po/gfs2-utils.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gfs2-utils master\n"
"Report-Msgid-Bugs-To: linux-cluster(a)redhat.com\n"
-"POT-Creation-Date: 2012-01-30 11:26-0200\n"
+"POT-Creation-Date: 2012-11-14 13:58+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
@@ -17,4058 +17,4199 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gfs2/fsck/eattr.c:42 gfs2/fsck/pass1b.c:316 gfs2/fsck/pass1.c:966
-#: gfs2/fsck/pass2.c:197
+#: gfs2/mkfs/main_mkfs.c:52
#, c-format
msgid ""
-" Pointers Required: %d\n"
-" Pointers Reported: %d\n"
+"Usage:\n"
+"\n"
+"%s [options] <device> [ block-count ]\n"
+"\n"
+"Options:\n"
+"\n"
+" -b <bytes> Filesystem block size\n"
+" -c <MB> Size of quota change file\n"
+" -D Enable debugging code\n"
+" -h Print this help, then exit\n"
+" -J <MB> Size of journals\n"
+" -j <num> Number of journals\n"
+" -K Don't try to discard unused blocks\n"
+" -O Don't ask for confirmation\n"
+" -p <name> Name of the locking protocol\n"
+" -q Don't print anything\n"
+" -r <MB> Resource Group Size\n"
+" -t <name> Name of the lock table\n"
+" -V Print program version information, then exit\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:125
+#: gfs2/mkfs/main_mkfs.c:81
#, c-format
-msgid "Journal replay writing metadata block #%lld (0x%llx) for journal+0x%x\n"
+msgid "Issuing discard ioctl: range: %llu - %llu..."
msgstr ""
-#: gfs2/fsck/fs_recovery.c:131 gfs2/fsck/fs_recovery.c:243
-msgid "Out of memory when replaying journals.\n"
+#: gfs2/mkfs/main_mkfs.c:90
+#, c-format
+msgid "Successful.\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:183
+#: gfs2/mkfs/main_mkfs.c:150
#, c-format
-msgid ""
-"Journal replay processing revoke for block #%lld (0x%llx) for journal+0x%x\n"
+msgid "lock protocol name %s is too long\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:237
+#: gfs2/mkfs/main_mkfs.c:165
#, c-format
-msgid "Journal replay writing data block #%lld (0x%llx) for journal+0x%x\n"
+msgid "lock table name %s is too long\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:390
+#: gfs2/mkfs/main_mkfs.c:182 gfs2/mkfs/main_grow.c:109
+#: gfs2/mkfs/main_jadd.c:138 gfs2/fsck/main.c:103 gfs2/fsck/main.c:114
#, c-format
-msgid "Journal block %u (0x%x): sequence no. 0x%llx out of order.\n"
+msgid "Please use '-h' for help.\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:392
-#, c-format
-msgid "Low: 0x%llx, High: 0x%llx, Prev: 0x%llx\n"
+#: gfs2/mkfs/main_mkfs.c:199
+msgid "More than one device specified (try -h for help)\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:399
+#: gfs2/mkfs/main_mkfs.c:203 gfs2/mkfs/main_jadd.c:145 gfs2/tune/main.c:92
#, c-format
-msgid "Renumbering it as 0x%llx\n"
+msgid "Invalid option: %c\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:453
+#: gfs2/mkfs/main_mkfs.c:212 gfs2/convert/gfs2_convert.c:1722
+#: gfs2/convert/gfs2_convert.c:1726
#, c-format
-msgid "jid=%u: Looking at journal...\n"
+msgid "No device specified. Please use '-h' for help\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:459
+#: gfs2/mkfs/main_mkfs.c:218 gfs2/mkfs/main_jadd.c:157
#, c-format
-msgid "Journal #%d (\"journal%d\") is corrupt\n"
+msgid "Unrecognized argument: %s\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:460
-msgid "Not fixing it due to the -n option.\n"
+#: gfs2/mkfs/main_mkfs.c:221 gfs2/mkfs/main_jadd.c:160
+#, c-format
+msgid "Command Line Arguments:\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:464
+#: gfs2/mkfs/main_mkfs.c:231
#, c-format
-msgid "Journal #%d (\"journal%d\") is corrupt.\n"
+msgid " rgsize = optimize for best performance\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:466
-msgid ""
-"I'm not fixing it because it may be unsafe:\n"
-"Locking protocol is not lock_nolock and the -a or -p option was specified.\n"
+#: gfs2/mkfs/main_mkfs.c:258
+#, c-format
+msgid "No lock table specified.\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:469 gfs2/fsck/fs_recovery.c:512
-msgid ""
-"Please make sure no node has the file system mounted then rerun fsck.gfs2 "
-"manually without -a or -p.\n"
+#: gfs2/mkfs/main_mkfs.c:263
+#, c-format
+msgid "locktable error: invalid character '%c'\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:474
-#, c-format
-msgid ""
-"\n"
-"Journal #%d (\"journal%d\") is corrupt. Okay to repair it? (y/n)"
+#: gfs2/mkfs/main_mkfs.c:268
+msgid "locktable error: missing colon in the locktable\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:477
-#, c-format
-msgid "jid=%u: The journal was not repaired.\n"
+#: gfs2/mkfs/main_mkfs.c:271
+msgid "locktable error: missing cluster name\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:481
-#, c-format
-msgid "jid=%u: Repairing journal...\n"
+#: gfs2/mkfs/main_mkfs.c:273
+msgid "locktable error: cluster name too long\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:484 gfs2/fsck/fs_recovery.c:490
-#, c-format
-msgid "jid=%u: Unable to fix the bad journal.\n"
+#: gfs2/mkfs/main_mkfs.c:277 gfs2/mkfs/main_mkfs.c:283
+msgid "locktable error: missing filesystem name\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:494
+#: gfs2/mkfs/main_mkfs.c:280 gfs2/tune/super.c:205
#, c-format
-msgid "jid=%u: The journal was successfully fixed.\n"
+msgid "locktable error: more than one colon present\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:498
-#, c-format
-msgid "jid=%u: Journal is clean.\n"
+#: gfs2/mkfs/main_mkfs.c:285
+msgid "locktable error: filesystem name too long\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:503 gfs2/fsck/fs_recovery.c:508
+#: gfs2/mkfs/main_mkfs.c:287
#, c-format
-msgid "Journal #%d (\"journal%d\") is dirty\n"
+msgid "lockproto error: %s unknown\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:504
-msgid "not replaying due to the -n option.\n"
+#: gfs2/mkfs/main_mkfs.c:305
+#, c-format
+msgid "Are you sure you want to proceed? [y/n]"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:509
-msgid ""
-"I'm not replaying it because it may be unsafe:\n"
-"Locking protocol is not lock_nolock and the -a or -p option was specified.\n"
+#: gfs2/mkfs/main_mkfs.c:315
+msgid "aborted\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:518
+#: gfs2/mkfs/main_mkfs.c:335
#, c-format
-msgid ""
-"\n"
-"Journal #%d (\"journal%d\") is dirty. Okay to replay it? (y/n)"
+msgid "block size must be a power of two between 512 and %d\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:522
+#: gfs2/mkfs/main_mkfs.c:339
#, c-format
-msgid "jid=%u: Replaying journal...\n"
+msgid "Error: Block size %d is less than minimum logical block size (%d).\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:534
+#: gfs2/mkfs/main_mkfs.c:345
#, c-format
-msgid "jid=%u: Found %u revoke tags\n"
+msgid ""
+"WARNING: Block size %d is inefficient because it is less than the physical "
+"block size (%d).\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:539
-#, c-format
-msgid "jid=%u: Replayed %u of %u journaled data blocks\n"
+#: gfs2/mkfs/main_mkfs.c:361 gfs2/mkfs/main_mkfs.c:364
+msgid "bad resource group size\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:541
-#, c-format
-msgid "jid=%u: Replayed %u of %u metadata blocks\n"
+#: gfs2/mkfs/main_mkfs.c:368 gfs2/mkfs/main_jadd.c:173
+msgid "no journals specified\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:548
-#, c-format
-msgid "jid=%u: Done\n"
+#: gfs2/mkfs/main_mkfs.c:371 gfs2/mkfs/main_jadd.c:175
+msgid "bad journal size\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:551
-#, c-format
-msgid "jid=%u: Failed\n"
+#: gfs2/mkfs/main_mkfs.c:374 gfs2/mkfs/main_jadd.c:177
+msgid "bad quota change size\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:553
-msgid "Do you want to clear the journal instead? (y/n)"
+#: gfs2/mkfs/main_mkfs.c:459
+#, c-format
+msgid ""
+"Content of file or device unknown (do you have GNU fileutils installed?)\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:558
+#: gfs2/mkfs/main_mkfs.c:463
#, c-format
-msgid "jid=%u: journal not cleared.\n"
+msgid "It appears to contain: %s"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:587
+#: gfs2/mkfs/main_mkfs.c:493
#, c-format
-msgid ""
-"File system journal \"journal%d\" is missing: pass1 will try to recreate "
-"it.\n"
+msgid "Expert mode: on\n"
msgstr ""
-#: gfs2/fsck/fs_recovery.c:607
-msgid "Recovering journals (this may take a while)\n"
+#: gfs2/mkfs/main_mkfs.c:495
+#, c-format
+msgid "Device: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:112
-msgid "Freeing buffers.\n"
+#: gfs2/mkfs/main_mkfs.c:497
+#, c-format
+msgid "Blocksize: %u\n"
msgstr ""
-#: gfs2/fsck/initialize.c:142
-msgid "Setting block ranges...\n"
+#: gfs2/mkfs/main_mkfs.c:498
+#, c-format
+msgid "Device Size %.2f GB (%llu blocks)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:157
-msgid "This file system is too big for this computer to handle.\n"
+#: gfs2/mkfs/main_mkfs.c:501
+#, c-format
+msgid "Filesystem Size: %.2f GB (%llu blocks)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:158
+#: gfs2/mkfs/main_mkfs.c:504
#, c-format
-msgid "Last fs block = 0x%llx, but sizeof(unsigned long) is %zu bytes.\n"
+msgid "Journals: %u\n"
msgstr ""
-#: gfs2/fsck/initialize.c:168
+#: gfs2/mkfs/main_mkfs.c:505
#, c-format
-msgid "Can't seek to last block in file system: %llu (0x%llx)\n"
+msgid "Resource Groups: %llu\n"
msgstr ""
-#: gfs2/fsck/initialize.c:177
+#: gfs2/mkfs/main_mkfs.c:507
#, c-format
-msgid ""
-"Can't read last block in file system (error %u), last_fs_block: %llu (0x"
-"%llx)\n"
+msgid "Locking Protocol: \"%s\"\n"
msgstr ""
-#: gfs2/fsck/initialize.c:244
+#: gfs2/mkfs/main_mkfs.c:508
#, c-format
-msgid "Okay to reclaim unlinked inodes in resource group %lld (0x%llx)? (y/n)"
+msgid "Lock Table: \"%s\"\n"
msgstr ""
-#: gfs2/fsck/initialize.c:267
+#: gfs2/mkfs/main_mkfs.c:512
#, c-format
-msgid ""
-"Error: resource group %lld (0x%llx): free space (%d) does not match bitmap "
-"(%d)\n"
+msgid "Writes: %u\n"
msgstr ""
-#: gfs2/fsck/initialize.c:273 gfs2/fsck/initialize.c:295
+#: gfs2/mkfs/main_mkfs.c:515
#, c-format
-msgid "(%d blocks were reclaimed)\n"
+msgid "UUID: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:275
-msgid "Fix the rgrp free blocks count? (y/n)"
+#: gfs2/mkfs/main_mkfs.c:538
+msgid "Could not find the absolute path of the device"
msgstr ""
-#: gfs2/fsck/initialize.c:283 gfs2/fsck/initialize.c:301
-msgid "The rgrp was fixed.\n"
+#: gfs2/mkfs/main_mkfs.c:541
+#, c-format
+msgid "%s is a symlink to %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:285 gfs2/fsck/initialize.c:303
-msgid "The rgrp was not fixed.\n"
+#: gfs2/mkfs/main_mkfs.c:590
+msgid "Failed to build string"
msgstr ""
-#: gfs2/fsck/initialize.c:289
+#: gfs2/mkfs/main_mkfs.c:596
#, c-format
-msgid ""
-"Error: resource group %lld (0x%llx): free meta (%d) does not match bitmap "
-"(%d)\n"
+msgid "This will destroy any data on %s.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:297
-msgid "Fix the rgrp free meta blocks count? (y/n)"
+#: gfs2/mkfs/main_mkfs.c:625 gfs2/mkfs/main_grow.c:358
+#: gfs2/mkfs/main_jadd.c:506
+msgid "Bad constants (1)"
msgstr ""
-#: gfs2/fsck/initialize.c:328
-msgid "Checking the integrity of all resource groups.\n"
+#: gfs2/mkfs/main_mkfs.c:634
+#, c-format
+msgid "%s: Specified block count is bigger than the actual device.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:345
+#: gfs2/mkfs/main_mkfs.c:636
#, c-format
-msgid "RGs: Consistent: %d Inconsistent: %d Fixed: %d Total: %d\n"
+msgid "Device Size is %.2f GB (%llu blocks)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:360
-msgid "The system master directory seems to be destroyed.\n"
+#: gfs2/mkfs/main_mkfs.c:662
+msgid "Error building jindex"
msgstr ""
-#: gfs2/fsck/initialize.c:361
-msgid "Okay to rebuild it? (y/n)"
+#: gfs2/mkfs/main_mkfs.c:667
+msgid "Error building per-node directory"
msgstr ""
-#: gfs2/fsck/initialize.c:362
-msgid "System master not rebuilt; aborting.\n"
+#: gfs2/mkfs/main_mkfs.c:672
+msgid "Error building inum inode"
msgstr ""
-#: gfs2/fsck/initialize.c:365
-msgid "Trying to rebuild the master directory.\n"
+#: gfs2/mkfs/main_mkfs.c:678
+msgid "Error building statfs inode"
msgstr ""
-#: gfs2/fsck/initialize.c:378
-#, c-format
-msgid "Error %d adding jindex directory\n"
+#: gfs2/mkfs/main_mkfs.c:684
+msgid "Error building rindex inode"
msgstr ""
-#: gfs2/fsck/initialize.c:385
-#, c-format
-msgid "Error %d building jindex\n"
+#: gfs2/mkfs/main_mkfs.c:689
+msgid "Error building quota inode"
msgstr ""
-#: gfs2/fsck/initialize.c:396
-#, c-format
-msgid "Error %d adding per_node directory\n"
+#: gfs2/mkfs/main.c:51
+msgid "Unknown mode\n"
msgstr ""
-#: gfs2/fsck/initialize.c:404
+#: gfs2/mkfs/main_grow.c:65
#, c-format
-msgid "Error %d building per_node directory\n"
+msgid ""
+"Usage:\n"
+"\n"
+"gfs2_grow [options] /path/to/filesystem\n"
+"\n"
+"Options:\n"
+" -h Usage information\n"
+" -q Quiet, reduce verbosity\n"
+" -T Test, do everything except update FS\n"
+" -V Version information\n"
+" -v Verbose, increase verbosity\n"
msgstr ""
-#: gfs2/fsck/initialize.c:416
+#: gfs2/mkfs/main_grow.c:99
#, c-format
-msgid "Error %d adding inum inode\n"
+msgid "(Test mode--File system will not be changed)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:422
+#: gfs2/mkfs/main_grow.c:112 gfs2/fsck/main.c:106
#, c-format
-msgid "Error %d building inum inode\n"
+msgid "Invalid option %c\n"
msgstr ""
-#: gfs2/fsck/initialize.c:434
+#: gfs2/mkfs/main_grow.c:200
#, c-format
-msgid "Error %d adding statfs inode\n"
+msgid "%d new rindex entries.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:440
+#: gfs2/mkfs/main_grow.c:227
#, c-format
-msgid "Error %d building statfs inode\n"
+msgid "Incorrect rindex size. want %ld(%d RGs), have %ld\n"
msgstr ""
-#: gfs2/fsck/initialize.c:452
-#, c-format
-msgid "Error %d adding rindex inode\n"
+#: gfs2/mkfs/main_grow.c:237
+msgid "Error writing first new rindex entry;aborted.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:458
-#, c-format
-msgid "Error %d building rindex inode\n"
+#: gfs2/mkfs/main_grow.c:247
+msgid "Error writing new rindex entries;aborted.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:469
+#: gfs2/mkfs/main_grow.c:263
#, c-format
-msgid "Error %d adding quota inode\n"
+msgid "truncating rindex to %ld\n"
msgstr ""
-#: gfs2/fsck/initialize.c:475
-#, c-format
-msgid "Error %d building quota inode\n"
+#: gfs2/mkfs/main_grow.c:351 gfs2/fsck/initialize.c:1306
+msgid "Initializing lists...\n"
msgstr ""
-#: gfs2/fsck/initialize.c:480
-msgid "Master directory rebuilt.\n"
+#: gfs2/mkfs/main_grow.c:362
+msgid "gfs: Error reading superblock.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:509
-msgid ""
-"The gfs2 system per_node directory inode is missing, so we might not be \n"
-"able to rebuild missing journals this run.\n"
+#: gfs2/mkfs/main_grow.c:364
+msgid "cannot grow gfs1 filesystem\n"
msgstr ""
-#: gfs2/fsck/initialize.c:515
-msgid ""
-"The gfs2 system per_node directory inode is missing. Okay to rebuild it? (y/"
-"n) "
+#: gfs2/mkfs/main_grow.c:376
+msgid "GFS2 rindex not found. Please run gfs2_fsck.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:521
-#, c-format
-msgid "Error %d rebuilding per_node directory\n"
+#: gfs2/mkfs/main_grow.c:393
+msgid "Error: No resource groups found.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:528
-msgid "Unable to rebuild per_node; aborting.\n"
+#: gfs2/mkfs/main_grow.c:401
+msgid "Error: The device has grown by less than one Resource Group (RG).\n"
msgstr ""
-#: gfs2/fsck/initialize.c:542
-msgid "Checking if all rgrp and rindex values are good"
+#: gfs2/mkfs/main_grow.c:403
+#, c-format
+msgid "The device grew by %lluMB. "
msgstr ""
-#: gfs2/fsck/initialize.c:543
-msgid "Checking if rindex values may be easily repaired"
+#: gfs2/mkfs/main_grow.c:405
+#, c-format
+msgid "One RG is %uMB for this file system.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:544
-msgid "Calculating where the rgrps should be if evenly spaced"
+#: gfs2/mkfs/main_grow.c:426
+msgid "gfs2_grow complete.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:545
-msgid "Trying to rebuild rindex assuming evenly spaced rgrps"
+#: gfs2/mkfs/main_jadd.c:62
+msgid "rename2system (1)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:546
-msgid "Trying to rebuild rindex assuming unevenly spaced rgrps"
+#: gfs2/mkfs/main_jadd.c:67
+msgid "rename2system (2)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:549
-msgid "Some damage was found; we need to take remedial measures"
+#: gfs2/mkfs/main_jadd.c:79
+#, c-format
+msgid ""
+"Usage:\n"
+"\n"
+"%s [options] /path/to/filesystem\n"
+"\n"
+"Options:\n"
+"\n"
+" -c <MB> Size of quota change file\n"
+" -D Enable debugging code\n"
+" -h Print this help, then exit\n"
+" -J <MB> Size of journals\n"
+" -j <num> Number of journals\n"
+" -q Don't print anything\n"
+" -V Print program version information, then exit\n"
msgstr ""
-#: gfs2/fsck/initialize.c:550
-msgid "rindex is unevenly spaced: either gfs1-style or corrupt"
+#: gfs2/mkfs/main_jadd.c:154
+msgid "no path specified (try -h for help)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:551
-msgid "rindex calculations don't match: uneven rgrp boundaries"
+#: gfs2/mkfs/main_jadd.c:197
+#, c-format
+msgid "Filesystem: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:552
-msgid "Too many rgrp misses: rgrps must be unevenly spaced"
+#: gfs2/mkfs/main_jadd.c:198
+#, c-format
+msgid "Old Journals %u\n"
msgstr ""
-#: gfs2/fsck/initialize.c:553
-msgid "Too much damage found: we cannot rebuild this rindex"
+#: gfs2/mkfs/main_jadd.c:199
+#, c-format
+msgid "New Journals %u\n"
msgstr ""
-#: gfs2/fsck/initialize.c:558
-msgid "Validating Resource Group index.\n"
+#: gfs2/mkfs/main_jadd.c:389
+msgid "There are no journals for this gfs2 fs! Did you mkfs.gfs2 correctly?\n"
msgstr ""
-#: gfs2/fsck/initialize.c:562
+#: gfs2/tune/main.c:99
#, c-format
-msgid "Level %d rgrp check: %s.\n"
+msgid "Incorrect number of arguments\n"
msgstr ""
-#: gfs2/fsck/initialize.c:566
+#: gfs2/tune/main.c:105
#, c-format
-msgid "(level %d passed)\n"
+msgid "The -L and -o locktable= options are mutually exclusive\n"
msgstr ""
-#: gfs2/fsck/initialize.c:570
+#: gfs2/tune/main.c:114
#, c-format
-msgid "(level %d failed: %s)\n"
+msgid "Unable to open device %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:573
+#: gfs2/tune/super.c:65
#, c-format
-msgid "(level %d failed at block %lld (0x%llx): %s)\n"
+msgid "Invalid UUID specified.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:583
-msgid "Resource Group recovery impossible; I can't fix this file system.\n"
+#: gfs2/tune/super.c:75
+#, c-format
+msgid "uuid %s has an invalid format."
msgstr ""
-#: gfs2/fsck/initialize.c:587
+#: gfs2/tune/super.c:80
#, c-format
-msgid "%u resource groups found.\n"
+msgid "uuid %s has an invalid hex digit '%c' at offset %d.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:610
-msgid "Initializing special inodes...\n"
+#: gfs2/tune/super.c:109
+#, c-format
+msgid "Not a GFS/GFS2 device\n"
msgstr ""
-#: gfs2/fsck/initialize.c:626
-msgid "The gfs2 system inum inode is missing. Okay to rebuild it? (y/n) "
+#: gfs2/tune/super.c:127
+#, c-format
+msgid "Filesystem volume name: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:628
-msgid "fsck.gfs2 cannot continue without a valid inum file; aborting.\n"
+#: gfs2/tune/super.c:129
+#, c-format
+msgid "Filesystem UUID: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:634
+#: gfs2/tune/super.c:130
#, c-format
-msgid "Error %d rebuilding inum inode\n"
+msgid "Filesystem magic number: 0x%X\n"
msgstr ""
-#: gfs2/fsck/initialize.c:650
+#: gfs2/tune/super.c:131
#, c-format
-msgid "Error %d reading system inum inode. Aborting.\n"
+msgid "Block size: %d\n"
msgstr ""
-#: gfs2/fsck/initialize.c:663
-msgid "The gfs2 system statfs inode is missing. Okay to rebuild it? (y/n) "
+#: gfs2/tune/super.c:132
+#, c-format
+msgid "Block shift: %d\n"
msgstr ""
-#: gfs2/fsck/initialize.c:665 gfs2/fsck/initialize.c:677
-msgid "fsck.gfs2 cannot continue without a valid statfs file; aborting.\n"
+#: gfs2/tune/super.c:133
+#, c-format
+msgid "Root inode: %llu\n"
msgstr ""
-#: gfs2/fsck/initialize.c:671
+#: gfs2/tune/super.c:135
#, c-format
-msgid "Error %d rebuilding statfs inode\n"
+msgid "Master inode: %llu\n"
msgstr ""
-#: gfs2/fsck/initialize.c:676
-msgid "Rebuild of statfs system file failed."
+#: gfs2/tune/super.c:136
+#, c-format
+msgid "Lock Protocol: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:689
+#: gfs2/tune/super.c:137
#, c-format
-msgid "Error %d reading statfs file. Aborting.\n"
+msgid "Lock table: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:705
-msgid "The gfs2 system quota inode is missing. Okay to rebuild it? (y/n) "
+#: gfs2/tune/super.c:158
+#, c-format
+msgid "UUID can be changed for a GFS2"
msgstr ""
-#: gfs2/fsck/initialize.c:713
+#: gfs2/tune/super.c:159
#, c-format
-msgid "Error %d rebuilding quota inode\n"
+msgid " device only\n"
msgstr ""
-#: gfs2/fsck/initialize.c:733
-msgid "Unable to determine the boundaries of the file system.\n"
+#: gfs2/tune/super.c:173
+#, c-format
+msgid "Lock protocol name too long\n"
msgstr ""
-#: gfs2/fsck/initialize.c:740
-msgid ""
-"This system doesn't have enough memory and swap space to fsck this file "
-"system.\n"
+#: gfs2/tune/super.c:179
+#, c-format
+msgid "Incorrect lock protocol specified\n"
msgstr ""
-#: gfs2/fsck/initialize.c:741
+#: gfs2/tune/super.c:190
#, c-format
-msgid "Additional memory needed is approximately: %lluMB\n"
+msgid "Lock table name too long\n"
msgstr ""
-#: gfs2/fsck/initialize.c:743
-msgid ""
-"Please increase your swap space by that amount and run gfs2_fsck again.\n"
+#: gfs2/tune/super.c:197
+#, c-format
+msgid "locktable error: mising colon in the locktable\n"
msgstr ""
-#: gfs2/fsck/initialize.c:765
-msgid "Lock protocol determined to be: lock_nolock\n"
+#: gfs2/tune/super.c:201
+#, c-format
+msgid "locktable error: fsname too long\n"
msgstr ""
-#: gfs2/fsck/initialize.c:766
-msgid "Stand-alone file system: No need for a lock table.\n"
+#: gfs2/convert/gfs2_convert.c:554
+msgid "Error: Can't allocate memory for indirect block fix\n"
msgstr ""
-#: gfs2/fsck/initialize.c:771
-msgid "Lock protocol assumed to be: "
+#: gfs2/convert/gfs2_convert.c:561 gfs2/convert/gfs2_convert.c:596
+#: gfs2/convert/gfs2_convert.c:696
+msgid "Error: Can't allocate memory for file conversion.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:784
-msgid "Error: Unable to determine cluster name from /etc/cluster.conf\n"
+#: gfs2/convert/gfs2_convert.c:589 gfs2/convert/gfs2_convert.c:690
+msgid "Error: Can't allocate memory for indirect block fix.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:796
-#, c-format
-msgid "Lock table determined to be: %s\n"
+#: gfs2/convert/gfs2_convert.c:836 gfs2/convert/gfs2_convert.c:871
+#: gfs2/convert/gfs2_convert.c:917
+msgid "Error: out of memory.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:835
+#: gfs2/convert/gfs2_convert.c:900 gfs2/fsck/initialize.c:922
+#: gfs2/fsck/initialize.c:1049
#, c-format
-msgid "Found system master directory at: 0x%llx.\n"
+msgid "Error reading inode: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:846
-#, c-format
-msgid "Found system jindex file at: 0x%llx\n"
+#: gfs2/convert/gfs2_convert.c:1011
+msgid "Converting inodes.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:860 gfs2/fsck/initialize.c:1174
+#: gfs2/convert/gfs2_convert.c:1030 gfs2/convert/gfs2_convert.c:1085
#, c-format
-msgid "Found system master directory at: 0x%llx\n"
+msgid "\r%llu inodes from %d rgs converted."
msgstr ""
-#: gfs2/fsck/initialize.c:872
-#, c-format
-msgid "Found system per_node directory at: 0x%llx\n"
+#: gfs2/convert/gfs2_convert.c:1128
+msgid "Error retrieving directory.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:879
+#: gfs2/convert/gfs2_convert.c:1153 gfs2/convert/gfs2_convert.c:2186
#, c-format
-msgid "From per_node's '..' I backtracked the master directory to: 0x%llx\n"
+msgid "\r%llu directories, %llu dirents fixed."
msgstr ""
-#: gfs2/fsck/initialize.c:885
+#: gfs2/convert/gfs2_convert.c:1164
#, c-format
-msgid "Unknown system directory at block 0x%llx\n"
+msgid "Error retrieving inode 0x%llx\n"
msgstr ""
-#: gfs2/fsck/initialize.c:892
-#, c-format
-msgid "Found system inum file at: 0x%llx\n"
+#: gfs2/convert/gfs2_convert.c:1258
+msgid "fix_one_directory_exhash: error reading directory.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:898
+#: gfs2/convert/gfs2_convert.c:1274
#, c-format
-msgid "Found system statfs file at: 0x%llx\n"
+msgid "Error reading leaf %llx\n"
msgstr ""
-#: gfs2/fsck/initialize.c:904
-#, c-format
-msgid "Found system rindex file at: 0x%llx\n"
+#: gfs2/convert/gfs2_convert.c:1304
+msgid "Error fixing exhash directory.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:912
-#, c-format
-msgid "Found system quota file at: 0x%llx\n"
+#: gfs2/convert/gfs2_convert.c:1311
+msgid "Error fixing linear directory.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:941
-#, c-format
-msgid "Found the root directory at: 0x%llx.\n"
+#: gfs2/convert/gfs2_convert.c:1338
+msgid ""
+"\n"
+"Fixing file and directory information.\n"
+msgstr ""
+
+#: gfs2/convert/gfs2_convert.c:1353
+msgid "Error processing directory\n"
msgstr ""
-#: gfs2/fsck/initialize.c:946
+#: gfs2/convert/gfs2_convert.c:1389 gfs2/convert/gfs2_convert.c:1395
#, c-format
+msgid "Error retrieving inode at block %llx\n"
+msgstr ""
+
+#: gfs2/convert/gfs2_convert.c:1413
+msgid "Error trying to fix cdpn dentry\n"
+msgstr ""
+
+#: gfs2/convert/gfs2_convert.c:1447
msgid ""
-"The root dinode should be at block 0x%llx but it seems to be destroyed.\n"
+"The size reported in the journal index inode is not a\n"
+"\tmultiple of the size of a journal index.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:949
-#, c-format
-msgid "Found a copy of the root directory in a journal at block: 0x%llx.\n"
+#: gfs2/convert/gfs2_convert.c:1453
+msgid "Unable to allocate journal index\n"
msgstr ""
-#: gfs2/fsck/initialize.c:952
-msgid "Do you want to replace the root dinode from the copy? (y/n)"
+#: gfs2/convert/gfs2_convert.c:1457
+msgid "Unable to zero journal index\n"
msgstr ""
-#: gfs2/fsck/initialize.c:954
-msgid "Damaged root dinode not fixed.\n"
+#: gfs2/convert/gfs2_convert.c:1476
+msgid "An error occurred while reading the journal index file.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:961
-msgid "Root directory copied from the journal.\n"
+#: gfs2/convert/gfs2_convert.c:1486
+msgid "journal inode size invalid\n"
msgstr ""
-#: gfs2/fsck/initialize.c:969 gfs2/fsck/initialize.c:1180
-#, c-format
-msgid "Found the root directory at: 0x%llx\n"
+#: gfs2/convert/gfs2_convert.c:1535 gfs2/convert/gfs2_convert.c:1557
+#: gfs2/convert/gfs2_convert.c:1563 gfs2/convert/gfs2_convert.c:1574
+#: gfs2/convert/gfs2_convert.c:1580 gfs2/convert/gfs2_convert.c:2222
+msgid "Error: Bad constants (1)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:985 gfs2/fsck/initialize.c:1146
+#: gfs2/convert/gfs2_convert.c:1591
#, c-format
-msgid "Found a possible root at: 0x%llx\n"
+msgid "Error: %s does not look like a gfs1 filesystem.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1039
+#: gfs2/convert/gfs2_convert.c:1600
#, c-format
-msgid "boff:%d bsize2:%d rg:0x%llx, rb:0x%llx\n"
+msgid "Could not read resource group index: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1054
+#: gfs2/convert/gfs2_convert.c:1607
#, c-format
-msgid "Block size determined to be: %d\n"
+msgid "Could not read journal index: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1103
-msgid ""
-"Gathering information to repair the gfs2 superblock. This may take some "
-"time.\n"
+#: gfs2/convert/gfs2_convert.c:1621
+#, c-format
+msgid "Examining file system"
msgstr ""
-#: gfs2/fsck/initialize.c:1110
-msgid "Block size not apparent; checking elsewhere.\n"
+#: gfs2/convert/gfs2_convert.c:1623
+msgid "Unable to fill in resource group information.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1122
-msgid ""
-"Unable to determine the block size; this does not look like a gfs2 file "
-"system.\n"
+#: gfs2/convert/gfs2_convert.c:1630
+#, c-format
+msgid "%d rgs found.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1132
-msgid "Unable to locate the system master directory.\n"
+#: gfs2/convert/gfs2_convert.c:1639
+#, c-format
+msgid "This program will convert a gfs1 filesystem to a gfs2 filesystem.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1138
-msgid "Unable to locate the root directory.\n"
+#: gfs2/convert/gfs2_convert.c:1641
+#, c-format
+msgid ""
+"WARNING: This can't be undone. It is strongly advised that you:\n"
+"\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1142
-msgid "Can't find any dinodes that might be the root; using master - 1.\n"
+#: gfs2/convert/gfs2_convert.c:1643
+#, c-format
+msgid " 1. Back up your entire filesystem first.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1154
-msgid "The root dinode block is destroyed.\n"
+#: gfs2/convert/gfs2_convert.c:1644
+#, c-format
+msgid " 2. Run fsck.gfs2 first to ensure filesystem integrity.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1155
-msgid ""
-"At this point I recommend reinitializing it.\n"
-"Hopefully everything will later be put into lost+found.\n"
+#: gfs2/convert/gfs2_convert.c:1645
+#, c-format
+msgid " 3. Make sure the filesystem is NOT mounted from any node.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1159
-msgid "Okay to reinitialize the root dinode? (y/n)"
+#: gfs2/convert/gfs2_convert.c:1646
+#, c-format
+msgid " 4. Make sure you have the latest software versions.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1161
-msgid "The root dinode was not reinitialized; aborting.\n"
+#: gfs2/convert/gfs2_convert.c:1654
+#, c-format
+msgid "gfs2_convert version %s (built %s %s)\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1173
-msgid "Okay to fix the GFS2 superblock? (y/n)"
+#: gfs2/convert/gfs2_convert.c:1665
+#, c-format
+msgid ""
+"\n"
+"Usage:\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1189
+#: gfs2/convert/gfs2_convert.c:1666
+#, c-format
msgid ""
-"GFS2 superblock not fixed; fsck cannot proceed without a valid superblock.\n"
+"%s [-hnqvVy] <device>\n"
+"\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1211 gfs2/mkfs/main_grow.c:351
-msgid "Initializing lists...\n"
+#: gfs2/convert/gfs2_convert.c:1668
+#, c-format
+msgid "\th - print this help message\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1221
-msgid "GFS superblock is larger than the blocksize!\n"
+#: gfs2/convert/gfs2_convert.c:1669
+#, c-format
+msgid "\tn - assume 'no' to all questions\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1227
-msgid "Bad constants (1)\n"
+#: gfs2/convert/gfs2_convert.c:1670
+#, c-format
+msgid "\tq - quieter output\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1354
-msgid "The gfs2 system rindex inode is missing. Okay to rebuild it? (y/n) "
+#: gfs2/convert/gfs2_convert.c:1671
+#, c-format
+msgid "\tv - more verbose output\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1356
-msgid "Error: Cannot proceed without a valid rindex.\n"
+#: gfs2/convert/gfs2_convert.c:1672
+#, c-format
+msgid "\tV - print version information\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1360
+#: gfs2/convert/gfs2_convert.c:1673
#, c-format
-msgid "Error %d rebuilding rindex\n"
+msgid "\ty - assume 'yes' to all questions\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1385
-msgid "The gfs2 system jindex inode is missing. Okay to rebuild it? (y/n) "
+#: gfs2/convert/gfs2_convert.c:1713
+#, c-format
+msgid "Parameter not understood: %c\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1387
-msgid "Error: cannot proceed without a valid jindex file.\n"
+#: gfs2/convert/gfs2_convert.c:1777
+msgid "Converting journal space to rg space.\n"
+msgstr ""
+
+#: gfs2/convert/gfs2_convert.c:1799
+msgid "Error: No suitable rg found for journal.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1401
+#: gfs2/convert/gfs2_convert.c:1802
#, c-format
-msgid "Error %d rebuilding jindex\n"
+msgid "Addr 0x%llx comes after rg at addr 0x%llx\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1408
-msgid "Unable to read in jindex inode.\n"
+#: gfs2/convert/gfs2_convert.c:1843
+msgid "gfs2_convert: Error converting bitmaps.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1435
+#: gfs2/convert/gfs2_convert.c:1873
#, c-format
-msgid "Unable to open device: %s\n"
+msgid ""
+"\n"
+"Next Inum: %llu\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1481
-msgid "Unable to block other mounters\n"
+#: gfs2/convert/gfs2_convert.c:1905
+msgid "Removing obsolete GFS1 file system structures.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1533
-msgid ""
-"\n"
-"Journal recovery complete.\n"
+#: gfs2/convert/gfs2_convert.c:1945
+#, c-format
+msgid "Writing journal #%d..."
msgstr ""
-#: gfs2/fsck/initialize.c:1545
+#: gfs2/convert/gfs2_convert.c:1953
#, c-format
-msgid "Device %s is busy.\n"
+msgid "done.\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1553
-msgid "Unable to unblock other mounters - manual intervention required\n"
+#: gfs2/convert/gfs2_convert.c:2072
+#, c-format
+msgid "Couldn't lookup new quota file: %d\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1554
-msgid "Use 'gfs2_tool sb <device> proto' to fix\n"
+#: gfs2/convert/gfs2_convert.c:2079
+#, c-format
+msgid "Couldn't lookup old quota file: %s\n"
msgstr ""
-#: gfs2/fsck/initialize.c:1556
-msgid "Syncing the device.\n"
+#: gfs2/convert/gfs2_convert.c:2111
+#, c-format
+msgid "Convert %s from GFS1 to GFS2? (y/n)"
msgstr ""
-#: gfs2/fsck/initialize.c:1567
-msgid "fsck.gfs2: Non-fatal error dropping caches.\n"
+#: gfs2/convert/gfs2_convert.c:2122
+#, c-format
+msgid "Bad response '%s', please type 'y' or 'n'.\n"
msgstr ""
-#: gfs2/fsck/inode_hash.c:52
-msgid "Unable to allocate inode_info structure\n"
+#: gfs2/convert/gfs2_convert.c:2152
+#, c-format
+msgid "%s not converted.\n"
msgstr ""
-#: gfs2/fsck/inode_hash.c:56
-msgid "Error while zeroing inode_info structure\n"
+#: gfs2/convert/gfs2_convert.c:2161
+msgid "Converting resource groups."
msgstr ""
-#: gfs2/fsck/link.c:43
+#: gfs2/convert/gfs2_convert.c:2166
#, c-format
-msgid "Dir (0x%llx) incremented counted links to %u for (0x%llx) via %s\n"
+msgid "%s: Unable to convert resource groups.\n"
msgstr ""
-#: gfs2/fsck/link.c:50
+#: gfs2/convert/gfs2_convert.c:2178
#, c-format
-msgid "Ref: (0x%llx) No match found when incrementing link for (0x%llx)!\n"
+msgid ""
+"\n"
+"%s: Error renumbering inodes.\n"
msgstr ""
-#: gfs2/fsck/link.c:74
+#: gfs2/convert/gfs2_convert.c:2191
#, c-format
-msgid "Dir (0x%llx)'s link to (0x%llx) via %s is zero!\n"
+msgid ""
+"\n"
+"%s: Error fixing directories.\n"
msgstr ""
-#: gfs2/fsck/link.c:81
+#: gfs2/convert/gfs2_convert.c:2198
#, c-format
-msgid "Dir (0x%llx) decremented counted links to %u for (0x%llx) via %s\n"
+msgid "\r%llu cdpn symlinks moved to empty directories."
msgstr ""
-#: gfs2/fsck/link.c:88
+#: gfs2/convert/gfs2_convert.c:2202
#, c-format
-msgid "No match found when decrementing link for (0x%llx)!\n"
+msgid ""
+"\n"
+"%s: Error fixing cdpn symlinks.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:26
-#, c-format
+#: gfs2/convert/gfs2_convert.c:2208
msgid ""
-"Adding .. entry to directory %llu (0x%llx) pointing back to lost+found\n"
+"\n"
+"Converting journals.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:37
+#: gfs2/convert/gfs2_convert.c:2211
#, c-format
-msgid "Directory %lld (0x%llx) already had a \"..\" link to %lld (0x%llx).\n"
+msgid "%s: Error converting journal space.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:44
-msgid ".. unlinked, moving to lost+found"
+#: gfs2/convert/gfs2_convert.c:2233
+#, c-format
+msgid ""
+"Reduced journal size to %u MB to accommodate GFS2 file system structures.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:49
+#: gfs2/convert/gfs2_convert.c:2241
#, c-format
-msgid "Decrementing its links to %d\n"
+msgid "Error: could not build jindex: %s\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:53
-msgid "Its link count is zero.\n"
+#: gfs2/convert/gfs2_convert.c:2244
+msgid "Building GFS2 file system structures.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:55
+#: gfs2/convert/gfs2_convert.c:2248
#, c-format
-msgid "Its link count is %d! Changing it to 0.\n"
+msgid "Error building per-node directories: %s\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:65
+#: gfs2/convert/gfs2_convert.c:2255
#, c-format
-msgid ""
-"Couldn't find a valid \"..\" entry for orphan directory %lld (0x%llx): '..' "
-"= 0x%llx\n"
+msgid "Error building inum inode: %s\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:72
+#: gfs2/convert/gfs2_convert.c:2263
#, c-format
-msgid "Couldn't find directory %lld (0x%llx) in directory tree.\n"
+msgid "Error building statfs inode: %s\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:78
-msgid "add_inode_to_lf: Unable to remove \"..\" directory entry.\n"
+#: gfs2/convert/gfs2_convert.c:2273
+#, c-format
+msgid "Error building rindex inode: %s\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:84
+#: gfs2/convert/gfs2_convert.c:2280
#, c-format
-msgid "Error adding .. directory: %s\n"
+msgid "Error building quota inode: %s\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:150
-msgid "Locating/Creating lost+found directory\n"
+#: gfs2/convert/gfs2_convert.c:2308
+msgid "Committing changes to disk.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:165
+#: gfs2/convert/gfs2_convert.c:2324
#, c-format
-msgid "Error creating lost+found: %s\n"
+msgid "%s: filesystem converted successfully to gfs2.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:187
-msgid "lost+found dinode"
+#: gfs2/fsck/inode_hash.c:51
+msgid "Unable to allocate inode_info structure\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:191
-msgid "root"
+#: gfs2/fsck/inode_hash.c:55
+msgid "Error while zeroing inode_info structure\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:202
-#, c-format
-msgid "lost+found directory is dinode %lld (0x%llx)\n"
+#: gfs2/fsck/initialize.c:113
+msgid "Freeing buffers.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:207
-msgid "Marking lost+found inode connected\n"
+#: gfs2/fsck/initialize.c:143
+msgid "Setting block ranges...\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:213
-msgid "Trying to add lost+found to itself...skipping"
+#: gfs2/fsck/initialize.c:158
+msgid "This file system is too big for this computer to handle.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:270 gfs2/fsck/pass2.c:679 gfs2/fsck/pass2.c:899
-#: gfs2/fsck/pass3.c:60
+#: gfs2/fsck/initialize.c:159
#, c-format
-msgid "Error adding directory %s: %s\n"
+msgid "Last fs block = 0x%llx, but sizeof(unsigned long) is %zu bytes.\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:281
-msgid "from lost+found"
+#: gfs2/fsck/initialize.c:169
+#, c-format
+msgid "Can't seek to last block in file system: %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:285
-msgid "to lost+found"
+#: gfs2/fsck/initialize.c:178
+#, c-format
+msgid ""
+"Can't read last block in file system (error %u), last_fs_block: %llu (0x"
+"%llx)\n"
msgstr ""
-#: gfs2/fsck/lost_n_found.c:287
+#: gfs2/fsck/initialize.c:251
#, c-format
-msgid "Added inode #%llu (0x%llx) to lost+found\n"
+msgid "Free metadata block 0x%llx found.\n"
msgstr ""
-#: gfs2/fsck/main.c:58
+#: gfs2/fsck/initialize.c:255
#, c-format
-msgid "GFS2 fsck %s (built %s %s)\n"
+msgid "Unlinked dinode 0x%llx found.\n"
msgstr ""
-#: gfs2/fsck/main.c:103 gfs2/fsck/main.c:114 gfs2/mkfs/main_grow.c:109
-#: gfs2/mkfs/main_jadd.c:138 gfs2/mkfs/main_mkfs.c:185
+#: gfs2/fsck/initialize.c:263
#, c-format
-msgid "Please use '-h' for help.\n"
+msgid "Okay to reclaim free metadata in resource group %lld (0x%llx)? (y/n)"
msgstr ""
-#: gfs2/fsck/main.c:106 gfs2/mkfs/main_grow.c:112
+#: gfs2/fsck/initialize.c:284
#, c-format
-msgid "Invalid option %c\n"
+msgid "Free metadata block %lld (0x%llx) reclaimed.\n"
msgstr ""
-#: gfs2/fsck/main.c:118
+#: gfs2/fsck/initialize.c:295
#, c-format
-msgid "No device specified (Please use '-h' for help)\n"
+msgid "%lld blocks (total) may need to be freed in pass 5.\n"
msgstr ""
-#: gfs2/fsck/main.c:130
+#: gfs2/fsck/initialize.c:319
#, c-format
-msgid "progress unknown.\n"
+msgid "The rgrp at %lld (0x%llx) was cleaned of %d free metadata blocks.\n"
msgstr ""
-#: gfs2/fsck/main.c:132
+#: gfs2/fsck/initialize.c:328
#, c-format
-msgid "processing block %llu out of %llu\n"
+msgid ""
+"Error: resource group %lld (0x%llx): free space (%d) does not match bitmap "
+"(%d)\n"
msgstr ""
-#: gfs2/fsck/main.c:137
-msgid ""
-"Do you want to abort gfs2_fsck, skip the rest of this pass or continue (a/s/"
-"c)?"
+#: gfs2/fsck/initialize.c:333
+msgid "Fix the rgrp free blocks count? (y/n)"
msgstr ""
-#: gfs2/fsck/main.c:187
-msgid "The statfs file is accurate.\n"
+#: gfs2/fsck/initialize.c:341 gfs2/fsck/initialize.c:357
+msgid "The rgrp was fixed.\n"
msgstr ""
-#: gfs2/fsck/main.c:190
+#: gfs2/fsck/initialize.c:343 gfs2/fsck/initialize.c:359
+msgid "The rgrp was not fixed.\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:348
+#, c-format
msgid ""
-"The statfs file is wrong:\n"
-"\n"
+"Error: resource group %lld (0x%llx): free meta (%d) does not match bitmap "
+"(%d)\n"
msgstr ""
-#: gfs2/fsck/main.c:191
-msgid "Current statfs values:\n"
+#: gfs2/fsck/initialize.c:353
+msgid "Fix the rgrp free meta blocks count? (y/n)"
msgstr ""
-#: gfs2/fsck/main.c:192 gfs2/fsck/main.c:203
-#, c-format
-msgid "blocks: %lld (0x%llx)\n"
+#: gfs2/fsck/initialize.c:386
+msgid "Checking the integrity of all resource groups.\n"
msgstr ""
-#: gfs2/fsck/main.c:195 gfs2/fsck/main.c:206
+#: gfs2/fsck/initialize.c:404
#, c-format
-msgid "free: %lld (0x%llx)\n"
+msgid ""
+"RGs: Consistent: %d Cleaned: %d Inconsistent: %d Fixed: %d Total: "
+"%d\n"
msgstr ""
-#: gfs2/fsck/main.c:198
+#: gfs2/fsck/initialize.c:409
#, c-format
msgid ""
-"dinodes: %lld (0x%llx)\n"
-"\n"
+"%lld blocks may need to be freed in pass 5 due to the cleaned resource "
+"groups.\n"
msgstr ""
-#: gfs2/fsck/main.c:202
-msgid "Calculated statfs values:\n"
+#: gfs2/fsck/initialize.c:424
+msgid "The system master directory seems to be destroyed.\n"
msgstr ""
-#: gfs2/fsck/main.c:209
-#, c-format
-msgid "dinodes: %lld (0x%llx)\n"
+#: gfs2/fsck/initialize.c:425
+msgid "Okay to rebuild it? (y/n)"
msgstr ""
-#: gfs2/fsck/main.c:214
-msgid "Okay to fix the master statfs file? (y/n)"
+#: gfs2/fsck/initialize.c:426
+msgid "System master not rebuilt; aborting.\n"
msgstr ""
-#: gfs2/fsck/main.c:215
-msgid "The statfs file was not fixed.\n"
+#: gfs2/fsck/initialize.c:429
+msgid "Trying to rebuild the master directory.\n"
msgstr ""
-#: gfs2/fsck/main.c:220
-msgid "The statfs file was fixed.\n"
+#: gfs2/fsck/initialize.c:435
+#, c-format
+msgid "Error reading master: %s\n"
msgstr ""
-#: gfs2/fsck/main.c:249
+#: gfs2/fsck/initialize.c:446
#, c-format
-msgid "Starting %s\n"
+msgid "Error %d adding jindex directory\n"
msgstr ""
-#: gfs2/fsck/main.c:255
+#: gfs2/fsck/initialize.c:453
#, c-format
-msgid "%s interrupted \n"
+msgid "Error %d building jindex\n"
msgstr ""
-#: gfs2/fsck/main.c:258
+#: gfs2/fsck/initialize.c:464
#, c-format
-msgid "%s complete \n"
+msgid "Error %d adding per_node directory\n"
msgstr ""
-#: gfs2/fsck/main.c:280
-msgid "Initializing fsck\n"
+#: gfs2/fsck/initialize.c:472
+#, c-format
+msgid "Error %d building per_node directory\n"
msgstr ""
-#: gfs2/fsck/main.c:285
+#: gfs2/fsck/initialize.c:484
#, c-format
-msgid "%s: clean.\n"
+msgid "Error %d adding inum inode\n"
msgstr ""
-#: gfs2/fsck/main.c:315
-msgid "Writing changes to disk\n"
+#: gfs2/fsck/initialize.c:490
+#, c-format
+msgid "Error %d building inum inode\n"
msgstr ""
-#: gfs2/fsck/main.c:318
-msgid "gfs2_fsck complete\n"
+#: gfs2/fsck/initialize.c:502
+#, c-format
+msgid "Error %d adding statfs inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:40
+#: gfs2/fsck/initialize.c:508
#, c-format
-msgid ""
-"Block %llu (0x%llx) is not represented in the system bitmap; part of an rgrp "
-"or superblock.\n"
+msgid "Error %d building statfs inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:54
+#: gfs2/fsck/initialize.c:520
#, c-format
-msgid "Block %llu (0x%llx) was '%s', should be %s.\n"
+msgid "Error %d adding rindex inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:58
-msgid "Fix the bitmap? (y/n)"
+#: gfs2/fsck/initialize.c:526
+#, c-format
+msgid "Error %d building rindex inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:95
-msgid "The bitmap was fixed.\n"
+#: gfs2/fsck/initialize.c:537
+#, c-format
+msgid "Error %d adding quota inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:97
-msgid "The bitmap inconsistency was ignored.\n"
+#: gfs2/fsck/initialize.c:543
+#, c-format
+msgid "Error %d building quota inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:132
-#, c-format
-msgid "(%s:%d) %s inode found at block (0x%llx): marking as '%s'\n"
+#: gfs2/fsck/initialize.c:548
+msgid "Master directory rebuilt.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:143 gfs2/fsck/metawalk.c:154
-#, c-format
-msgid "(%s:%d) inode (0x%llx) references %s block (0x%llx): marking as '%s'\n"
+#: gfs2/fsck/initialize.c:577
+msgid ""
+"The gfs2 system per_node directory inode is missing, so we might not be \n"
+"able to rebuild missing journals this run.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:169
-msgid "This block is not represented in the bitmap.\n"
+#: gfs2/fsck/initialize.c:583
+msgid ""
+"The gfs2 system per_node directory inode is missing. Okay to rebuild it? (y/"
+"n) "
msgstr ""
-#: gfs2/fsck/metawalk.c:360
+#: gfs2/fsck/initialize.c:589
#, c-format
-msgid "Checking leaf %llu (0x%llu)\n"
+msgid "Error %d rebuilding per_node directory\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:365
-#, c-format
-msgid "Invalid directory type %d specified\n"
+#: gfs2/fsck/initialize.c:596
+msgid "Unable to rebuild per_node; aborting.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:383
-#, c-format
-msgid ""
-"Directory block %llu (0x%llx), entry %d of directory %llu (0x%llx) is "
-"corrupt.\n"
+#: gfs2/fsck/initialize.c:610
+msgid "Checking if all rgrp and rindex values are good"
msgstr ""
-#: gfs2/fsck/metawalk.c:391
-msgid "Attempt to repair it? (y/n) "
+#: gfs2/fsck/initialize.c:611
+msgid "Checking if rindex values may be easily repaired"
msgstr ""
-#: gfs2/fsck/metawalk.c:398
-msgid ""
-"Unable to repair corrupt directory entry; the entry was removed instead.\n"
+#: gfs2/fsck/initialize.c:612
+msgid "Calculating where the rgrps should be if evenly spaced"
msgstr ""
-#: gfs2/fsck/metawalk.c:404
-msgid "Corrupt directory entry repaired.\n"
+#: gfs2/fsck/initialize.c:613
+msgid "Trying to rebuild rindex assuming evenly spaced rgrps"
msgstr ""
-#: gfs2/fsck/metawalk.c:409 gfs2/fsck/metawalk.c:432
-#, c-format
-msgid "Corrupt directory entry ignored, stopped after checking %d entries.\n"
+#: gfs2/fsck/initialize.c:614
+msgid "Trying to rebuild rindex assuming unevenly spaced rgrps"
msgstr ""
-#: gfs2/fsck/metawalk.c:417
-msgid "First dirent is a sentinel (place holder).\n"
+#: gfs2/fsck/initialize.c:617
+msgid "Some damage was found; we need to take remedial measures"
msgstr ""
-#: gfs2/fsck/metawalk.c:420
-#, c-format
-msgid ""
-"Directory entry with inode number of zero in leaf %llu (0x%llx) of directory "
-"%llu (0x%llx)!\n"
+#: gfs2/fsck/initialize.c:618
+msgid "rindex is unevenly spaced: either gfs1-style or corrupt"
msgstr ""
-#: gfs2/fsck/metawalk.c:427
-msgid "Attempt to remove it? (y/n) "
+#: gfs2/fsck/initialize.c:619
+msgid "rindex calculations don't match: uneven rgrp boundaries"
msgstr ""
-#: gfs2/fsck/metawalk.c:429
-msgid "The corrupt directory entry was removed.\n"
+#: gfs2/fsck/initialize.c:620
+msgid "Too many rgrp misses: rgrps must be unevenly spaced"
msgstr ""
-#: gfs2/fsck/metawalk.c:441
-msgid "First dirent is a Sentinel (place holder).\n"
+#: gfs2/fsck/initialize.c:621
+msgid "Too much damage found: we cannot rebuild this rindex"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:626
+msgid "Validating Resource Group index.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:461
+#: gfs2/fsck/initialize.c:630
#, c-format
-msgid "Last entry processed for %lld->%lld (0x%llx->0x%llx).\n"
+msgid "Level %d rgrp check: %s.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:493
+#: gfs2/fsck/initialize.c:634
#, c-format
-msgid "Directory Inode %llu (0x%llx) points to leaf %llu (0x%llx) %s.\n"
+msgid "(level %d passed)\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:501
-msgid "Attempt to patch around it? (y/n) "
+#: gfs2/fsck/initialize.c:638
+#, c-format
+msgid "(level %d failed: %s)\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:506
+#: gfs2/fsck/initialize.c:641
#, c-format
-msgid "Directory Inode %llu (0x%llx) repaired.\n"
+msgid "(level %d failed at block %lld (0x%llx): %s)\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:510
-msgid "Bad leaf left in place.\n"
+#: gfs2/fsck/initialize.c:651
+msgid "Resource Group recovery impossible; I can't fix this file system.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:534
+#: gfs2/fsck/initialize.c:655
#, c-format
-msgid ""
-"Leaf block #%llu (0x%llx) is out of range for directory #%llu (0x%llx).\n"
+msgid "%u resource groups found.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:540
-msgid "that is out of range"
+#: gfs2/fsck/initialize.c:678
+msgid "Initializing special inodes...\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:548
-msgid "that is not really a leaf"
+#: gfs2/fsck/initialize.c:696
+msgid "The gfs2 system inum inode is missing. Okay to rebuild it? (y/n) "
msgstr ""
-#: gfs2/fsck/metawalk.c:554
-#, c-format
-msgid ""
-"Previous reference to leaf %lld (0x%llx) has already checked it; skipping.\n"
+#: gfs2/fsck/initialize.c:698
+msgid "fsck.gfs2 cannot continue without a valid inum file; aborting.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:569
+#: gfs2/fsck/initialize.c:704
#, c-format
-msgid "incorrect lf_dirent_format at leaf #%<PRIu64>\n"
+msgid "Error %d rebuilding inum inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:573
-msgid "Fixing lf_dirent_format.\n"
+#: gfs2/fsck/initialize.c:720
+#, c-format
+msgid "Error %d reading system inum inode. Aborting.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:578
+#: gfs2/fsck/initialize.c:731
#, c-format
-msgid "Inode %llu (0x%llx) points to bad leaf %llu (0x%llx).\n"
+msgid "Error reading statfs inode: %s\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:584
-msgid "that is not a leaf"
+#: gfs2/fsck/initialize.c:737
+msgid "The gfs2 system statfs inode is missing. Okay to rebuild it? (y/n) "
msgstr ""
-#: gfs2/fsck/metawalk.c:606
-#, c-format
-msgid ""
-"Leaf %llu (0x%llx) entry count in directory %llu (0x%llx) does not match "
-"number of entries found - is %u, found %u\n"
+#: gfs2/fsck/initialize.c:739 gfs2/fsck/initialize.c:751
+msgid "fsck.gfs2 cannot continue without a valid statfs file; aborting.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:614
-msgid "Update leaf entry count? (y/n) "
+#: gfs2/fsck/initialize.c:745
+#, c-format
+msgid "Error %d rebuilding statfs inode\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:617
-msgid "Leaf entry count updated\n"
+#: gfs2/fsck/initialize.c:750
+msgid "Rebuild of statfs system file failed."
msgstr ""
-#: gfs2/fsck/metawalk.c:619
-msgid "Leaf entry count left in inconsistant state\n"
+#: gfs2/fsck/initialize.c:763
+#, c-format
+msgid "Error %d reading statfs file. Aborting.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:672
+#: gfs2/fsck/initialize.c:777
#, c-format
-msgid "Directory #%llu (0x%llx) has no valid leaf blocks\n"
+msgid "Error reading quota inode: %s\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:783
+msgid "The gfs2 system quota inode is missing. Okay to rebuild it? (y/n) "
msgstr ""
-#: gfs2/fsck/metawalk.c:722
+#: gfs2/fsck/initialize.c:791
#, c-format
-msgid "Leaf chain (0x%llx) detected.\n"
+msgid "Error %d rebuilding quota inode\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:811
+msgid "Unable to determine the boundaries of the file system.\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:818
+msgid ""
+"This system doesn't have enough memory and swap space to fsck this file "
+"system.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:778
+#: gfs2/fsck/initialize.c:819
#, c-format
-msgid "Bad extended attribute found at block %lld (0x%llx)"
+msgid "Additional memory needed is approximately: %lluMB\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:785
-msgid "Repair the bad Extended Attribute? (y/n) "
+#: gfs2/fsck/initialize.c:821
+msgid ""
+"Please increase your swap space by that amount and run gfs2_fsck again.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:797 gfs2/fsck/metawalk.c:1511 gfs2/fsck/pass1.c:1044
-msgid "extended attribute"
+#: gfs2/fsck/initialize.c:844
+msgid "Lock protocol determined to be: lock_nolock\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:799
-msgid "The EA was fixed.\n"
+#: gfs2/fsck/initialize.c:845
+msgid "Stand-alone file system: No need for a lock table.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:803
-msgid "The bad EA was not fixed.\n"
+#: gfs2/fsck/initialize.c:850
+msgid "Lock protocol assumed to be: "
msgstr ""
-#: gfs2/fsck/metawalk.c:841
+#: gfs2/fsck/initialize.c:865
#, c-format
-msgid "Checking EA leaf block #%llu (0x%llx).\n"
+msgid "Error: Unable to determine cluster name from %s\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:899
+#: gfs2/fsck/initialize.c:876
#, c-format
-msgid ""
-"Removing duplicate status of block %llu (0x%llx) referenced as %s by dinode "
-"%llu (0x%llx)\n"
+msgid "Lock table determined to be: %s\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:906
-msgid "This leaves only one reference: it's no longer a duplicate.\n"
+#: gfs2/fsck/initialize.c:915
+#, c-format
+msgid "Found system master directory at: 0x%llx.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:910
+#: gfs2/fsck/initialize.c:930
#, c-format
-msgid "%d block reference(s) remain.\n"
+msgid "Found system jindex file at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:951
+#: gfs2/fsck/initialize.c:944 gfs2/fsck/initialize.c:1261
#, c-format
-msgid ""
-"%s block %lld (0x%llx), part of inode %lld (0x%llx), was already free.\n"
+msgid "Found system master directory at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:980
+#: gfs2/fsck/initialize.c:956
#, c-format
-msgid "Checking EA indirect block #%llu (0x%llx).\n"
+msgid "Found system per_node directory at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1002
-msgid "Fix the indirect block too? (y/n) "
+#: gfs2/fsck/initialize.c:963
+#, c-format
+msgid "From per_node's '..' I backtracked the master directory to: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1071
+#: gfs2/fsck/initialize.c:969
#, c-format
-msgid "Extended attributes exist for inode #%llu (0x%llx).\n"
+msgid "Unknown system directory at block 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1193
+#: gfs2/fsck/initialize.c:976
#, c-format
-msgid "Skipping block %llu (0x%llx)\n"
+msgid "Found system inum file at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1199
+#: gfs2/fsck/initialize.c:982
#, c-format
-msgid "Skipping invalid block %lld (0x%llx)\n"
+msgid "Found system statfs file at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1372
+#: gfs2/fsck/initialize.c:988
#, c-format
-msgid ""
-"\rLarge file at %lld (0x%llx) - 100 percent "
-"complete. \n"
+msgid "Found system rindex file at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1448
+#: gfs2/fsck/initialize.c:996
#, c-format
-msgid "Removing dentry %llu (0x%llx) from directory %llu (0x%llx)\n"
+msgid "Found system quota file at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1453
-msgid "Parent directory is invalid\n"
+#: gfs2/fsck/initialize.c:1024
+#, c-format
+msgid "Found the root directory at: 0x%llx.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1461
-msgid "Parent block is not a directory...ignoring\n"
+#: gfs2/fsck/initialize.c:1029
+#, c-format
+msgid ""
+"The root dinode should be at block 0x%llx but it seems to be destroyed.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1474 gfs2/fsck/pass1.c:1016
-msgid "metadata"
+#: gfs2/fsck/initialize.c:1032
+#, c-format
+msgid "Found a copy of the root directory in a journal at block: 0x%llx.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1479 gfs2/fsck/pass1.c:1022
-msgid "leaf"
+#: gfs2/fsck/initialize.c:1035
+msgid "Do you want to replace the root dinode from the copy? (y/n)"
msgstr ""
-#: gfs2/fsck/metawalk.c:1484 gfs2/fsck/pass1.c:563 gfs2/fsck/pass1.c:583
-#: gfs2/fsck/pass1.c:1028
-msgid "data"
+#: gfs2/fsck/initialize.c:1037
+msgid "Damaged root dinode not fixed.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1493 gfs2/fsck/pass1.c:1036
-msgid "indirect extended attribute"
+#: gfs2/fsck/initialize.c:1044
+msgid "Root directory copied from the journal.\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1534
+#: gfs2/fsck/initialize.c:1056 gfs2/fsck/initialize.c:1271
#, c-format
-msgid ""
-"%s reference to new metadata block %lld (0x%llx) is now marked as indirect.\n"
+msgid "Found the root directory at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1553
+#: gfs2/fsck/initialize.c:1072 gfs2/fsck/initialize.c:1233
#, c-format
-msgid "%s reference to new data block %lld (0x%llx) is now marked as data.\n"
-msgstr ""
-
-#: gfs2/fsck/metawalk.c:1571
-msgid "newly allocated leaf"
+msgid "Found a possible root at: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1611
+#: gfs2/fsck/initialize.c:1126
#, c-format
-msgid "%s had blocks added; reprocessing its metadata tree at height=%d.\n"
+msgid "boff:%d bsize2:%d rg:0x%llx, rb:0x%llx\n"
msgstr ""
-#: gfs2/fsck/metawalk.c:1615
+#: gfs2/fsck/initialize.c:1141
#, c-format
-msgid "Error %d reprocessing the %s metadata tree.\n"
+msgid "Block size determined to be: %d\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:159
-#, c-format
+#: gfs2/fsck/initialize.c:1190
msgid ""
-"Duplicate block %llu (0x%llx) is in file or directory %llu (0x%llx) named "
-"%s\n"
+"Gathering information to repair the gfs2 superblock. This may take some "
+"time.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:229
-msgid "no longer valid"
+#: gfs2/fsck/initialize.c:1197
+msgid "Block size not apparent; checking elsewhere.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:235
-#, c-format
+#: gfs2/fsck/initialize.c:1209
msgid ""
-"Not clearing duplicate reference in inode \"%s\" at block #%llu (0x%llx) to "
-"block #%llu (0x%llx) because it's valid for another inode.\n"
+"Unable to determine the block size; this does not look like a gfs2 file "
+"system.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:238
-msgid "unknown name"
+#: gfs2/fsck/initialize.c:1219
+msgid "Unable to locate the system master directory.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:242
-#, c-format
-msgid "Inode %s is in directory %llu (0x%llx)\n"
+#: gfs2/fsck/initialize.c:1225
+msgid "Unable to locate the root directory.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:344
-#, c-format
-msgid "Block %lld (0x%llx) is not gfs2 metadata.\n"
+#: gfs2/fsck/initialize.c:1229
+msgid "Can't find any dinodes that might be the root; using master - 1.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:416 gfs2/fsck/pass1b.c:469
-msgid "Invalid "
+#: gfs2/fsck/initialize.c:1241
+msgid "The root dinode block is destroyed.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:417
-#, c-format
+#: gfs2/fsck/initialize.c:1242
msgid ""
-"Inode %s (%lld/0x%llx) has %d reference(s) to block %llu (0x%llx) (%s)\n"
+"At this point I recommend reinitializing it.\n"
+"Hopefully everything will later be put into lost+found.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:497
-#, c-format
-msgid ""
-"Inode %s (%lld/0x%llx) references block %llu (0x%llx) as '%s', but the block "
-"is really %s.\n"
+#: gfs2/fsck/initialize.c:1246
+msgid "Okay to reinitialize the root dinode? (y/n)"
msgstr ""
-#: gfs2/fsck/pass1b.c:505
-#, c-format
-msgid "Okay to delete %s inode %lld (0x%llx)? (y/n) "
+#: gfs2/fsck/initialize.c:1248
+msgid "The root dinode was not reinitialized; aborting.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:507
-msgid "invalidated"
+#: gfs2/fsck/initialize.c:1260
+msgid "Okay to fix the GFS2 superblock? (y/n)"
msgstr ""
-#: gfs2/fsck/pass1b.c:510
-msgid "The bad inode was not cleared."
+#: gfs2/fsck/initialize.c:1266
+#, c-format
+msgid "Error reading master inode: %s\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:519
+#: gfs2/fsck/initialize.c:1276
#, c-format
-msgid "Clearing inode %lld (0x%llx)...\n"
+msgid "Error reading root inode: %s\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:536
-msgid "duplicate referencing bad"
+#: gfs2/fsck/initialize.c:1284
+msgid ""
+"GFS2 superblock not fixed; fsck cannot proceed without a valid superblock.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:574
-#, c-format
-msgid ""
-"Block %llu (0x%llx) has %d inodes referencing it for a total of %d duplicate "
-"references:\n"
+#: gfs2/fsck/initialize.c:1316
+msgid "GFS superblock is larger than the blocksize!\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:632
-#, c-format
-msgid ""
-"----------------------------------------------\n"
-"Step 1: Eliminate references to block %llu (0x%llx) that were previously "
-"marked invalid.\n"
+#: gfs2/fsck/initialize.c:1322
+msgid "Bad constants (1)\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:648
-#, c-format
-msgid ""
-"----------------------------------------------\n"
-"Step 2: Eliminate references to block %llu (0x%llx) that need the wrong "
-"block type.\n"
+#: gfs2/fsck/initialize.c:1449
+msgid "The gfs2 system rindex inode is missing. Okay to rebuild it? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1b.c:663
-#, c-format
-msgid ""
-"----------------------------------------------\n"
-"Step 3: Choose one reference to block %llu (0x%llx) to keep.\n"
+#: gfs2/fsck/initialize.c:1451
+msgid "Error: Cannot proceed without a valid rindex.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:674
+#: gfs2/fsck/initialize.c:1455
#, c-format
-msgid "Block %llu (0x%llx) has no more references; Marking as 'free'.\n"
+msgid "Error %d rebuilding rindex\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:685
+#: gfs2/fsck/initialize.c:1480
+msgid "The gfs2 system jindex inode is missing. Okay to rebuild it? (y/n) "
+msgstr ""
+
+#: gfs2/fsck/initialize.c:1482
+msgid "Error: cannot proceed without a valid jindex file.\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:1496
#, c-format
-msgid "Block %llu (0x%llx) has only one remaining reference.\n"
+msgid "Error %d rebuilding jindex\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:696
+#: gfs2/fsck/initialize.c:1503
+msgid "Unable to read in jindex inode.\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:1530
#, c-format
-msgid ""
-"----------------------------------------------\n"
-"Step 4. Set block type based on the remaining reference in inode %lld (0x"
-"%llx).\n"
+msgid "Unable to open device: %s\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:705
+#: gfs2/fsck/initialize.c:1576
+msgid "Unable to block other mounters\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:1596
#, c-format
+msgid "Error reading master directory: %s\n"
+msgstr ""
+
+#: gfs2/fsck/initialize.c:1632
msgid ""
-"The remaining reference inode %lld (0x%llx) is marked invalid: Marking the "
-"block as free.\n"
+"\n"
+"Journal recovery complete.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:711 gfs2/fsck/pass1b.c:722
-msgid "reference-repaired leaf"
+#: gfs2/fsck/initialize.c:1644
+#, c-format
+msgid "Device %s is busy.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:717
-msgid "reference-repaired data"
+#: gfs2/fsck/initialize.c:1652
+msgid "Unable to unblock other mounters - manual intervention required\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:726
-msgid "reference-repaired indirect"
+#: gfs2/fsck/initialize.c:1653
+msgid "Use 'gfs2_tool sb <device> proto' to fix\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:731
-msgid "reference-repaired extended attribute"
+#: gfs2/fsck/initialize.c:1655
+msgid "Syncing the device.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:737
-msgid "All duplicate references were processed.\n"
+#: gfs2/fsck/initialize.c:1666
+msgid "fsck.gfs2: Non-fatal error dropping caches.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:753
-msgid "Looking for duplicate blocks...\n"
+#: gfs2/fsck/pass3.c:38 gfs2/fsck/pass2.c:957
+msgid "Unable to allocate name\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:757
-msgid "No duplicate blocks found\n"
+#: gfs2/fsck/pass3.c:45 gfs2/fsck/pass2.c:963
+msgid "Unable to zero name\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:763
-msgid "Scanning filesystem for inodes containing duplicate blocks...\n"
+#: gfs2/fsck/pass3.c:53
+msgid "Unable to remove \"..\" directory entry.\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:764
-#, c-format
-msgid "Filesystem has %llu (0x%llx) blocks total\n"
+#: gfs2/fsck/pass3.c:55
+msgid "old \"..\""
msgstr ""
-#: gfs2/fsck/pass1b.c:772
+#: gfs2/fsck/pass3.c:60 gfs2/fsck/pass2.c:755 gfs2/fsck/pass2.c:975
+#: gfs2/fsck/lost_n_found.c:270
#, c-format
-msgid "Found all %d original references to duplicates.\n"
+msgid "Error adding directory %s: %s\n"
msgstr ""
-#: gfs2/fsck/pass1b.c:784
+#: gfs2/fsck/pass3.c:67 gfs2/fsck/pass2.c:982
#, c-format
-msgid "Checking invalidated duplicate dinode %lld (0x%llx)\n"
+msgid "Directory at %lld (0x%llx)"
msgstr ""
-#: gfs2/fsck/pass1b.c:799
-msgid "Handling duplicate blocks\n"
+#: gfs2/fsck/pass3.c:72
+msgid "new \"..\""
msgstr ""
-#: gfs2/fsck/pass1.c:129
-msgid "itself"
+#: gfs2/fsck/pass3.c:94
+#, c-format
+msgid "Orphaned directory at block %llu (0x%llx) moved to lost+found\n"
msgstr ""
-#: gfs2/fsck/pass1.c:130
+#: gfs2/fsck/pass3.c:103
#, c-format
msgid ""
-"Bad indirect block pointer (invalid or out of range) found in system inode "
-"%lld (0x%llx).\n"
+"Directory '..' and treewalk connections disagree for inode %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:137 gfs2/fsck/pass1.c:191
-msgid "system file"
+#: gfs2/fsck/pass3.c:107
+#, c-format
+msgid "'..' has %llu (0x%llx), treewalk has %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:172
+#: gfs2/fsck/pass3.c:123
+msgid "Orphaned directory, move to lost+found\n"
+msgstr ""
+
+#: gfs2/fsck/pass3.c:127
#, c-format
-msgid ""
-"Block # referenced by system directory entry %s in inode %lld (0x%llx) is "
-"invalid or out of range; ignored.\n"
+msgid "Treewalk parent is correct, fixing dotdot -> %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:226
-msgid "Error: Cannot allocate memory to fix the leaf pointers.\n"
+#: gfs2/fsck/pass3.c:139
+msgid "Both .. and treewalk parents are directories, going with treewalk...\n"
msgstr ""
-#: gfs2/fsck/pass1.c:234 gfs2/fsck/pass1.c:252
-msgid "Error: bad read while fixing leaf pointers.\n"
+#: gfs2/fsck/pass3.c:147
+msgid ".. parent is valid, but treewalk is bad - reattaching to lost+found"
msgstr ""
-#: gfs2/fsck/pass1.c:301
+#: gfs2/fsck/pass3.c:152 gfs2/fsck/pass2.c:908
#, c-format
msgid ""
-"Directory #%llu (0x%llx) has an invalid number of pointers to leaf #%llu (0x"
-"%llx)\n"
-"\tFound: %u, which is not a factor of 2.\n"
+"Remove directory entry for bad inode %llu (0x%llx) in %llu (0x%llx)? (y/n)"
msgstr ""
-#: gfs2/fsck/pass1.c:308 gfs2/fsck/pass1.c:329
-msgid "Attempt to fix it? (y/n) "
+#: gfs2/fsck/pass3.c:158
+msgid "Directory entry to invalid inode remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:309
-msgid "Directory inode was not fixed.\n"
+#: gfs2/fsck/pass3.c:168
+#, c-format
+msgid "Unable to find dentry for block %llu (0x%llx) in %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:316
-msgid "Directory inode was fixed.\n"
+#: gfs2/fsck/pass3.c:174 gfs2/fsck/pass2.c:930
+msgid "Directory entry removed\n"
msgstr ""
-#: gfs2/fsck/pass1.c:322
-#, c-format
-msgid ""
-"Directory #%llu (0x%llx) has an incorrect number of pointers to leaf #%llu "
-"(0x%llx)\n"
-"\tFound: %u, Expected: %u\n"
+#: gfs2/fsck/pass3.c:175
+msgid "Marking directory unlinked\n"
msgstr ""
-#: gfs2/fsck/pass1.c:330
-msgid "Directory leaf was not fixed.\n"
+#: gfs2/fsck/pass3.c:200
+msgid "Marking root inode connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:335
-#, c-format
-msgid "Leaf depth was %d, changed to %d\n"
+#: gfs2/fsck/pass3.c:206
+msgid "Marking GFS1 statfs file inode connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:340
-msgid "Directory leaf was fixed.\n"
+#: gfs2/fsck/pass3.c:212
+msgid "Marking GFS1 jindex file inode connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:355
-#, c-format
-msgid ""
-"Found duplicate block %llu (0x%llx) referenced as a directory leaf in dinode "
-"%llu (0x%llx) - was marked %d (%s)\n"
+#: gfs2/fsck/pass3.c:218
+msgid "Marking GFS1 rindex file inode connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:369
-msgid "directory leaf"
+#: gfs2/fsck/pass3.c:224
+msgid "Marking GFS1 quota file inode connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:391 gfs2/fsck/pass1.c:468
-msgid "bad block referencing"
+#: gfs2/fsck/pass3.c:231
+msgid "Marking master directory inode connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:392
+#: gfs2/fsck/pass3.c:241
+msgid "Checking directory linkage.\n"
+msgstr ""
+
+#: gfs2/fsck/pass3.c:254
#, c-format
-msgid ""
-"Bad indirect block (invalid/out of range) found in inode %lld (0x%llx).\n"
+msgid "Directory at block %llu (0x%llx) connected\n"
msgstr ""
-#: gfs2/fsck/pass1.c:401
-msgid "a directory hash table block"
+#: gfs2/fsck/pass3.c:263
+msgid "Found unlinked directory containing bad block\n"
msgstr ""
-#: gfs2/fsck/pass1.c:404
-msgid "a journaled data block"
+#: gfs2/fsck/pass3.c:265
+msgid "Clear unlinked directory with bad blocks? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:408
+#: gfs2/fsck/pass3.c:267 gfs2/fsck/pass3.c:294
#, c-format
-msgid ""
-"Found duplicate block %llu (0x%llx) referenced as metadata in indirect block "
-"for dinode %llu (0x%llx) - was marked %d (%s)\n"
+msgid "inode %lld (0x%llx) is now marked as free\n"
msgstr ""
-#: gfs2/fsck/pass1.c:422
-#, c-format
-msgid ""
-"Inode %lld (0x%llx) has a bad indirect block pointer %lld (0x%llx) (points "
-"to something that is not %s).\n"
+#: gfs2/fsck/pass3.c:281
+msgid "Unlinked directory with bad block remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:430 gfs2/fsck/pass1.c:481 gfs2/fsck/pass1.c:498
-msgid "bad indirect"
+#: gfs2/fsck/pass3.c:286
+msgid "Unlinked block marked as an inode is not an inode\n"
msgstr ""
-#: gfs2/fsck/pass1.c:450
-msgid "indirect"
+#: gfs2/fsck/pass3.c:288
+msgid "Clear the unlinked block? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:476
-msgid "Metadata"
+#: gfs2/fsck/pass3.c:290
+msgid "The block was not cleared\n"
msgstr ""
-#: gfs2/fsck/pass1.c:509
+#: gfs2/fsck/pass3.c:304
+msgid "The block was cleared\n"
+msgstr ""
+
+#: gfs2/fsck/pass3.c:308
#, c-format
-msgid ""
-"inode %lld (0x%llx) has a bad data block pointer %lld (invalid or out of "
-"range)\n"
+msgid "Found unlinked directory at block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:518
-msgid "bad (out of range) data"
+#: gfs2/fsck/pass3.c:315
+msgid "Unlinked directory has zero size.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:524
-#, c-format
-msgid ""
-"Found duplicate %s block %llu (0x%llx) referenced as data by dinode %llu (0x"
-"%llx)\n"
+#: gfs2/fsck/pass3.c:317
+msgid "Remove zero-size unlinked directory? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:532
-msgid "Seems to be a normal duplicate; I'll sort it out in pass1b.\n"
+#: gfs2/fsck/pass3.c:321
+msgid "zero-sized unlinked inode"
msgstr ""
-#: gfs2/fsck/pass1.c:542
-msgid ""
-"The block was invalid as metadata but might be okay as data. I'll sort it "
-"out in pass1b.\n"
+#: gfs2/fsck/pass3.c:326
+msgid "Zero-size unlinked directory remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:552
-#, c-format
-msgid "Block %lld (0x%llx) is a GFS1 rindex block\n"
+#: gfs2/fsck/pass3.c:330
+msgid "Add unlinked directory to lost+found? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:555
-msgid "rgrp"
+#: gfs2/fsck/pass3.c:337
+msgid "Directory relinked to lost+found\n"
msgstr ""
-#: gfs2/fsck/pass1.c:558
-#, c-format
-msgid "Block %lld (0x%llx) is a GFS1 journaled data block\n"
+#: gfs2/fsck/pass3.c:339
+msgid "Unlinked directory remains unlinked\n"
msgstr ""
-#: gfs2/fsck/pass1.c:561
-msgid "jdata"
+#: gfs2/fsck/pass3.c:346
+#, c-format
+msgid "At end of pass3, lost+found entries is %u\n"
msgstr ""
-#: gfs2/fsck/pass1.c:578
-msgid "bad (invalid or out of range) data"
+#: gfs2/fsck/pass2.c:31
+#, c-format
+msgid "Unable to find block %llu (0x%llx) in dir_info list\n"
msgstr ""
-#: gfs2/fsck/pass1.c:604
+#: gfs2/fsck/pass2.c:41
#, c-format
msgid ""
-"Moving inode %lld (0x%llx)'s duplicate reference to %lld (0x%llx) from the "
-"valid to the invalid reference list.\n"
+"Another directory at block %llx (0x%llx) already contains this child %lld "
+"(%llx) - checking parent %llx (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:625
+#: gfs2/fsck/pass2.c:52
#, c-format
-msgid "Duplicate reference to %lld (0x%llx) not moved.\n"
+msgid "Child %lld (0x%llx) has parent %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:644
+#: gfs2/fsck/pass2.c:71
#, c-format
-msgid "Inode %lld (0x%llx) has unrecoverable Extended Attribute errors.\n"
+msgid "Unable to find block %<PRIu64> (0x%<PRIx64>) in dir_info tree\n"
msgstr ""
-#: gfs2/fsck/pass1.c:647
-msgid "Clear all Extended Attributes from the inode? (y/n) "
+#: gfs2/fsck/pass2.c:86
+#, c-format
+msgid "Dotdot parent already set for block %llu (0x%llx)-> %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:649
-msgid "Extended attributes were removed.\n"
+#: gfs2/fsck/pass2.c:157
+msgid "Invalid block type\n"
msgstr ""
-#: gfs2/fsck/pass1.c:651
-msgid "Unable to remove inode eattr pointer; the error remains.\n"
+#: gfs2/fsck/pass2.c:199 gfs2/fsck/eattr.c:42 gfs2/fsck/pass1b.c:316
+#: gfs2/fsck/pass1.c:966
+#, c-format
+msgid ""
+" Pointers Required: %d\n"
+" Pointers Reported: %d\n"
msgstr ""
-#: gfs2/fsck/pass1.c:654
-msgid "Extended attributes were not removed.\n"
+#: gfs2/fsck/pass2.c:244
+#, c-format
+msgid ""
+"Directory entry '%s' pointing to block %llu (0x%llx) in directory %llu (0x"
+"%llx) has the wrong 'formal' inode number.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:671
+#: gfs2/fsck/pass2.c:250
#, c-format
-msgid "Inode #%llu (0x%llx): %s"
+msgid "The directory entry has %llu (0x%llx) but the inode has %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:674
-#, c-format
-msgid " at block #%lld (0x%llx).\n"
+#: gfs2/fsck/pass2.c:256 gfs2/fsck/pass2.c:281
+msgid "Remove the corrupt directory entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:676
-msgid "Clear the bad Extended Attribute? (y/n) "
+#: gfs2/fsck/pass2.c:258 gfs2/fsck/pass2.c:285
+msgid "Corrupt directory entry not removed.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:679
-msgid "The bad extended attribute was removed.\n"
+#: gfs2/fsck/pass2.c:267
+msgid "The entry points to another directory with intact linkage.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:683
-msgid "bad extended attribute"
+#: gfs2/fsck/pass2.c:269
+msgid "Fix the bad directory entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:687
-msgid "The bad Extended Attribute was not fixed.\n"
+#: gfs2/fsck/pass2.c:270
+msgid "Fixing the corrupt directory entry.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:721
-msgid "Bad indirect Extended Attribute duplicate found"
+#: gfs2/fsck/pass2.c:275
+msgid "fixed reference"
msgstr ""
-#: gfs2/fsck/pass1.c:727
-msgid "Extended Attribute indirect block has incorrect type"
+#: gfs2/fsck/pass2.c:278 gfs2/fsck/pass2.c:351
+msgid "Directory entry not fixed.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:732
+#: gfs2/fsck/pass2.c:329
#, c-format
msgid ""
-"Inode #%llu (0x%llx): Duplicate Extended Attribute indirect block found at #"
-"%llu (0x%llx).\n"
+"Block # referenced by directory entry %s in inode %lld (0x%llx) is invalid\n"
msgstr ""
-#: gfs2/fsck/pass1.c:744
-msgid "indirect Extended Attribute"
+#: gfs2/fsck/pass2.c:333
+msgid "Clear directory entry to out of range block? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:760
-#, c-format
-msgid "Marking inode #%llu (0x%llx) with extended attribute block\n"
+#: gfs2/fsck/pass2.c:337
+msgid "Directory entry to out of range block remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:778
+#: gfs2/fsck/pass2.c:347
#, c-format
msgid ""
-"Inode %lld (0x%llx) has recoverable indirect Extended Attribute errors.\n"
+"Dir entry with bad record or name length\n"
+"\tRecord length = %u\n"
+"\tName length = %u\n"
msgstr ""
-#: gfs2/fsck/pass1.c:782
-msgid "Okay to fix the block count for the inode? (y/n) "
+#: gfs2/fsck/pass2.c:350
+msgid "Clear the directory entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:786
-msgid "Block count fixed.\n"
+#: gfs2/fsck/pass2.c:355
+msgid "corrupt directory entry"
msgstr ""
-#: gfs2/fsck/pass1.c:789
-msgid "Block count not fixed.\n"
+#: gfs2/fsck/pass2.c:357
+msgid "Bad directory entry deleted.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:814
-msgid "Bad Extended Attribute duplicate found"
+#: gfs2/fsck/pass2.c:363
+#, c-format
+msgid ""
+"Dir entry with bad hash or name length\n"
+"\tHash found = %u (0x%x)\n"
+"\tFilename = %s\n"
msgstr ""
-#: gfs2/fsck/pass1.c:817
-msgid "Extended Attribute leaf block has incorrect type"
+#: gfs2/fsck/pass2.c:367
+#, c-format
+msgid ""
+"\tName length found = %u\n"
+"\tHash expected = %u (0x%x)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:824
+#: gfs2/fsck/pass2.c:370
#, c-format
-msgid "Duplicate block found at #%lld (0x%llx).\n"
+msgid "Fix directory hash for %s? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:837
-msgid "Extended Attribute block removed due to previous errors.\n"
+#: gfs2/fsck/pass2.c:372
+#, c-format
+msgid "Directory entry hash for %s not fixed.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:845
-msgid "Extended Attribute"
+#: gfs2/fsck/pass2.c:379
+#, c-format
+msgid "Directory entry hash for %s fixed.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:874
+#: gfs2/fsck/pass2.c:401
#, c-format
-msgid ""
-"Inode #%llu (0x%llx): Extended Attribute block %llu (0x%llx) has an extended "
-"leaf block #%llu (0x%llx) that is invalid or out of range.\n"
+msgid "Found directory entry '%s' pointing to invalid block %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:884
-msgid "bad (out of range) Extended Attribute "
+#: gfs2/fsck/pass2.c:406
+msgid "Delete inode containing bad blocks? (y/n)"
msgstr ""
-#: gfs2/fsck/pass1.c:907
+#: gfs2/fsck/pass2.c:407
+msgid "Entry to inode containing bad blocks remains\n"
+msgstr ""
+
+#: gfs2/fsck/pass2.c:425
+msgid "bad directory entry"
+msgstr ""
+
+#: gfs2/fsck/pass2.c:426
#, c-format
-msgid "Setting inode %lld (0x%llx) as having eattr block(s) attached.\n"
+msgid "Inode %lld (0x%llx) was deleted.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:918
+#: gfs2/fsck/pass2.c:432
#, c-format
msgid ""
-"Inode #%llu (0x%llx): Extended Attribute leaf block #%llu (0x%llx) is "
-"invalid or out of range.\n"
+"Directory entry '%s' referencing inode %llu (0x%llx) in dir inode %llu (0x"
+"%llx) block type %d: %s.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:925
-msgid "bad (out of range) Extended Attribute leaf"
+#: gfs2/fsck/pass2.c:440
+msgid "was previously marked invalid"
msgstr ""
-#: gfs2/fsck/pass1.c:999
+#: gfs2/fsck/pass2.c:441
+msgid "was deleted or is not an inode"
+msgstr ""
+
+#: gfs2/fsck/pass2.c:443
+msgid "Clear directory entry to non-inode block? (y/n) "
+msgstr ""
+
+#: gfs2/fsck/pass2.c:445
+msgid "Directory entry to non-inode block remains\n"
+msgstr ""
+
+#: gfs2/fsck/pass2.c:470
#, c-format
msgid ""
-"%s block %lld (0x%llx), part of inode %lld (0x%llx), was previously "
-"referenced so the invalid reference is ignored.\n"
+"Error: directory entry type is incompatible with block type at block %lld (0x"
+"%llx) in directory inode %llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1073
+#: gfs2/fsck/pass2.c:477
#, c-format
-msgid ""
-"Bad %s block pointer (invalid or out of range #%ld) found in inode %lld (0x"
-"%llx).\n"
+msgid "Directory entry type is %d, block type is %d.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1087
+#: gfs2/fsck/pass2.c:483
#, c-format
msgid ""
-"Duplicated %s block pointer (violation %ld, block %lld (0x%llx)) found in "
-"inode %lld (0x%llx).\n"
+"Type '%s' in dir entry (%s, %llu/0x%llx) conflicts with type '%s' in dinode. "
+"(Dir entry is stale.)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1162
-#, c-format
-msgid "Error: inode %llu (0x%llx) has more than %d bad pointers.\n"
+#: gfs2/fsck/pass2.c:489
+msgid "Clear stale directory entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1168
-msgid "badly corrupt"
+#: gfs2/fsck/pass2.c:490
+msgid "Stale directory entry remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1200
+#: gfs2/fsck/pass2.c:504
#, c-format
-msgid ""
-"Directory dinode block #%llu (0x%llx) has bad depth. Found %u, Expected %u\n"
+msgid "Found . dentry in directory %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1206
-msgid "bad depth"
+#: gfs2/fsck/pass2.c:509
+#, c-format
+msgid "Already found '.' entry in directory %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1218
-#, c-format
-msgid "Error: inode %llu (0x%llx) has unrecoverable errors; invalidating.\n"
+#: gfs2/fsck/pass2.c:513
+msgid "Clear duplicate '.' entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1229
-msgid "corrupt"
+#: gfs2/fsck/pass2.c:514
+msgid "Duplicate '.' entry remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1241
+#: gfs2/fsck/pass2.c:534
#, c-format
msgid ""
-"Inode #%llu (0x%llx): Ondisk block count (%llu) does not match what fsck "
-"found (%llu)\n"
+"'.' entry's value incorrect in directory %llu (0x%llx). Points to %llu (0x"
+"%llx) when it should point to %llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1248
-#, c-format
-msgid ""
-"inode has: %lld, but fsck counts: Dinode:1 + indir:%lld + data: %lld + ea: "
-"%lld\n"
+#: gfs2/fsck/pass2.c:544
+msgid "Remove '.' reference? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1254
-msgid "Fix ondisk block count? (y/n) "
+#: gfs2/fsck/pass2.c:545
+msgid "Invalid '.' reference remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1258
+#: gfs2/fsck/pass2.c:564
#, c-format
-msgid "Block count for #%llu (0x%llx) fixed\n"
+msgid "Found '..' dentry in directory %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1262
+#: gfs2/fsck/pass2.c:568
#, c-format
-msgid "Bad block count for #%llu (0x%llx) not fixed\n"
+msgid "Already had a '..' entry in directory %llu(0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1288
-#, c-format
-msgid ""
-"Found a duplicate inode block at #%llu (0x%llx) previously marked as a %s\n"
+#: gfs2/fsck/pass2.c:572
+msgid "Clear duplicate '..' entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1298
-#, c-format
-msgid "Inode #%llu (0x%llx): Bad inode address found: %llu (0x%llx)\n"
+#: gfs2/fsck/pass2.c:573
+msgid "Duplicate '..' entry remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1303
+#: gfs2/fsck/pass2.c:592
#, c-format
-msgid "Fix address in inode at block #%llu (0x%llx)? (y/n) "
+msgid ""
+"Found '..' entry in directory %llu (0x%llx) pointing to something that's not "
+"a directory"
msgstr ""
-#: gfs2/fsck/pass1.c:1309
-#, c-format
-msgid "Address in inode at block #%llu (0x%llx) not fixed\n"
+#: gfs2/fsck/pass2.c:596
+msgid "Clear bad '..' directory entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1333
-#, c-format
-msgid "Checking system inode '%s'\n"
+#: gfs2/fsck/pass2.c:597
+msgid "Bad '..' directory entry remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1338
+#: gfs2/fsck/pass2.c:626
#, c-format
-msgid "System inode for '%s' is located at block %llu (0x%llx)\n"
+msgid "Found non-dir inode dentry pointing to %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1343
+#: gfs2/fsck/pass2.c:636
#, c-format
-msgid "Found invalid system dinode at block #%llu (0x%llx)\n"
+msgid "%s: Hard link to block %llu (0x%llx) detected.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1359
-msgid "The inode exists but the block is not marked 'in use'; fixing it.\n"
+#: gfs2/fsck/pass2.c:641
+msgid "Clear hard link to directory? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1369
-#, c-format
-msgid "System inode for '%s' is corrupt or missing.\n"
+#: gfs2/fsck/pass2.c:644
+msgid "Hard link to directory remains\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1376
-#, c-format
-msgid "Invalid or missing %s system inode (should be %d, is %d).\n"
+#: gfs2/fsck/pass2.c:653
+msgid "valid reference"
msgstr ""
-#: gfs2/fsck/pass1.c:1378
+#: gfs2/fsck/pass2.c:666
#, c-format
-msgid "Create new %s system inode? (y/n) "
+msgid "Bad directory entry '%s' cleared.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1379
+#: gfs2/fsck/pass2.c:694
#, c-format
-msgid "Rebuilding system file \"%s\"\n"
+msgid "Checking system directory inode '%s'\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1383
+#: gfs2/fsck/pass2.c:697
#, c-format
-msgid "Error trying to rebuild system file %s: Cannot continue\n"
+msgid "Failed to check '%s': sysinode is null\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1395
+#: gfs2/fsck/pass2.c:730
#, c-format
-msgid "Cannot continue without valid %s inode\n"
+msgid "No '.' entry found for %s directory.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1413
-#, c-format
-msgid "Error found in %s while checking directory entries.\n"
+#: gfs2/fsck/pass2.c:731 gfs2/fsck/pass2.c:949
+msgid "Is it okay to add '.' entry? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1432
-#, c-format
-msgid "Error %d building journal\n"
+#: gfs2/fsck/pass2.c:737
+msgid "Unable to allocate name string\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1508
-msgid "gfs1 statfs inode"
+#: gfs2/fsck/pass2.c:743
+msgid "Unable to zero name string\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1510
-msgid "gfs1 jindex inode"
+#: gfs2/fsck/pass2.c:749
+msgid "Adding '.' entry\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1512
-msgid "gfs1 rindex inode"
+#: gfs2/fsck/pass2.c:768 gfs2/fsck/pass2.c:995
+msgid "The directory was not fixed.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1514
-msgid "gfs1 quota inode"
+#: gfs2/fsck/pass2.c:771
+#, c-format
+msgid "%s inode %llu (0x%llx): Entries is %d - should be %d\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1578
+#: gfs2/fsck/pass2.c:776
#, c-format
-msgid "Checking metadata in Resource Group #%llu\n"
+msgid "Fix entries for %s inode %llu (0x%llx)? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1.c:1582
-#, c-format
-msgid "rgrp block %lld (0x%llx) is now marked as 'rgrp data'\n"
+#: gfs2/fsck/pass2.c:782
+msgid "Entries updated\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1608
+#: gfs2/fsck/pass2.c:784
#, c-format
-msgid "Skipping rindex indir block %lld (0x%llx)\n"
+msgid "Entries for inode %llu (0x%llx) left out of sync\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1622
-#, c-format
-msgid "Skipping pass 1 is not a good idea.\n"
+#: gfs2/fsck/pass2.c:861
+msgid "Checking directory inodes.\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1627
+#: gfs2/fsck/pass2.c:877
#, c-format
-msgid "Already processed system inode %lld (0x%llx)\n"
+msgid "Checking directory inode at block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1655
+#: gfs2/fsck/pass2.c:922
#, c-format
-msgid "Deferring GFS1 metadata block #%<PRIu64> (0x%<PRIx64>)\n"
+msgid "Unable to find dentry for %llu (0x%llx) in %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1.c:1665
+#: gfs2/fsck/pass2.c:932
+msgid "Directory entry to invalid inode remains.\n"
+msgstr ""
+
+#: gfs2/fsck/pass2.c:933
#, c-format
-msgid "Found invalid inode at block #%llu (0x%llx)\n"
+msgid "Directory block %lld (0x%llx) is now marked as 'invalid'\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:29
+#: gfs2/fsck/pass2.c:944
#, c-format
-msgid "Bad Extended Attribute at block #%llu (0x%llx) removed.\n"
+msgid "No '.' entry found for directory inode at block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:43
-msgid "Remove the bad Extended Attribute entry? (y/n) "
+#: gfs2/fsck/pass2.c:990
+msgid "\". (itself)\""
msgstr ""
-#: gfs2/fsck/pass1c.c:57 gfs2/fsck/pass1c.c:70
-msgid "Bad Extended Attribute not removed.\n"
+#: gfs2/fsck/pass2.c:993
+msgid "The directory was fixed.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:64
-msgid "Remove the bad Extended Attribute? (y/n) "
+#: gfs2/fsck/pass2.c:1000
+#, c-format
+msgid "Entries is %d - should be %d for inode block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:67
-msgid "Bad Extended Attribute removed.\n"
+#: gfs2/fsck/pass2.c:1005
+msgid "Fix the entry count? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1c.c:83
+#: gfs2/fsck/pass2.c:1009
+msgid "The entry count was not fixed.\n"
+msgstr ""
+
+#: gfs2/fsck/metawalk.c:39
#, c-format
msgid ""
-"Extended attributes indirect block #%llu (0x%llx) for inode #%llu (0x%llx) "
-"is invalid...removing\n"
+"Block %llu (0x%llx) is not represented in the system bitmap; part of an rgrp "
+"or superblock.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:94
+#: gfs2/fsck/metawalk.c:53
#, c-format
-msgid ""
-"Extended attributes indirect block #%llu (0x%llx) for inode #%llu (0x%llx) "
-"is invalid.\n"
+msgid "Block %llu (0x%llx) was '%s', should be %s.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:118
-#, c-format
-msgid "Extended attributes block for inode #%llu (0x%llx) is invalid.\n"
+#: gfs2/fsck/metawalk.c:57
+msgid "Fix the bitmap? (y/n)"
msgstr ""
-#: gfs2/fsck/pass1c.c:126
-#, c-format
-msgid "Extended attributes block for inode #%llu (0x%llx) invalid.\n"
+#: gfs2/fsck/metawalk.c:94
+msgid "The bitmap was fixed.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:151 gfs2/fsck/pass1c.c:167
-msgid "EA has name length of zero\n"
+#: gfs2/fsck/metawalk.c:96
+msgid "The bitmap inconsistency was ignored.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:156
-msgid "EA rec length too long\n"
+#: gfs2/fsck/metawalk.c:131
+#, c-format
+msgid "(%s:%d) %s inode found at block (0x%llx): marking as '%s'\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:162
-msgid "last EA has no last entry flag\n"
+#: gfs2/fsck/metawalk.c:142 gfs2/fsck/metawalk.c:153
+#, c-format
+msgid "(%s:%d) inode (0x%llx) references %s block (0x%llx): marking as '%s'\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:178
-#, c-format
-msgid "EA (%s) type is invalid (%d > %d).\n"
+#: gfs2/fsck/metawalk.c:168
+msgid "This block is not represented in the bitmap.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:192
+#: gfs2/fsck/metawalk.c:359
#, c-format
-msgid "EA (%s) has incorrect number of pointers.\n"
+msgid "Checking leaf %llu (0x%llu)\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:193
+#: gfs2/fsck/metawalk.c:364
#, c-format
-msgid ""
-" Required: %d\n"
-" Reported: %d\n"
+msgid "Invalid directory type %d specified\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:198
+#: gfs2/fsck/metawalk.c:382
#, c-format
msgid ""
-" Pointers Required: %d\n"
-" Pointers Reported: %d\n"
+"Directory block %llu (0x%llx), entry %d of directory %llu (0x%llx) is "
+"corrupt.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:242
-msgid "Looking for inodes containing ea blocks...\n"
+#: gfs2/fsck/metawalk.c:390
+msgid "Attempt to repair it? (y/n) "
msgstr ""
-#: gfs2/fsck/pass1c.c:252
-#, c-format
-msgid "EA in inode %llu (0x%llx)\n"
+#: gfs2/fsck/metawalk.c:397
+msgid ""
+"Unable to repair corrupt directory entry; the entry was removed instead.\n"
msgstr ""
-#: gfs2/fsck/pass1c.c:259
-#, c-format
-msgid "Found eattr at %llu (0x%llx)\n"
+#: gfs2/fsck/metawalk.c:403
+msgid "Corrupt directory entry repaired.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:30
+#: gfs2/fsck/metawalk.c:408 gfs2/fsck/metawalk.c:431
#, c-format
-msgid "Unable to find block %llu (0x%llx) in dir_info list\n"
+msgid "Corrupt directory entry ignored, stopped after checking %d entries.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:39
-#, c-format
-msgid ""
-"Another directory at block %llu (0x%llx) already contains this child %llu "
-"(%llx) - checking parent %llu (0x%llx)\n"
+#: gfs2/fsck/metawalk.c:416
+msgid "First dirent is a sentinel (place holder).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:51
+#: gfs2/fsck/metawalk.c:419
#, c-format
-msgid "Child %lld (0x%llx) has parent %lld (0x%llx)\n"
+msgid ""
+"Directory entry with inode number of zero in leaf %llu (0x%llx) of directory "
+"%llu (0x%llx)!\n"
msgstr ""
-#: gfs2/fsck/pass2.c:70
-#, c-format
-msgid "Unable to find block %<PRIu64> (0x%<PRIx64>) in dir_info tree\n"
+#: gfs2/fsck/metawalk.c:426
+msgid "Attempt to remove it? (y/n) "
msgstr ""
-#: gfs2/fsck/pass2.c:85
-#, c-format
-msgid "Dotdot parent already set for block %llu (0x%llx)-> %llu (0x%llx)\n"
+#: gfs2/fsck/metawalk.c:428
+msgid "The corrupt directory entry was removed.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:155
-msgid "Invalid block type\n"
+#: gfs2/fsck/metawalk.c:440
+msgid "First dirent is a Sentinel (place holder).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:263
+#: gfs2/fsck/metawalk.c:460
#, c-format
-msgid ""
-"Block # referenced by directory entry %s in inode %lld (0x%llx) is invalid\n"
+msgid "Last entry processed for %lld->%lld (0x%llx->0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:267
-msgid "Clear directory entry to out of range block? (y/n) "
+#: gfs2/fsck/metawalk.c:492
+#, c-format
+msgid "Directory Inode %llu (0x%llx) points to leaf %llu (0x%llx) %s.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:271
-msgid "Directory entry to out of range block remains\n"
+#: gfs2/fsck/metawalk.c:500
+msgid "Attempt to patch around it? (y/n) "
msgstr ""
-#: gfs2/fsck/pass2.c:281
+#: gfs2/fsck/metawalk.c:505
#, c-format
-msgid ""
-"Dir entry with bad record or name length\n"
-"\tRecord length = %u\n"
-"\tName length = %u\n"
+msgid "Directory Inode %llu (0x%llx) repaired.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:284
-msgid "Clear the directory entry? (y/n) "
+#: gfs2/fsck/metawalk.c:509
+msgid "Bad leaf left in place.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:285
-msgid "Directory entry not fixed.\n"
+#: gfs2/fsck/metawalk.c:533
+#, c-format
+msgid ""
+"Leaf block #%llu (0x%llx) is out of range for directory #%llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:289
-msgid "corrupt directory entry"
+#: gfs2/fsck/metawalk.c:539
+msgid "that is out of range"
msgstr ""
-#: gfs2/fsck/pass2.c:291
-msgid "Bad directory entry deleted.\n"
+#: gfs2/fsck/metawalk.c:547
+msgid "that is not really a leaf"
msgstr ""
-#: gfs2/fsck/pass2.c:297
+#: gfs2/fsck/metawalk.c:553
#, c-format
msgid ""
-"Dir entry with bad hash or name length\n"
-"\tHash found = %u (0x%x)\n"
-"\tFilename = %s\n"
+"Previous reference to leaf %lld (0x%llx) has already checked it; skipping.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:301
+#: gfs2/fsck/metawalk.c:568
#, c-format
-msgid ""
-"\tName length found = %u\n"
-"\tHash expected = %u (0x%x)\n"
+msgid "incorrect lf_dirent_format at leaf #%<PRIu64>\n"
msgstr ""
-#: gfs2/fsck/pass2.c:304
-#, c-format
-msgid "Fix directory hash for %s? (y/n) "
+#: gfs2/fsck/metawalk.c:572
+msgid "Fixing lf_dirent_format.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:306
+#: gfs2/fsck/metawalk.c:577
#, c-format
-msgid "Directory entry hash for %s not fixed.\n"
+msgid "Inode %llu (0x%llx) points to bad leaf %llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:313
-#, c-format
-msgid "Directory entry hash for %s fixed.\n"
+#: gfs2/fsck/metawalk.c:583
+msgid "that is not a leaf"
msgstr ""
-#: gfs2/fsck/pass2.c:335
+#: gfs2/fsck/metawalk.c:605
#, c-format
-msgid "Found directory entry '%s' pointing to invalid block %lld (0x%llx)\n"
+msgid ""
+"Leaf %llu (0x%llx) entry count in directory %llu (0x%llx) does not match "
+"number of entries found - is %u, found %u\n"
msgstr ""
-#: gfs2/fsck/pass2.c:340
-msgid "Delete inode containing bad blocks? (y/n)"
+#: gfs2/fsck/metawalk.c:613
+msgid "Update leaf entry count? (y/n) "
msgstr ""
-#: gfs2/fsck/pass2.c:341
-msgid "Entry to inode containing bad blocks remains\n"
+#: gfs2/fsck/metawalk.c:616
+msgid "Leaf entry count updated\n"
msgstr ""
-#: gfs2/fsck/pass2.c:359
-msgid "bad directory entry"
+#: gfs2/fsck/metawalk.c:618
+msgid "Leaf entry count left in inconsistant state\n"
msgstr ""
-#: gfs2/fsck/pass2.c:360
+#: gfs2/fsck/metawalk.c:671
#, c-format
-msgid "Inode %lld (0x%llx) was deleted.\n"
+msgid "Directory #%llu (0x%llx) has no valid leaf blocks\n"
msgstr ""
-#: gfs2/fsck/pass2.c:366
+#: gfs2/fsck/metawalk.c:721
#, c-format
-msgid ""
-"Directory entry '%s' referencing inode %llu (0x%llx) in dir inode %llu (0x"
-"%llx) block type %d: %s.\n"
+msgid "Leaf chain (0x%llx) detected.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:374
-msgid "was previously marked invalid"
+#: gfs2/fsck/metawalk.c:777
+#, c-format
+msgid "Bad extended attribute found at block %lld (0x%llx)"
msgstr ""
-#: gfs2/fsck/pass2.c:375
-msgid "was deleted or is not an inode"
+#: gfs2/fsck/metawalk.c:784
+msgid "Repair the bad Extended Attribute? (y/n) "
msgstr ""
-#: gfs2/fsck/pass2.c:377
-msgid "Clear directory entry to non-inode block? (y/n) "
+#: gfs2/fsck/metawalk.c:796 gfs2/fsck/metawalk.c:1509 gfs2/fsck/pass1.c:1044
+msgid "extended attribute"
msgstr ""
-#: gfs2/fsck/pass2.c:379
-msgid "Directory entry to non-inode block remains\n"
+#: gfs2/fsck/metawalk.c:798
+msgid "The EA was fixed.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:404
-#, c-format
-msgid ""
-"Error: directory entry type is incompatible with block type at block %lld (0x"
-"%llx) in directory inode %llu (0x%llx).\n"
+#: gfs2/fsck/metawalk.c:802
+msgid "The bad EA was not fixed.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:411
+#: gfs2/fsck/metawalk.c:840
#, c-format
-msgid "Directory entry type is %d, block type is %d.\n"
+msgid "Checking EA leaf block #%llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:417
+#: gfs2/fsck/metawalk.c:898
#, c-format
msgid ""
-"Type '%s' in dir entry (%s, %llu/0x%llx) conflicts with type '%s' in dinode. "
-"(Dir entry is stale.)\n"
-msgstr ""
-
-#: gfs2/fsck/pass2.c:423
-msgid "Clear stale directory entry? (y/n) "
+"Removing duplicate status of block %llu (0x%llx) referenced as %s by dinode "
+"%llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass2.c:424
-msgid "Stale directory entry remains\n"
+#: gfs2/fsck/metawalk.c:905
+msgid "This leaves only one reference: it's no longer a duplicate.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:438
+#: gfs2/fsck/metawalk.c:909
#, c-format
-msgid "Found . dentry in directory %lld (0x%llx)\n"
+msgid "%d block reference(s) remain.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:443
+#: gfs2/fsck/metawalk.c:950
#, c-format
-msgid "Already found '.' entry in directory %llu (0x%llx)\n"
+msgid ""
+"%s block %lld (0x%llx), part of inode %lld (0x%llx), was already free.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:447
-msgid "Clear duplicate '.' entry? (y/n) "
+#: gfs2/fsck/metawalk.c:980
+#, c-format
+msgid "Checking EA indirect block #%llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:448
-msgid "Duplicate '.' entry remains\n"
+#: gfs2/fsck/metawalk.c:1000
+msgid "Fix the indirect block too? (y/n) "
msgstr ""
-#: gfs2/fsck/pass2.c:468
+#: gfs2/fsck/metawalk.c:1069
#, c-format
-msgid ""
-"'.' entry's value incorrect in directory %llu (0x%llx). Points to %llu (0x"
-"%llx) when it should point to %llu (0x%llx).\n"
+msgid "Extended attributes exist for inode #%llu (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:478
-msgid "Remove '.' reference? (y/n) "
+#: gfs2/fsck/metawalk.c:1191
+#, c-format
+msgid "Skipping block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass2.c:479
-msgid "Invalid '.' reference remains\n"
+#: gfs2/fsck/metawalk.c:1197
+#, c-format
+msgid "Skipping invalid block %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass2.c:498
+#: gfs2/fsck/metawalk.c:1370
#, c-format
-msgid "Found '..' dentry in directory %lld (0x%llx)\n"
+msgid ""
+"\rLarge file at %lld (0x%llx) - 100 percent "
+"complete. \n"
msgstr ""
-#: gfs2/fsck/pass2.c:502
+#: gfs2/fsck/metawalk.c:1446
#, c-format
-msgid "Already had a '..' entry in directory %llu(0x%llx)\n"
+msgid "Removing dentry %llu (0x%llx) from directory %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass2.c:506
-msgid "Clear duplicate '..' entry? (y/n) "
+#: gfs2/fsck/metawalk.c:1451
+msgid "Parent directory is invalid\n"
msgstr ""
-#: gfs2/fsck/pass2.c:507
-msgid "Duplicate '..' entry remains\n"
+#: gfs2/fsck/metawalk.c:1459
+msgid "Parent block is not a directory...ignoring\n"
msgstr ""
-#: gfs2/fsck/pass2.c:526
-#, c-format
-msgid ""
-"Found '..' entry in directory %llu (0x%llx) pointing to something that's not "
-"a directory"
+#: gfs2/fsck/metawalk.c:1472 gfs2/fsck/pass1.c:1016
+msgid "metadata"
msgstr ""
-#: gfs2/fsck/pass2.c:530
-msgid "Clear bad '..' directory entry? (y/n) "
+#: gfs2/fsck/metawalk.c:1477 gfs2/fsck/pass1.c:1022
+msgid "leaf"
msgstr ""
-#: gfs2/fsck/pass2.c:531
-msgid "Bad '..' directory entry remains\n"
+#: gfs2/fsck/metawalk.c:1482 gfs2/fsck/pass1.c:563 gfs2/fsck/pass1.c:583
+#: gfs2/fsck/pass1.c:1028
+msgid "data"
msgstr ""
-#: gfs2/fsck/pass2.c:560
-#, c-format
-msgid "Found non-dir inode dentry pointing to %lld (0x%llx)\n"
+#: gfs2/fsck/metawalk.c:1491 gfs2/fsck/pass1.c:1036
+msgid "indirect extended attribute"
msgstr ""
-#: gfs2/fsck/pass2.c:570
+#: gfs2/fsck/metawalk.c:1532
#, c-format
-msgid "%s: Hard link to block %llu (0x%llx) detected.\n"
+msgid ""
+"%s reference to new metadata block %lld (0x%llx) is now marked as indirect.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:575
-msgid "Clear hard link to directory? (y/n) "
+#: gfs2/fsck/metawalk.c:1551
+#, c-format
+msgid "%s reference to new data block %lld (0x%llx) is now marked as data.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:578
-msgid "Hard link to directory remains\n"
+#: gfs2/fsck/metawalk.c:1569
+msgid "newly allocated leaf"
msgstr ""
-#: gfs2/fsck/pass2.c:588
-msgid "valid reference"
+#: gfs2/fsck/metawalk.c:1609
+#, c-format
+msgid "%s had blocks added; reprocessing its metadata tree at height=%d.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:596
+#: gfs2/fsck/metawalk.c:1613
#, c-format
-msgid "Bad directory entry '%s' cleared.\n"
+msgid "Error %d reprocessing the %s metadata tree.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:624
+#: gfs2/fsck/util.c:51
#, c-format
-msgid "Checking system directory inode '%s'\n"
+msgid ""
+"\rChecking %lld%c of %lld%c of file at %lld (0x%llx)- %llu percent "
+"complete. \r"
msgstr ""
-#: gfs2/fsck/pass2.c:655
+#: gfs2/fsck/util.c:83
#, c-format
-msgid "No '.' entry found for %s directory.\n"
+msgid "\r%llu percent complete.\r"
msgstr ""
-#: gfs2/fsck/pass2.c:656 gfs2/fsck/pass2.c:873
-msgid "Is it okay to add '.' entry? (y/n) "
+#: gfs2/fsck/util.c:256
+msgid "Unable to allocate duptree structure\n"
msgstr ""
-#: gfs2/fsck/pass2.c:662
-msgid "Unable to allocate name string\n"
+#: gfs2/fsck/util.c:351
+msgid "Unable to allocate inode_with_dups structure\n"
msgstr ""
-#: gfs2/fsck/pass2.c:668
-msgid "Unable to zero name string\n"
+#: gfs2/fsck/util.c:356
+msgid "Unable to zero inode_with_dups structure\n"
msgstr ""
-#: gfs2/fsck/pass2.c:673
-msgid "Adding '.' entry\n"
+#: gfs2/fsck/util.c:381
+#, c-format
+msgid ""
+"Found %d reference(s) to block %llu (0x%llx) as %s in inode #%llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass2.c:692 gfs2/fsck/pass2.c:920
-msgid "The directory was not fixed.\n"
+#: gfs2/fsck/util.c:388
+msgid "This is the original reference.\n"
msgstr ""
-#: gfs2/fsck/pass2.c:695
+#: gfs2/fsck/util.c:390
#, c-format
-msgid "%s inode %llu (0x%llx): Entries is %d - should be %d\n"
+msgid "This brings the total to: %d duplicate references\n"
msgstr ""
-#: gfs2/fsck/pass2.c:700
-#, c-format
-msgid "Fix entries for %s inode %llu (0x%llx)? (y/n) "
+#: gfs2/fsck/util.c:415
+msgid "Unable to allocate dir_info structure\n"
msgstr ""
-#: gfs2/fsck/pass2.c:706
-msgid "Entries updated\n"
+#: gfs2/fsck/util.c:419
+msgid "Error while zeroing dir_info structure\n"
msgstr ""
-#: gfs2/fsck/pass2.c:708
-#, c-format
-msgid "Entries for inode %llu (0x%llx) left out of sync\n"
+#: gfs2/fsck/util.c:572
+msgid "directory"
msgstr ""
-#: gfs2/fsck/pass2.c:785
-msgid "Checking directory inodes.\n"
+#: gfs2/fsck/util.c:579
+msgid "file"
msgstr ""
-#: gfs2/fsck/pass2.c:801
-#, c-format
-msgid "Checking directory inode at block %llu (0x%llx)\n"
+#: gfs2/fsck/util.c:583
+msgid "symlink"
msgstr ""
-#: gfs2/fsck/pass2.c:832 gfs2/fsck/pass3.c:149
-#, c-format
-msgid ""
-"Remove directory entry for bad inode %llu (0x%llx) in %llu (0x%llx)? (y/n)"
+#: gfs2/fsck/util.c:588
+msgid "block device"
msgstr ""
-#: gfs2/fsck/pass2.c:846
-#, c-format
-msgid "Unable to find dentry for %llu (0x%llx) in %llu (0x%llx)\n"
+#: gfs2/fsck/util.c:593
+msgid "character device"
msgstr ""
-#: gfs2/fsck/pass2.c:854 gfs2/fsck/pass3.c:170
-msgid "Directory entry removed\n"
+#: gfs2/fsck/util.c:598
+msgid "fifo"
msgstr ""
-#: gfs2/fsck/pass2.c:856
-msgid "Directory entry to invalid inode remains.\n"
+#: gfs2/fsck/util.c:603
+msgid "socket"
msgstr ""
-#: gfs2/fsck/pass2.c:857
-#, c-format
-msgid "Directory block %lld (0x%llx) is now marked as 'invalid'\n"
+#: gfs2/fsck/util.c:608
+msgid "invalid mode"
msgstr ""
-#: gfs2/fsck/pass2.c:868
+#: gfs2/fsck/lost_n_found.c:26
#, c-format
-msgid "No '.' entry found for directory inode at block %llu (0x%llx)\n"
-msgstr ""
-
-#: gfs2/fsck/pass2.c:881 gfs2/fsck/pass3.c:38
-msgid "Unable to allocate name\n"
-msgstr ""
-
-#: gfs2/fsck/pass2.c:887 gfs2/fsck/pass3.c:45
-msgid "Unable to zero name\n"
+msgid ""
+"Adding .. entry to directory %llu (0x%llx) pointing back to lost+found\n"
msgstr ""
-#: gfs2/fsck/pass2.c:906 gfs2/fsck/pass3.c:67
+#: gfs2/fsck/lost_n_found.c:37
#, c-format
-msgid "Directory at %lld (0x%llx)"
-msgstr ""
-
-#: gfs2/fsck/pass2.c:915
-msgid "\". (itself)\""
+msgid "Directory %lld (0x%llx) already had a \"..\" link to %lld (0x%llx).\n"
msgstr ""
-#: gfs2/fsck/pass2.c:918
-msgid "The directory was fixed.\n"
+#: gfs2/fsck/lost_n_found.c:45
+msgid ".. unlinked, moving to lost+found"
msgstr ""
-#: gfs2/fsck/pass2.c:925
+#: gfs2/fsck/lost_n_found.c:50
#, c-format
-msgid "Entries is %d - should be %d for inode block %llu (0x%llx)\n"
-msgstr ""
-
-#: gfs2/fsck/pass2.c:930
-msgid "Fix the entry count? (y/n) "
-msgstr ""
-
-#: gfs2/fsck/pass2.c:934
-msgid "The entry count was not fixed.\n"
-msgstr ""
-
-#: gfs2/fsck/pass3.c:53
-msgid "Unable to remove \"..\" directory entry.\n"
-msgstr ""
-
-#: gfs2/fsck/pass3.c:55
-msgid "old \"..\""
+msgid "Decrementing its links to %d\n"
msgstr ""
-#: gfs2/fsck/pass3.c:72
-msgid "new \"..\""
+#: gfs2/fsck/lost_n_found.c:54
+msgid "Its link count is zero.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:94
+#: gfs2/fsck/lost_n_found.c:56
#, c-format
-msgid "Orphaned directory at block %llu (0x%llx) moved to lost+found\n"
+msgid "Its link count is %d! Changing it to 0.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:103
+#: gfs2/fsck/lost_n_found.c:66
#, c-format
msgid ""
-"Directory '..' and treewalk connections disagree for inode %llu (0x%llx)\n"
+"Couldn't find a valid \"..\" entry for orphan directory %lld (0x%llx): '..' "
+"= 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:106
+#: gfs2/fsck/lost_n_found.c:73
#, c-format
-msgid "'..' has %llu (0x%llx), treewalk has %llu (0x%llx)\n"
+msgid "Couldn't find directory %lld (0x%llx) in directory tree.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:122
-msgid "Orphaned directory, move to lost+found\n"
+#: gfs2/fsck/lost_n_found.c:79
+msgid "add_inode_to_lf: Unable to remove \"..\" directory entry.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:126
+#: gfs2/fsck/lost_n_found.c:85
#, c-format
-msgid "Treewalk parent is correct, fixing dotdot -> %llu (0x%llx)\n"
-msgstr ""
-
-#: gfs2/fsck/pass3.c:137
-msgid "Both .. and treewalk parents are directories, going with treewalk...\n"
-msgstr ""
-
-#: gfs2/fsck/pass3.c:144
-msgid ".. parent is valid, but treewalk is bad - reattaching to lost+found"
+msgid "Error adding .. directory: %s\n"
msgstr ""
-#: gfs2/fsck/pass3.c:155
-msgid "Directory entry to invalid inode remains\n"
+#: gfs2/fsck/lost_n_found.c:151
+msgid "Locating/Creating lost+found directory\n"
msgstr ""
-#: gfs2/fsck/pass3.c:164
+#: gfs2/fsck/lost_n_found.c:166
#, c-format
-msgid "Unable to find dentry for block %llu (0x%llx) in %llu (0x%llx)\n"
+msgid "Error creating lost+found: %s\n"
msgstr ""
-#: gfs2/fsck/pass3.c:171
-msgid "Marking directory unlinked\n"
+#: gfs2/fsck/lost_n_found.c:188
+msgid "lost+found dinode"
msgstr ""
-#: gfs2/fsck/pass3.c:196
-msgid "Marking root inode connected\n"
+#: gfs2/fsck/lost_n_found.c:192
+msgid "root"
msgstr ""
-#: gfs2/fsck/pass3.c:202
-msgid "Marking GFS1 statfs file inode connected\n"
+#: gfs2/fsck/lost_n_found.c:202
+#, c-format
+msgid "lost+found directory is dinode %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass3.c:208
-msgid "Marking GFS1 jindex file inode connected\n"
+#: gfs2/fsck/lost_n_found.c:207
+msgid "Marking lost+found inode connected\n"
msgstr ""
-#: gfs2/fsck/pass3.c:214
-msgid "Marking GFS1 rindex file inode connected\n"
+#: gfs2/fsck/lost_n_found.c:213
+msgid "Trying to add lost+found to itself...skipping"
msgstr ""
-#: gfs2/fsck/pass3.c:220
-msgid "Marking GFS1 quota file inode connected\n"
+#: gfs2/fsck/lost_n_found.c:280
+msgid "from lost+found"
msgstr ""
-#: gfs2/fsck/pass3.c:227
-msgid "Marking master directory inode connected\n"
+#: gfs2/fsck/lost_n_found.c:283
+msgid "to lost+found"
msgstr ""
-#: gfs2/fsck/pass3.c:237
-msgid "Checking directory linkage.\n"
+#: gfs2/fsck/lost_n_found.c:285
+#, c-format
+msgid "Added inode #%llu (0x%llx) to lost+found\n"
msgstr ""
-#: gfs2/fsck/pass3.c:250
+#: gfs2/fsck/rgrepair.c:27
#, c-format
-msgid "Directory at block %llu (0x%llx) connected\n"
+msgid "rindex #%d "
msgstr ""
-#: gfs2/fsck/pass3.c:258
-msgid "Found unlinked directory containing bad block\n"
+#: gfs2/fsck/rgrepair.c:55
+#, c-format
+msgid "Checking for rgrps in journal%d.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:260
-msgid "Clear unlinked directory with bad blocks? (y/n) "
+#: gfs2/fsck/rgrepair.c:64
+#, c-format
+msgid "False rgrp found at block 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:262 gfs2/fsck/pass3.c:289
+#: gfs2/fsck/rgrepair.c:111
#, c-format
-msgid "inode %lld (0x%llx) is now marked as free\n"
+msgid "rgrp found at block 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:276
-msgid "Unlinked directory with bad block remains\n"
+#: gfs2/fsck/rgrepair.c:133
+msgid "(shortest so far)\n"
msgstr ""
-#: gfs2/fsck/pass3.c:281
-msgid "Unlinked block marked as an inode is not an inode\n"
+#: gfs2/fsck/rgrepair.c:149
+#, c-format
+msgid "First rgrp distance: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:283
-msgid "Clear the unlinked block? (y/n) "
+#: gfs2/fsck/rgrepair.c:150
+#, c-format
+msgid "Distance between rgrps: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:285
-msgid "The block was not cleared\n"
+#: gfs2/fsck/rgrepair.c:160
+msgid "rgrp 2 is damaged: getting dist from index: "
msgstr ""
-#: gfs2/fsck/pass3.c:299
-msgid "The block was cleared\n"
+#: gfs2/fsck/rgrepair.c:165
+msgid "rgrp index 2 is damaged: extrapolating dist: "
msgstr ""
-#: gfs2/fsck/pass3.c:303
+#: gfs2/fsck/rgrepair.c:171
#, c-format
-msgid "Found unlinked directory at block %llu (0x%llx)\n"
+msgid "Adjusted first rgrp distance: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:309
-msgid "Unlinked directory has zero size.\n"
+#: gfs2/fsck/rgrepair.c:331
+#, c-format
+msgid "rgrp found at 0x%llx, length=%d, used=%llu, free=%d\n"
msgstr ""
-#: gfs2/fsck/pass3.c:311
-msgid "Remove zero-size unlinked directory? (y/n) "
+#: gfs2/fsck/rgrepair.c:365
+#, c-format
+msgid "rgrp found at 0x%llx, length=%lld\n"
msgstr ""
-#: gfs2/fsck/pass3.c:314
-msgid "zero-sized unlinked inode"
+#: gfs2/fsck/rgrepair.c:461
+#, c-format
+msgid "Block 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass3.c:319
-msgid "Zero-size unlinked directory remains\n"
+#: gfs2/fsck/rgrepair.c:468
+msgid "Can't allocate memory for rgrp repair.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:323
-msgid "Add unlinked directory to lost+found? (y/n) "
+#: gfs2/fsck/rgrepair.c:478
+#, c-format
+msgid "Missing or damaged rgrp at block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass3.c:330
-msgid "Directory relinked to lost+found\n"
+#: gfs2/fsck/rgrepair.c:483
+msgid ""
+"Error: too many missing or damaged rgrps using this method. Time to try "
+"another method.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:332
-msgid "Unlinked directory remains unlinked\n"
+#: gfs2/fsck/rgrepair.c:520 gfs2/fsck/rgrepair.c:574
+#, c-format
+msgid "Prev ri_data set to: %lx.\n"
msgstr ""
-#: gfs2/fsck/pass3.c:339
+#: gfs2/fsck/rgrepair.c:525
#, c-format
-msgid "At end of pass3, lost+found entries is %u\n"
+msgid " rgrp %d at block 0x%llx intact"
msgstr ""
-#: gfs2/fsck/pass4.c:28
+#: gfs2/fsck/rgrepair.c:528
#, c-format
-msgid "Fixing inode link count (%d->%d) for %llu (0x%llx) \n"
+msgid "* rgrp %d at block 0x%llx *** DAMAGED ***"
msgstr ""
-#: gfs2/fsck/pass4.c:37
+#: gfs2/fsck/rgrepair.c:551 gfs2/fsck/rgrepair.c:554
#, c-format
-msgid "Changing inode %llu (0x%llx) to have %u links\n"
+msgid " [length 0x%llx]\n"
msgstr ""
-#: gfs2/fsck/pass4.c:58
-msgid "osi_tree broken in scan_info_list!!\n"
+#: gfs2/fsck/rgrepair.c:581
+msgid "rindex rebuilt as follows:\n"
msgstr ""
-#: gfs2/fsck/pass4.c:69
+#: gfs2/fsck/rgrepair.c:648
#, c-format
-msgid "Found unlinked inode at %llu (0x%llx)\n"
+msgid "rgsize must be: %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass4.c:74
+#: gfs2/fsck/rgrepair.c:658
#, c-format
-msgid "Unlinked inode %llu (0x%llx) contains bad blocks\n"
-msgstr ""
-
-#: gfs2/fsck/pass4.c:78
-msgid "Delete unlinked inode with bad blocks? (y/n) "
-msgstr ""
-
-#: gfs2/fsck/pass4.c:85
-msgid "bad unlinked"
+msgid "fs_total_size = 0x%llx blocks.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:90
-msgid "Unlinked inode with bad blocks not cleared\n"
+#: gfs2/fsck/rgrepair.c:660
+#, c-format
+msgid "L3: number of rgs in the index = %d.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:98
+#: gfs2/fsck/rgrepair.c:674
#, c-format
-msgid "Unlinked block %lld (0x%llx) marked as inode is not an inode (%d)\n"
+msgid "Block #%lld (0x%llx) (%d of %d) is not %s.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:104
-msgid "Delete unlinked inode? (y/n) "
+#: gfs2/fsck/rgrepair.c:678
+msgid "Fix the Resource Group? (y/n)"
msgstr ""
-#: gfs2/fsck/pass4.c:109
-msgid "invalid unlinked"
+#: gfs2/fsck/rgrepair.c:679
+msgid "Attempting to repair the rgrp.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:112
-msgid "The inode was deleted\n"
+#: gfs2/fsck/rgrepair.c:766
+msgid "The rindex file does not meet our expectations.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:114
-msgid "The inode was not deleted\n"
+#: gfs2/fsck/rgrepair.c:792 gfs2/fsck/rgrepair.c:804
+msgid "Error rebuilding rgrp list.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:126
-msgid "Unlinked inode has zero size\n"
+#: gfs2/fsck/rgrepair.c:814
+msgid "WARNING: rindex file is corrupt.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:127
-msgid "Clear zero-size unlinked inode? (y/n) "
+#: gfs2/fsck/rgrepair.c:819
+#, c-format
+msgid "L%d: number of rgs expected = %lld.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:130
-msgid "unlinked zero-length"
+#: gfs2/fsck/rgrepair.c:822
+#, c-format
+msgid "L%d: They don't match; either (1) the fs was extended, (2) an odd\n"
msgstr ""
-#: gfs2/fsck/pass4.c:137
-msgid "Add unlinked inode to lost+found? (y/n)"
+#: gfs2/fsck/rgrepair.c:824
+#, c-format
+msgid "L%d: rgrp size was used, or (3) we have a corrupt rg index.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:148
-msgid "Unlinked inode left unlinked\n"
+#: gfs2/fsck/rgrepair.c:850
+#, c-format
+msgid "%d addr: 0x%llx < 0x%llx * mismatch\n"
msgstr ""
-#: gfs2/fsck/pass4.c:152
+#: gfs2/fsck/rgrepair.c:857
#, c-format
-msgid ""
-"Link count inconsistent for inode %llu (0x%llx) has %u but fsck found %u.\n"
+msgid "%d addr: 0x%llx > 0x%llx * mismatch\n"
msgstr ""
-#: gfs2/fsck/pass4.c:159
+#: gfs2/fsck/rgrepair.c:867
#, c-format
-msgid "Update link count for inode %llu (0x%llx) ? (y/n) "
+msgid "%d addr: 0x%llx 0x%llx * has mismatch\n"
msgstr ""
-#: gfs2/fsck/pass4.c:167
+#: gfs2/fsck/rgrepair.c:878
#, c-format
-msgid "Link count updated to %d for inode %llu (0x%llx)\n"
+msgid "Level %d didn't work. Too many discrepancies.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:173
+#: gfs2/fsck/rgrepair.c:880
#, c-format
-msgid "Link count for inode %llu (0x%llx) still incorrect\n"
+msgid "%d out of %d rgrps (%d percent) did not match what was expected.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:178
+#: gfs2/fsck/rgrepair.c:905
#, c-format
-msgid "block %llu (0x%llx) has link count %d\n"
+msgid "Entry missing from rindex: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/pass4.c:185
-msgid "Unable to find lost+found inode in inode_hash!!\n"
+#: gfs2/fsck/rgrepair.c:910
+msgid "Out of memory!\n"
msgstr ""
-#: gfs2/fsck/pass4.c:207
-#, c-format
-msgid "At beginning of pass4, lost+found entries is %u\n"
+#: gfs2/fsck/rgrepair.c:929
+msgid "Fix the index? (y/n)"
msgstr ""
-#: gfs2/fsck/pass4.c:209
-msgid "Checking inode reference counts.\n"
+#: gfs2/fsck/rgrepair.c:950
+msgid "rindex not fixed.\n"
msgstr ""
-#: gfs2/fsck/pass4.c:216
+#: gfs2/fsck/main.c:58
#, c-format
-msgid "At end of pass4, lost+found entries is %u\n"
+msgid "GFS2 fsck %s (built %s %s)\n"
msgstr ""
-#: gfs2/fsck/pass5.c:53 gfs2/fsck/pass5.c:97
+#: gfs2/fsck/main.c:118
#, c-format
-msgid "Invalid block type %d found\n"
+msgid "No device specified (Please use '-h' for help)\n"
msgstr ""
-#: gfs2/fsck/pass5.c:92
+#: gfs2/fsck/main.c:130
#, c-format
-msgid "Invalid freemeta type %d found\n"
+msgid "progress unknown.\n"
msgstr ""
-#: gfs2/fsck/pass5.c:133
+#: gfs2/fsck/main.c:132
#, c-format
-msgid "Invalid status for block %llu (0x%llx).\n"
+msgid "processing block %llu out of %llu\n"
msgstr ""
-#: gfs2/fsck/pass5.c:145
-#, c-format
-msgid "Unlinked inode found at block %llu (0x%llx).\n"
+#: gfs2/fsck/main.c:137
+msgid ""
+"Do you want to abort gfs2_fsck, skip the rest of this pass or continue (a/s/"
+"c)?"
msgstr ""
-#: gfs2/fsck/pass5.c:149
-msgid "Do you want to reclaim the block? (y/n) "
+#: gfs2/fsck/main.c:187
+msgid "The statfs file is accurate.\n"
msgstr ""
-#: gfs2/fsck/pass5.c:152
-#, c-format
-msgid "Unlinked block %llu (0x%llx) bitmap not fixed.\n"
+#: gfs2/fsck/main.c:190
+msgid ""
+"The statfs file is wrong:\n"
+"\n"
msgstr ""
-#: gfs2/fsck/pass5.c:158
-#, c-format
-msgid "Unlinked block %llu (0x%llx) bitmap fixed.\n"
+#: gfs2/fsck/main.c:191
+msgid "Current statfs values:\n"
msgstr ""
-#: gfs2/fsck/pass5.c:163
+#: gfs2/fsck/main.c:192 gfs2/fsck/main.c:203
#, c-format
-msgid "Unlinked block found at block %llu (0x%llx), left unchanged.\n"
+msgid "blocks: %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass5.c:172
+#: gfs2/fsck/main.c:195 gfs2/fsck/main.c:206
#, c-format
-msgid "Block %llu (0x%llx) bitmap says %u (%s) but FSCK saw %u (%s)\n"
+msgid "free: %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass5.c:179
+#: gfs2/fsck/main.c:198
#, c-format
-msgid "Metadata type is %u (%s)\n"
+msgid ""
+"dinodes: %lld (0x%llx)\n"
+"\n"
msgstr ""
-#: gfs2/fsck/pass5.c:182
+#: gfs2/fsck/main.c:202
+msgid "Calculated statfs values:\n"
+msgstr ""
+
+#: gfs2/fsck/main.c:209
#, c-format
-msgid "Fix bitmap for block %llu (0x%llx) ? (y/n) "
+msgid "dinodes: %lld (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/pass5.c:186
-msgid "Repair failed.\n"
+#: gfs2/fsck/main.c:214
+msgid "Okay to fix the master statfs file? (y/n)"
msgstr ""
-#: gfs2/fsck/pass5.c:188
-msgid "Fixed.\n"
+#: gfs2/fsck/main.c:215
+msgid "The statfs file was not fixed.\n"
msgstr ""
-#: gfs2/fsck/pass5.c:190
-#, c-format
-msgid "Bitmap at block %llu (0x%llx) left inconsistent\n"
+#: gfs2/fsck/main.c:220
+msgid "The statfs file was fixed.\n"
msgstr ""
-#: gfs2/fsck/pass5.c:228
+#: gfs2/fsck/main.c:249
#, c-format
-msgid "RG #%llu (0x%llx) free count inconsistent: is %u should be %u\n"
+msgid "Starting %s\n"
msgstr ""
-#: gfs2/fsck/pass5.c:237
+#: gfs2/fsck/main.c:255
#, c-format
-msgid "RG #%llu (0x%llx) Inode count inconsistent: is %u should be %u\n"
+msgid "%s interrupted \n"
msgstr ""
-#: gfs2/fsck/pass5.c:246
+#: gfs2/fsck/main.c:258
#, c-format
-msgid ""
-"RG #%llu (0x%llx) Used metadata count inconsistent: is %u should be %u\n"
+msgid "%s complete \n"
msgstr ""
-#: gfs2/fsck/pass5.c:255
+#: gfs2/fsck/main.c:280
+msgid "Initializing fsck\n"
+msgstr ""
+
+#: gfs2/fsck/main.c:285
#, c-format
-msgid ""
-"RG #%llu (0x%llx) Free metadata count inconsistent: is %u should be %u\n"
+msgid "%s: clean.\n"
msgstr ""
-#: gfs2/fsck/pass5.c:267
-msgid "Internal fsck error - AAHHH!\n"
+#: gfs2/fsck/main.c:315
+msgid "Writing changes to disk\n"
msgstr ""
-#: gfs2/fsck/pass5.c:271
-msgid "Update resource group counts? (y/n) "
+#: gfs2/fsck/main.c:318
+msgid "gfs2_fsck complete\n"
msgstr ""
-#: gfs2/fsck/pass5.c:272
-msgid "Resource group counts updated\n"
+#: gfs2/fsck/fs_recovery.c:125
+#, c-format
+msgid "Journal replay writing metadata block #%lld (0x%llx) for journal+0x%x\n"
msgstr ""
-#: gfs2/fsck/pass5.c:279
-msgid "Resource group counts left inconsistent\n"
+#: gfs2/fsck/fs_recovery.c:131 gfs2/fsck/fs_recovery.c:243
+msgid "Out of memory when replaying journals.\n"
msgstr ""
-#: gfs2/fsck/pass5.c:301
+#: gfs2/fsck/fs_recovery.c:183
#, c-format
-msgid "Verifying Resource Group #%llu\n"
+msgid ""
+"Journal replay processing revoke for block #%lld (0x%llx) for journal+0x%x\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:27
+#: gfs2/fsck/fs_recovery.c:237
#, c-format
-msgid "rindex #%d "
+msgid "Journal replay writing data block #%lld (0x%llx) for journal+0x%x\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:55
+#: gfs2/fsck/fs_recovery.c:390
#, c-format
-msgid "Checking for rgrps in journal%d.\n"
+msgid "Journal block %u (0x%x): sequence no. 0x%llx out of order.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:64
+#: gfs2/fsck/fs_recovery.c:392
#, c-format
-msgid "False rgrp found at block 0x%llx\n"
+msgid "Low: 0x%llx, High: 0x%llx, Prev: 0x%llx\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:111
+#: gfs2/fsck/fs_recovery.c:399
#, c-format
-msgid "rgrp found at block 0x%llx\n"
+msgid "Renumbering it as 0x%llx\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:133
-msgid "(shortest so far)\n"
+#: gfs2/fsck/fs_recovery.c:453
+#, c-format
+msgid "jid=%u: Looking at journal...\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:149
+#: gfs2/fsck/fs_recovery.c:459
#, c-format
-msgid "First rgrp distance: 0x%llx\n"
+msgid "Journal #%d (\"journal%d\") is corrupt\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:150
+#: gfs2/fsck/fs_recovery.c:460
+msgid "Not fixing it due to the -n option.\n"
+msgstr ""
+
+#: gfs2/fsck/fs_recovery.c:464
#, c-format
-msgid "Distance between rgrps: 0x%llx\n"
+msgid "Journal #%d (\"journal%d\") is corrupt.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:160
-msgid "rgrp 2 is damaged: getting dist from index: "
+#: gfs2/fsck/fs_recovery.c:466
+msgid ""
+"I'm not fixing it because it may be unsafe:\n"
+"Locking protocol is not lock_nolock and the -a or -p option was specified.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:165
-msgid "rgrp index 2 is damaged: extrapolating dist: "
+#: gfs2/fsck/fs_recovery.c:469 gfs2/fsck/fs_recovery.c:512
+msgid ""
+"Please make sure no node has the file system mounted then rerun fsck.gfs2 "
+"manually without -a or -p.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:171
+#: gfs2/fsck/fs_recovery.c:474
#, c-format
-msgid "Adjusted first rgrp distance: 0x%llx\n"
+msgid ""
+"\n"
+"Journal #%d (\"journal%d\") is corrupt. Okay to repair it? (y/n)"
msgstr ""
-#: gfs2/fsck/rgrepair.c:331
+#: gfs2/fsck/fs_recovery.c:477
#, c-format
-msgid "rgrp found at 0x%llx, length=%d, used=%llu, free=%d\n"
+msgid "jid=%u: The journal was not repaired.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:365
+#: gfs2/fsck/fs_recovery.c:481
#, c-format
-msgid "rgrp found at 0x%llx, length=%lld\n"
+msgid "jid=%u: Repairing journal...\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:461
+#: gfs2/fsck/fs_recovery.c:484 gfs2/fsck/fs_recovery.c:490
#, c-format
-msgid "Block 0x%llx\n"
+msgid "jid=%u: Unable to fix the bad journal.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:468
-msgid "Can't allocate memory for rgrp repair.\n"
+#: gfs2/fsck/fs_recovery.c:494
+#, c-format
+msgid "jid=%u: The journal was successfully fixed.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:478
+#: gfs2/fsck/fs_recovery.c:498
#, c-format
-msgid "Missing or damaged rgrp at block %llu (0x%llx)\n"
+msgid "jid=%u: Journal is clean.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:483
-msgid ""
-"Error: too many missing or damaged rgrps using this method. Time to try "
-"another method.\n"
+#: gfs2/fsck/fs_recovery.c:503 gfs2/fsck/fs_recovery.c:508
+#, c-format
+msgid "Journal #%d (\"journal%d\") is dirty\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:520 gfs2/fsck/rgrepair.c:574
-#, c-format
-msgid "Prev ri_data set to: %lx.\n"
+#: gfs2/fsck/fs_recovery.c:504
+msgid "not replaying due to the -n option.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:525
-#, c-format
-msgid " rgrp %d at block 0x%llx intact"
+#: gfs2/fsck/fs_recovery.c:509
+msgid ""
+"I'm not replaying it because it may be unsafe:\n"
+"Locking protocol is not lock_nolock and the -a or -p option was specified.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:528
+#: gfs2/fsck/fs_recovery.c:518
#, c-format
-msgid "* rgrp %d at block 0x%llx *** DAMAGED ***"
+msgid ""
+"\n"
+"Journal #%d (\"journal%d\") is dirty. Okay to replay it? (y/n)"
msgstr ""
-#: gfs2/fsck/rgrepair.c:551 gfs2/fsck/rgrepair.c:554
+#: gfs2/fsck/fs_recovery.c:522
#, c-format
-msgid " [length 0x%llx]\n"
+msgid "jid=%u: Replaying journal...\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:581
-msgid "rindex rebuilt as follows:\n"
+#: gfs2/fsck/fs_recovery.c:534
+#, c-format
+msgid "jid=%u: Found %u revoke tags\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:648
+#: gfs2/fsck/fs_recovery.c:539
#, c-format
-msgid "rgsize must be: %lld (0x%llx)\n"
+msgid "jid=%u: Replayed %u of %u journaled data blocks\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:658
+#: gfs2/fsck/fs_recovery.c:541
#, c-format
-msgid "fs_total_size = 0x%llx blocks.\n"
+msgid "jid=%u: Replayed %u of %u metadata blocks\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:660
+#: gfs2/fsck/fs_recovery.c:548
#, c-format
-msgid "L3: number of rgs in the index = %d.\n"
+msgid "jid=%u: Done\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:674
+#: gfs2/fsck/fs_recovery.c:551
#, c-format
-msgid "Block #%lld (0x%llx) (%d of %d) is not %s.\n"
+msgid "jid=%u: Failed\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:678
-msgid "Fix the Resource Group? (y/n)"
+#: gfs2/fsck/fs_recovery.c:553
+msgid "Do you want to clear the journal instead? (y/n)"
msgstr ""
-#: gfs2/fsck/rgrepair.c:679
-msgid "Attempting to repair the rgrp.\n"
+#: gfs2/fsck/fs_recovery.c:558
+#, c-format
+msgid "jid=%u: journal not cleared.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:766
-msgid "The rindex file does not meet our expectations.\n"
+#: gfs2/fsck/fs_recovery.c:587
+#, c-format
+msgid ""
+"File system journal \"journal%d\" is missing: pass1 will try to recreate "
+"it.\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:792 gfs2/fsck/rgrepair.c:804
-msgid "Error rebuilding rgrp list.\n"
+#: gfs2/fsck/fs_recovery.c:607
+msgid "Recovering journals (this may take a while)\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:814
-msgid "WARNING: rindex file is corrupt.\n"
+#: gfs2/fsck/link.c:46
+#, c-format
+msgid "Dir (0x%llx) incremented counted links to %u for (0x%llx) via %s\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:819
+#: gfs2/fsck/link.c:53
#, c-format
-msgid "L%d: number of rgs expected = %lld.\n"
+msgid "Ref: (0x%llx) No match found when incrementing link for (0x%llx)!\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:822
+#: gfs2/fsck/link.c:77
#, c-format
-msgid "L%d: They don't match; either (1) the fs was extended, (2) an odd\n"
+msgid "Dir (0x%llx)'s link to (0x%llx) via %s is zero!\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:824
+#: gfs2/fsck/link.c:84
#, c-format
-msgid "L%d: rgrp size was used, or (3) we have a corrupt rg index.\n"
+msgid "Dir (0x%llx) decremented counted links to %u for (0x%llx) via %s\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:850
+#: gfs2/fsck/link.c:91
#, c-format
-msgid "%d addr: 0x%llx < 0x%llx * mismatch\n"
+msgid "No match found when decrementing link for (0x%llx)!\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:857
+#: gfs2/fsck/pass4.c:28
#, c-format
-msgid "%d addr: 0x%llx > 0x%llx * mismatch\n"
+msgid "Fixing inode link count (%d->%d) for %llu (0x%llx) \n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:867
+#: gfs2/fsck/pass4.c:37
#, c-format
-msgid "%d addr: 0x%llx 0x%llx * has mismatch\n"
+msgid "Changing inode %llu (0x%llx) to have %u links\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:878
-#, c-format
-msgid "Level %d didn't work. Too many discrepancies.\n"
+#: gfs2/fsck/pass4.c:58
+msgid "osi_tree broken in scan_info_list!!\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:880
+#: gfs2/fsck/pass4.c:69
#, c-format
-msgid "%d out of %d rgrps (%d percent) did not match what was expected.\n"
+msgid "Found unlinked inode at %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:905
+#: gfs2/fsck/pass4.c:74
#, c-format
-msgid "Entry missing from rindex: 0x%llx\n"
+msgid "Unlinked inode %llu (0x%llx) contains bad blocks\n"
msgstr ""
-#: gfs2/fsck/rgrepair.c:910
-msgid "Out of memory!\n"
+#: gfs2/fsck/pass4.c:78
+msgid "Delete unlinked inode with bad blocks? (y/n) "
msgstr ""
-#: gfs2/fsck/rgrepair.c:929
-msgid "Fix the index? (y/n)"
+#: gfs2/fsck/pass4.c:85
+msgid "bad unlinked"
msgstr ""
-#: gfs2/fsck/rgrepair.c:950
-msgid "rindex not fixed.\n"
+#: gfs2/fsck/pass4.c:90
+msgid "Unlinked inode with bad blocks not cleared\n"
msgstr ""
-#: gfs2/fsck/util.c:52
+#: gfs2/fsck/pass4.c:98
#, c-format
-msgid ""
-"\rChecking %lld%c of %lld%c of file at %lld (0x%llx)- %llu percent "
-"complete. \r"
+msgid "Unlinked block %lld (0x%llx) marked as inode is not an inode (%d)\n"
msgstr ""
-#: gfs2/fsck/util.c:84
-#, c-format
-msgid "\r%llu percent complete.\r"
+#: gfs2/fsck/pass4.c:104
+msgid "Delete unlinked inode? (y/n) "
msgstr ""
-#: gfs2/fsck/util.c:348
-msgid "Unable to allocate inode_with_dups structure\n"
+#: gfs2/fsck/pass4.c:109
+msgid "invalid unlinked"
msgstr ""
-#: gfs2/fsck/util.c:353
-msgid "Unable to zero inode_with_dups structure\n"
+#: gfs2/fsck/pass4.c:112
+msgid "The inode was deleted\n"
msgstr ""
-#: gfs2/fsck/util.c:378
-#, c-format
-msgid ""
-"Found %d reference(s) to block %llu (0x%llx) as %s in inode #%llu (0x%llx)\n"
+#: gfs2/fsck/pass4.c:114
+msgid "The inode was not deleted\n"
msgstr ""
-#: gfs2/fsck/util.c:385
-msgid "This is the original reference.\n"
+#: gfs2/fsck/pass4.c:126
+msgid "Unlinked inode has zero size\n"
msgstr ""
-#: gfs2/fsck/util.c:387
-#, c-format
-msgid "This brings the total to: %d duplicate references\n"
+#: gfs2/fsck/pass4.c:127
+msgid "Clear zero-size unlinked inode? (y/n) "
msgstr ""
-#: gfs2/fsck/util.c:412
-msgid "Unable to allocate dir_info structure\n"
+#: gfs2/fsck/pass4.c:130
+msgid "unlinked zero-length"
msgstr ""
-#: gfs2/fsck/util.c:416
-msgid "Error while zeroing dir_info structure\n"
+#: gfs2/fsck/pass4.c:137
+msgid "Add unlinked inode to lost+found? (y/n)"
msgstr ""
-#: gfs2/fsck/util.c:568
-msgid "directory"
+#: gfs2/fsck/pass4.c:148
+msgid "Unlinked inode left unlinked\n"
msgstr ""
-#: gfs2/fsck/util.c:575
-msgid "file"
+#: gfs2/fsck/pass4.c:152
+#, c-format
+msgid ""
+"Link count inconsistent for inode %llu (0x%llx) has %u but fsck found %u.\n"
msgstr ""
-#: gfs2/fsck/util.c:579
-msgid "symlink"
+#: gfs2/fsck/pass4.c:159
+#, c-format
+msgid "Update link count for inode %llu (0x%llx) ? (y/n) "
msgstr ""
-#: gfs2/fsck/util.c:584
-msgid "block device"
+#: gfs2/fsck/pass4.c:167
+#, c-format
+msgid "Link count updated to %d for inode %llu (0x%llx)\n"
msgstr ""
-#: gfs2/fsck/util.c:589
-msgid "character device"
+#: gfs2/fsck/pass4.c:173
+#, c-format
+msgid "Link count for inode %llu (0x%llx) still incorrect\n"
msgstr ""
-#: gfs2/fsck/util.c:594
-msgid "fifo"
+#: gfs2/fsck/pass4.c:179
+#, c-format
+msgid "block %llu (0x%llx) has link count %d\n"
msgstr ""
-#: gfs2/fsck/util.c:599
-msgid "socket"
+#: gfs2/fsck/pass4.c:186
+msgid "Unable to find lost+found inode in inode_hash!!\n"
msgstr ""
-#: gfs2/fsck/util.c:604
-msgid "invalid mode"
+#: gfs2/fsck/pass4.c:208
+#, c-format
+msgid "At beginning of pass4, lost+found entries is %u\n"
msgstr ""
-#: gfs2/mkfs/main.c:51
-msgid "Unknown mode\n"
+#: gfs2/fsck/pass4.c:210
+msgid "Checking inode reference counts.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:65
+#: gfs2/fsck/pass4.c:217
#, c-format
-msgid ""
-"Usage:\n"
-"\n"
-"gfs2_grow [options] /path/to/filesystem\n"
-"\n"
-"Options:\n"
-" -h Usage information\n"
-" -q Quiet, reduce verbosity\n"
-" -T Test, do everything except update FS\n"
-" -V Version information\n"
-" -v Verbose, increase verbosity\n"
+msgid "At end of pass4, lost+found entries is %u\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:99
+#: gfs2/fsck/pass1c.c:29
#, c-format
-msgid "(Test mode--File system will not be changed)\n"
+msgid "Bad Extended Attribute at block #%llu (0x%llx) removed.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:200
-#, c-format
-msgid "%d new rindex entries.\n"
+#: gfs2/fsck/pass1c.c:43
+msgid "Remove the bad Extended Attribute entry? (y/n) "
msgstr ""
-#: gfs2/mkfs/main_grow.c:227
-#, c-format
-msgid "Incorrect rindex size. want %ld(%d RGs), have %ld\n"
+#: gfs2/fsck/pass1c.c:57 gfs2/fsck/pass1c.c:70
+msgid "Bad Extended Attribute not removed.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:237
-msgid "Error writing first new rindex entry;aborted.\n"
+#: gfs2/fsck/pass1c.c:64
+msgid "Remove the bad Extended Attribute? (y/n) "
msgstr ""
-#: gfs2/mkfs/main_grow.c:247
-msgid "Error writing new rindex entries;aborted.\n"
+#: gfs2/fsck/pass1c.c:67
+msgid "Bad Extended Attribute removed.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:263
+#: gfs2/fsck/pass1c.c:83
#, c-format
-msgid "truncating rindex to %ld\n"
+msgid ""
+"Extended attributes indirect block #%llu (0x%llx) for inode #%llu (0x%llx) "
+"is invalid...removing\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:358 gfs2/mkfs/main_jadd.c:506
-#: gfs2/mkfs/main_mkfs.c:590
-msgid "Bad constants (1)"
+#: gfs2/fsck/pass1c.c:94
+#, c-format
+msgid ""
+"Extended attributes indirect block #%llu (0x%llx) for inode #%llu (0x%llx) "
+"is invalid.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:362
-msgid "gfs: Error reading superblock.\n"
+#: gfs2/fsck/pass1c.c:118
+#, c-format
+msgid "Extended attributes block for inode #%llu (0x%llx) is invalid.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:364
-msgid "cannot grow gfs1 filesystem\n"
+#: gfs2/fsck/pass1c.c:126
+#, c-format
+msgid "Extended attributes block for inode #%llu (0x%llx) invalid.\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:376
-msgid "GFS2 rindex not found. Please run gfs2_fsck.\n"
+#: gfs2/fsck/pass1c.c:151 gfs2/fsck/pass1c.c:167
+msgid "EA has name length of zero\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:390
-msgid "Error: No resource groups found.\n"
+#: gfs2/fsck/pass1c.c:156
+msgid "EA rec length too long\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:398
-msgid "Error: The device has grown by less than one Resource Group (RG).\n"
+#: gfs2/fsck/pass1c.c:162
+msgid "last EA has no last entry flag\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:400
+#: gfs2/fsck/pass1c.c:178
#, c-format
-msgid "The device grew by %lluMB. "
+msgid "EA (%s) type is invalid (%d > %d).\n"
msgstr ""
-#: gfs2/mkfs/main_grow.c:402
+#: gfs2/fsck/pass1c.c:192
#, c-format
-msgid "One RG is %uMB for this file system.\n"
-msgstr ""
-
-#: gfs2/mkfs/main_grow.c:423
-msgid "gfs2_grow complete.\n"
-msgstr ""
-
-#: gfs2/mkfs/main_jadd.c:62
-msgid "rename2system (1)\n"
-msgstr ""
-
-#: gfs2/mkfs/main_jadd.c:67
-msgid "rename2system (2)\n"
+msgid "EA (%s) has incorrect number of pointers.\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:79
+#: gfs2/fsck/pass1c.c:193
#, c-format
msgid ""
-"Usage:\n"
-"\n"
-"%s [options] /path/to/filesystem\n"
-"\n"
-"Options:\n"
-"\n"
-" -c <MB> Size of quota change file\n"
-" -D Enable debugging code\n"
-" -h Print this help, then exit\n"
-" -J <MB> Size of journals\n"
-" -j <num> Number of journals\n"
-" -q Don't print anything\n"
-" -V Print program version information, then exit\n"
+" Required: %d\n"
+" Reported: %d\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:145 gfs2/mkfs/main_mkfs.c:206 gfs2/tune/main.c:92
+#: gfs2/fsck/pass1c.c:198
#, c-format
-msgid "Invalid option: %c\n"
+msgid ""
+" Pointers Required: %d\n"
+" Pointers Reported: %d\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:154
-msgid "no path specified (try -h for help)\n"
+#: gfs2/fsck/pass1c.c:242
+msgid "Looking for inodes containing ea blocks...\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:157 gfs2/mkfs/main_mkfs.c:221
+#: gfs2/fsck/pass1c.c:252
#, c-format
-msgid "Unrecognized argument: %s\n"
+msgid "EA in inode %llu (0x%llx)\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:160 gfs2/mkfs/main_mkfs.c:224
+#: gfs2/fsck/pass1c.c:259
#, c-format
-msgid "Command Line Arguments:\n"
+msgid "Found eattr at %llu (0x%llx)\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:173 gfs2/mkfs/main_mkfs.c:369
-msgid "no journals specified\n"
+#: gfs2/fsck/pass1b.c:159
+#, c-format
+msgid ""
+"Duplicate block %llu (0x%llx) is in file or directory %llu (0x%llx) named "
+"%s\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:175 gfs2/mkfs/main_mkfs.c:372
-msgid "bad journal size\n"
+#: gfs2/fsck/pass1b.c:229
+msgid "no longer valid"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:177 gfs2/mkfs/main_mkfs.c:375
-msgid "bad quota change size\n"
+#: gfs2/fsck/pass1b.c:235
+#, c-format
+msgid ""
+"Not clearing duplicate reference in inode \"%s\" at block #%llu (0x%llx) to "
+"block #%llu (0x%llx) because it's valid for another inode.\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:197
-#, c-format
-msgid "Filesystem: %s\n"
+#: gfs2/fsck/pass1b.c:238
+msgid "unknown name"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:198
+#: gfs2/fsck/pass1b.c:242
#, c-format
-msgid "Old Journals %u\n"
+msgid "Inode %s is in directory %llu (0x%llx)\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:199
+#: gfs2/fsck/pass1b.c:344
#, c-format
-msgid "New Journals %u\n"
+msgid "Block %lld (0x%llx) is not gfs2 metadata.\n"
msgstr ""
-#: gfs2/mkfs/main_jadd.c:389
-msgid "There are no journals for this gfs2 fs! Did you mkfs.gfs2 correctly?\n"
+#: gfs2/fsck/pass1b.c:417 gfs2/fsck/pass1b.c:470
+msgid "Invalid "
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:52
+#: gfs2/fsck/pass1b.c:418
#, c-format
msgid ""
-"Usage:\n"
-"\n"
-"%s [options] <device> [ block-count ]\n"
-"\n"
-"Options:\n"
-"\n"
-" -b <bytes> Filesystem block size\n"
-" -c <MB> Size of quota change file\n"
-" -D Enable debugging code\n"
-" -h Print this help, then exit\n"
-" -J <MB> Size of journals\n"
-" -j <num> Number of journals\n"
-" -K Don't try to discard unused blocks\n"
-" -O Don't ask for confirmation\n"
-" -p <name> Name of the locking protocol\n"
-" -q Don't print anything\n"
-" -r <MB> Resource Group Size\n"
-" -t <name> Name of the lock table\n"
-" -V Print program version information, then exit\n"
+"Inode %s (%lld/0x%llx) has %d reference(s) to block %llu (0x%llx) (%s)\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:81
+#: gfs2/fsck/pass1b.c:498
#, c-format
-msgid "Issuing discard ioctl: range: %llu - %llu..."
+msgid ""
+"Inode %s (%lld/0x%llx) references block %llu (0x%llx) as '%s', but the block "
+"is really %s.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:90
+#: gfs2/fsck/pass1b.c:506
#, c-format
-msgid "Successful.\n"
+msgid "Okay to delete %s inode %lld (0x%llx)? (y/n) "
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:150
+#: gfs2/fsck/pass1b.c:508
+msgid "invalidated"
+msgstr ""
+
+#: gfs2/fsck/pass1b.c:511
+msgid "The bad inode was not cleared."
+msgstr ""
+
+#: gfs2/fsck/pass1b.c:520
#, c-format
-msgid "lock protocol name %s is too long\n"
+msgid "Clearing inode %lld (0x%llx)...\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:165
+#: gfs2/fsck/pass1b.c:536
+msgid "duplicate referencing bad"
+msgstr ""
+
+#: gfs2/fsck/pass1b.c:575
#, c-format
-msgid "lock table name %s is too long\n"
+msgid ""
+"Block %llu (0x%llx) has %d inodes referencing it for a total of %d duplicate "
+"references:\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:202
-msgid "More than one device specified (try -h for help)\n"
+#: gfs2/fsck/pass1b.c:633
+#, c-format
+msgid ""
+"----------------------------------------------\n"
+"Step 1: Eliminate references to block %llu (0x%llx) that were previously "
+"marked invalid.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:215 gfs2/convert/gfs2_convert.c:1704
-#: gfs2/convert/gfs2_convert.c:1708
+#: gfs2/fsck/pass1b.c:649
#, c-format
-msgid "No device specified. Please use '-h' for help\n"
+msgid ""
+"----------------------------------------------\n"
+"Step 2: Eliminate references to block %llu (0x%llx) that need the wrong "
+"block type.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:234
+#: gfs2/fsck/pass1b.c:664
#, c-format
-msgid " rgsize = optimize for best performance\n"
+msgid ""
+"----------------------------------------------\n"
+"Step 3: Choose one reference to block %llu (0x%llx) to keep.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:262
-msgid "locktable error: contains space characters\n"
+#: gfs2/fsck/pass1b.c:675
+#, c-format
+msgid "Block %llu (0x%llx) has no more references; Marking as 'free'.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:264
-msgid "locktable error: contains unprintable characters\n"
+#: gfs2/fsck/pass1b.c:686
+#, c-format
+msgid "Block %llu (0x%llx) has only one remaining reference.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:269
-msgid "locktable error: missing colon in the locktable\n"
+#: gfs2/fsck/pass1b.c:697
+#, c-format
+msgid ""
+"----------------------------------------------\n"
+"Step 4. Set block type based on the remaining reference in inode %lld (0x"
+"%llx).\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:272
-msgid "locktable error: missing cluster name\n"
+#: gfs2/fsck/pass1b.c:706
+#, c-format
+msgid ""
+"The remaining reference inode %lld (0x%llx) is marked invalid: Marking the "
+"block as free.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:274
-msgid "locktable error: cluster name too long\n"
+#: gfs2/fsck/pass1b.c:712 gfs2/fsck/pass1b.c:723
+msgid "reference-repaired leaf"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:278 gfs2/mkfs/main_mkfs.c:284
-msgid "locktable error: missing filesystem name\n"
+#: gfs2/fsck/pass1b.c:718
+msgid "reference-repaired data"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:281 gfs2/tune/super.c:205
-#, c-format
-msgid "locktable error: more than one colon present\n"
+#: gfs2/fsck/pass1b.c:727
+msgid "reference-repaired indirect"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:286
-msgid "locktable error: filesystem name too long\n"
+#: gfs2/fsck/pass1b.c:732
+msgid "reference-repaired extended attribute"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:288
-#, c-format
-msgid "lockproto error: %s unknown\n"
+#: gfs2/fsck/pass1b.c:738
+msgid "All duplicate references were processed.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:306
-#, c-format
-msgid "Are you sure you want to proceed? [y/n]"
+#: gfs2/fsck/pass1b.c:754
+msgid "Looking for duplicate blocks...\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:316
-msgid "aborted\n"
+#: gfs2/fsck/pass1b.c:758
+msgid "No duplicate blocks found\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:336
+#: gfs2/fsck/pass1b.c:764
+msgid "Scanning filesystem for inodes containing duplicate blocks...\n"
+msgstr ""
+
+#: gfs2/fsck/pass1b.c:765
#, c-format
-msgid "block size must be a power of two between 512 and %d\n"
+msgid "Filesystem has %llu (0x%llx) blocks total\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:340
+#: gfs2/fsck/pass1b.c:773
#, c-format
-msgid "Error: Block size %d is less than minimum logical block size (%d).\n"
+msgid "Found all %d original references to duplicates.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:346
+#: gfs2/fsck/pass1b.c:785
#, c-format
-msgid ""
-"WARNING: Block size %d is inefficient because it is less than the physical "
-"block size (%d).\n"
+msgid "Checking invalidated duplicate dinode %lld (0x%llx)\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:362 gfs2/mkfs/main_mkfs.c:365
-msgid "bad resource group size\n"
+#: gfs2/fsck/pass1b.c:800
+msgid "Handling duplicate blocks\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:460
+#: gfs2/fsck/pass5.c:53 gfs2/fsck/pass5.c:97
#, c-format
-msgid ""
-"Content of file or device unknown (do you have GNU fileutils installed?)\n"
+msgid "Invalid block type %d found\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:464
+#: gfs2/fsck/pass5.c:92
#, c-format
-msgid "It appears to contain: %s"
+msgid "Invalid freemeta type %d found\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:494
+#: gfs2/fsck/pass5.c:133
#, c-format
-msgid "Expert mode: on\n"
+msgid "Invalid status for block %llu (0x%llx).\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:496
+#: gfs2/fsck/pass5.c:145
#, c-format
-msgid "Device: %s\n"
+msgid "Unlinked inode found at block %llu (0x%llx).\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:498
-#, c-format
-msgid "Blocksize: %u\n"
+#: gfs2/fsck/pass5.c:149
+msgid "Do you want to reclaim the block? (y/n) "
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:499
+#: gfs2/fsck/pass5.c:152
#, c-format
-msgid "Device Size %.2f GB (%llu blocks)\n"
+msgid "Unlinked block %llu (0x%llx) bitmap not fixed.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:502
+#: gfs2/fsck/pass5.c:158
#, c-format
-msgid "Filesystem Size: %.2f GB (%llu blocks)\n"
+msgid "Unlinked block %llu (0x%llx) bitmap fixed.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:505
+#: gfs2/fsck/pass5.c:163
#, c-format
-msgid "Journals: %u\n"
+msgid "Unlinked block found at block %llu (0x%llx), left unchanged.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:506
+#: gfs2/fsck/pass5.c:172
#, c-format
-msgid "Resource Groups: %llu\n"
+msgid "Block %llu (0x%llx) bitmap says %u (%s) but FSCK saw %u (%s)\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:508
+#: gfs2/fsck/pass5.c:179
#, c-format
-msgid "Locking Protocol: \"%s\"\n"
+msgid "Metadata type is %u (%s)\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:509
+#: gfs2/fsck/pass5.c:182
#, c-format
-msgid "Lock Table: \"%s\"\n"
+msgid "Fix bitmap for block %llu (0x%llx) ? (y/n) "
+msgstr ""
+
+#: gfs2/fsck/pass5.c:186
+msgid "Repair failed.\n"
+msgstr ""
+
+#: gfs2/fsck/pass5.c:188
+msgid "Fixed.\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:513
+#: gfs2/fsck/pass5.c:190
#, c-format
-msgid "Writes: %u\n"
+msgid "Bitmap at block %llu (0x%llx) left inconsistent\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:516
+#: gfs2/fsck/pass5.c:228
#, c-format
-msgid "UUID: %s\n"
+msgid "RG #%llu (0x%llx) free count inconsistent: is %u should be %u\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:563
+#: gfs2/fsck/pass5.c:237
#, c-format
-msgid "This will destroy any data on %s.\n"
+msgid "RG #%llu (0x%llx) Inode count inconsistent: is %u should be %u\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:599
+#: gfs2/fsck/pass5.c:246
#, c-format
-msgid "%s: Specified block count is bigger than the actual device.\n"
+msgid ""
+"RG #%llu (0x%llx) Used metadata count inconsistent: is %u should be %u\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:601
+#: gfs2/fsck/pass5.c:255
#, c-format
-msgid "Device Size is %.2f GB (%llu blocks)\n"
+msgid ""
+"RG #%llu (0x%llx) Free metadata count inconsistent: is %u should be %u\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:627
-msgid "Error building jindex"
+#: gfs2/fsck/pass5.c:267
+msgid "Internal fsck error - AAHHH!\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:632
-msgid "Error building per-node directory"
+#: gfs2/fsck/pass5.c:271
+msgid "Update resource group counts? (y/n) "
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:637
-msgid "Error building inum inode"
+#: gfs2/fsck/pass5.c:272
+msgid "Resource group counts updated\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:643
-msgid "Error building statfs inode"
+#: gfs2/fsck/pass5.c:279
+msgid "Resource group counts left inconsistent\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:649
-msgid "Error building rindex inode"
+#: gfs2/fsck/pass5.c:301
+#, c-format
+msgid "Verifying Resource Group #%llu\n"
msgstr ""
-#: gfs2/mkfs/main_mkfs.c:654
-msgid "Error building quota inode"
+#: gfs2/fsck/pass1.c:129
+msgid "itself"
msgstr ""
-#: gfs2/tune/main.c:99
+#: gfs2/fsck/pass1.c:130
#, c-format
-msgid "Incorrect number of arguments\n"
+msgid ""
+"Bad indirect block pointer (invalid or out of range) found in system inode "
+"%lld (0x%llx).\n"
msgstr ""
-#: gfs2/tune/main.c:105
-#, c-format
-msgid "The -L and -o locktable= options are mutually exclusive\n"
+#: gfs2/fsck/pass1.c:137 gfs2/fsck/pass1.c:191
+msgid "system file"
msgstr ""
-#: gfs2/tune/main.c:114
+#: gfs2/fsck/pass1.c:172
#, c-format
-msgid "Unable to open device %s\n"
+msgid ""
+"Block # referenced by system directory entry %s in inode %lld (0x%llx) is "
+"invalid or out of range; ignored.\n"
msgstr ""
-#: gfs2/tune/super.c:65
-#, c-format
-msgid "Invalid UUID specified.\n"
+#: gfs2/fsck/pass1.c:226
+msgid "Error: Cannot allocate memory to fix the leaf pointers.\n"
msgstr ""
-#: gfs2/tune/super.c:75
-#, c-format
-msgid "uuid %s has an invalid format."
+#: gfs2/fsck/pass1.c:234 gfs2/fsck/pass1.c:252
+msgid "Error: bad read while fixing leaf pointers.\n"
msgstr ""
-#: gfs2/tune/super.c:80
+#: gfs2/fsck/pass1.c:301
#, c-format
-msgid "uuid %s has an invalid hex digit '%c' at offset %d.\n"
+msgid ""
+"Directory #%llu (0x%llx) has an invalid number of pointers to leaf #%llu (0x"
+"%llx)\n"
+"\tFound: %u, which is not a factor of 2.\n"
msgstr ""
-#: gfs2/tune/super.c:109
-#, c-format
-msgid "Not a GFS/GFS2 device\n"
+#: gfs2/fsck/pass1.c:308 gfs2/fsck/pass1.c:329
+msgid "Attempt to fix it? (y/n) "
msgstr ""
-#: gfs2/tune/super.c:127
-#, c-format
-msgid "Filesystem volume name: %s\n"
+#: gfs2/fsck/pass1.c:309
+msgid "Directory inode was not fixed.\n"
msgstr ""
-#: gfs2/tune/super.c:129
-#, c-format
-msgid "Filesystem UUID: %s\n"
+#: gfs2/fsck/pass1.c:316
+msgid "Directory inode was fixed.\n"
msgstr ""
-#: gfs2/tune/super.c:130
+#: gfs2/fsck/pass1.c:322
#, c-format
-msgid "Filesystem magic number: 0x%X\n"
+msgid ""
+"Directory #%llu (0x%llx) has an incorrect number of pointers to leaf #%llu "
+"(0x%llx)\n"
+"\tFound: %u, Expected: %u\n"
msgstr ""
-#: gfs2/tune/super.c:131
-#, c-format
-msgid "Block size: %d\n"
+#: gfs2/fsck/pass1.c:330
+msgid "Directory leaf was not fixed.\n"
msgstr ""
-#: gfs2/tune/super.c:132
+#: gfs2/fsck/pass1.c:335
#, c-format
-msgid "Block shift: %d\n"
+msgid "Leaf depth was %d, changed to %d\n"
msgstr ""
-#: gfs2/tune/super.c:133
-#, c-format
-msgid "Root inode: %llu\n"
+#: gfs2/fsck/pass1.c:340
+msgid "Directory leaf was fixed.\n"
msgstr ""
-#: gfs2/tune/super.c:135
+#: gfs2/fsck/pass1.c:355
#, c-format
-msgid "Master inode: %llu\n"
+msgid ""
+"Found duplicate block %llu (0x%llx) referenced as a directory leaf in dinode "
+"%llu (0x%llx) - was marked %d (%s)\n"
msgstr ""
-#: gfs2/tune/super.c:136
-#, c-format
-msgid "Lock Protocol: %s\n"
+#: gfs2/fsck/pass1.c:369
+msgid "directory leaf"
msgstr ""
-#: gfs2/tune/super.c:137
-#, c-format
-msgid "Lock table: %s\n"
+#: gfs2/fsck/pass1.c:391 gfs2/fsck/pass1.c:468
+msgid "bad block referencing"
msgstr ""
-#: gfs2/tune/super.c:158
+#: gfs2/fsck/pass1.c:392
#, c-format
-msgid "UUID can be changed for a GFS2"
+msgid ""
+"Bad indirect block (invalid/out of range) found in inode %lld (0x%llx).\n"
msgstr ""
-#: gfs2/tune/super.c:159
-#, c-format
-msgid " device only\n"
+#: gfs2/fsck/pass1.c:401
+msgid "a directory hash table block"
msgstr ""
-#: gfs2/tune/super.c:173
-#, c-format
-msgid "Lock protocol name too long\n"
+#: gfs2/fsck/pass1.c:404
+msgid "a journaled data block"
msgstr ""
-#: gfs2/tune/super.c:179
+#: gfs2/fsck/pass1.c:408
#, c-format
-msgid "Incorrect lock protocol specified\n"
+msgid ""
+"Found duplicate block %llu (0x%llx) referenced as metadata in indirect block "
+"for dinode %llu (0x%llx) - was marked %d (%s)\n"
msgstr ""
-#: gfs2/tune/super.c:190
+#: gfs2/fsck/pass1.c:422
#, c-format
-msgid "Lock table name too long\n"
+msgid ""
+"Inode %lld (0x%llx) has a bad indirect block pointer %lld (0x%llx) (points "
+"to something that is not %s).\n"
msgstr ""
-#: gfs2/tune/super.c:197
-#, c-format
-msgid "locktable error: mising colon in the locktable\n"
+#: gfs2/fsck/pass1.c:430 gfs2/fsck/pass1.c:481 gfs2/fsck/pass1.c:498
+msgid "bad indirect"
msgstr ""
-#: gfs2/tune/super.c:201
+#: gfs2/fsck/pass1.c:450
+msgid "indirect"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:476
+msgid "Metadata"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:509
#, c-format
-msgid "locktable error: fsname too long\n"
+msgid ""
+"inode %lld (0x%llx) has a bad data block pointer %lld (invalid or out of "
+"range)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:554
-msgid "Error: Can't allocate memory for indirect block fix\n"
+#: gfs2/fsck/pass1.c:518
+msgid "bad (out of range) data"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:561 gfs2/convert/gfs2_convert.c:596
-#: gfs2/convert/gfs2_convert.c:696
-msgid "Error: Can't allocate memory for file conversion.\n"
+#: gfs2/fsck/pass1.c:524
+#, c-format
+msgid ""
+"Found duplicate %s block %llu (0x%llx) referenced as data by dinode %llu (0x"
+"%llx)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:589 gfs2/convert/gfs2_convert.c:690
-msgid "Error: Can't allocate memory for indirect block fix.\n"
+#: gfs2/fsck/pass1.c:532
+msgid "Seems to be a normal duplicate; I'll sort it out in pass1b.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:836 gfs2/convert/gfs2_convert.c:871
-#: gfs2/convert/gfs2_convert.c:913
-msgid "Error: out of memory.\n"
+#: gfs2/fsck/pass1.c:542
+msgid ""
+"The block was invalid as metadata but might be okay as data. I'll sort it "
+"out in pass1b.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1007
-msgid "Converting inodes.\n"
+#: gfs2/fsck/pass1.c:552
+#, c-format
+msgid "Block %lld (0x%llx) is a GFS1 rindex block\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1026 gfs2/convert/gfs2_convert.c:1081
+#: gfs2/fsck/pass1.c:555
+msgid "rgrp"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:558
#, c-format
-msgid "\r%llu inodes from %d rgs converted."
+msgid "Block %lld (0x%llx) is a GFS1 journaled data block\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1122
-msgid "Error retrieving directory.\n"
+#: gfs2/fsck/pass1.c:561
+msgid "jdata"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1147 gfs2/convert/gfs2_convert.c:2164
+#: gfs2/fsck/pass1.c:578
+msgid "bad (invalid or out of range) data"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:604
#, c-format
-msgid "\r%llu directories, %llu dirents fixed."
+msgid ""
+"Moving inode %lld (0x%llx)'s duplicate reference to %lld (0x%llx) from the "
+"valid to the invalid reference list.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1158
+#: gfs2/fsck/pass1.c:625
#, c-format
-msgid "Error retrieving inode 0x%llx\n"
+msgid "Duplicate reference to %lld (0x%llx) not moved.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1252
-msgid "fix_one_directory_exhash: error reading directory.\n"
+#: gfs2/fsck/pass1.c:644
+#, c-format
+msgid "Inode %lld (0x%llx) has unrecoverable Extended Attribute errors.\n"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:647
+msgid "Clear all Extended Attributes from the inode? (y/n) "
+msgstr ""
+
+#: gfs2/fsck/pass1.c:649
+msgid "Extended attributes were removed.\n"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:651
+msgid "Unable to remove inode eattr pointer; the error remains.\n"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:654
+msgid "Extended attributes were not removed.\n"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:671
+#, c-format
+msgid "Inode #%llu (0x%llx): %s"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1268
+#: gfs2/fsck/pass1.c:674
#, c-format
-msgid "Error reading leaf %llx\n"
+msgid " at block #%lld (0x%llx).\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1296
-msgid "Error fixing exhash directory.\n"
+#: gfs2/fsck/pass1.c:676
+msgid "Clear the bad Extended Attribute? (y/n) "
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1303
-msgid "Error fixing linear directory.\n"
+#: gfs2/fsck/pass1.c:679
+msgid "The bad extended attribute was removed.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1330
-msgid ""
-"\n"
-"Fixing file and directory information.\n"
+#: gfs2/fsck/pass1.c:683
+msgid "bad extended attribute"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1345
-msgid "Error processing directory\n"
+#: gfs2/fsck/pass1.c:687
+msgid "The bad Extended Attribute was not fixed.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1381 gfs2/convert/gfs2_convert.c:1387
-#, c-format
-msgid "Error retrieving inode at block %llx\n"
+#: gfs2/fsck/pass1.c:721
+msgid "Bad indirect Extended Attribute duplicate found"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1403
-msgid "Error trying to fix cdpn dentry\n"
+#: gfs2/fsck/pass1.c:727
+msgid "Extended Attribute indirect block has incorrect type"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1437
+#: gfs2/fsck/pass1.c:732
+#, c-format
msgid ""
-"The size reported in the journal index inode is not a\n"
-"\tmultiple of the size of a journal index.\n"
+"Inode #%llu (0x%llx): Duplicate Extended Attribute indirect block found at #"
+"%llu (0x%llx).\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1443
-msgid "Unable to allocate journal index\n"
+#: gfs2/fsck/pass1.c:744
+msgid "indirect Extended Attribute"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1447
-msgid "Unable to zero journal index\n"
+#: gfs2/fsck/pass1.c:760
+#, c-format
+msgid "Marking inode #%llu (0x%llx) with extended attribute block\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1466
-msgid "An error occurred while reading the journal index file.\n"
+#: gfs2/fsck/pass1.c:778
+#, c-format
+msgid ""
+"Inode %lld (0x%llx) has recoverable indirect Extended Attribute errors.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1476
-msgid "journal inode size invalid\n"
+#: gfs2/fsck/pass1.c:782
+msgid "Okay to fix the block count for the inode? (y/n) "
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1525 gfs2/convert/gfs2_convert.c:1547
-#: gfs2/convert/gfs2_convert.c:1553 gfs2/convert/gfs2_convert.c:1564
-#: gfs2/convert/gfs2_convert.c:1570 gfs2/convert/gfs2_convert.c:2200
-msgid "Error: Bad constants (1)\n"
+#: gfs2/fsck/pass1.c:786
+msgid "Block count fixed.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1581
-#, c-format
-msgid "Error: %s does not look like a gfs1 filesystem.\n"
+#: gfs2/fsck/pass1.c:789
+msgid "Block count not fixed.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1603
-#, c-format
-msgid "Examining file system"
+#: gfs2/fsck/pass1.c:814
+msgid "Bad Extended Attribute duplicate found"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1605
-msgid "Unable to fill in resource group information.\n"
+#: gfs2/fsck/pass1.c:817
+msgid "Extended Attribute leaf block has incorrect type"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1612
+#: gfs2/fsck/pass1.c:824
#, c-format
-msgid "%d rgs found.\n"
+msgid "Duplicate block found at #%lld (0x%llx).\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1621
-#, c-format
-msgid "This program will convert a gfs1 filesystem to a gfs2 filesystem.\n"
+#: gfs2/fsck/pass1.c:837
+msgid "Extended Attribute block removed due to previous errors.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1623
+#: gfs2/fsck/pass1.c:845
+msgid "Extended Attribute"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:874
#, c-format
msgid ""
-"WARNING: This can't be undone. It is strongly advised that you:\n"
-"\n"
+"Inode #%llu (0x%llx): Extended Attribute block %llu (0x%llx) has an extended "
+"leaf block #%llu (0x%llx) that is invalid or out of range.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1625
-#, c-format
-msgid " 1. Back up your entire filesystem first.\n"
+#: gfs2/fsck/pass1.c:884
+msgid "bad (out of range) Extended Attribute "
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1626
+#: gfs2/fsck/pass1.c:907
#, c-format
-msgid " 2. Run fsck.gfs2 first to ensure filesystem integrity.\n"
+msgid "Setting inode %lld (0x%llx) as having eattr block(s) attached.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1627
+#: gfs2/fsck/pass1.c:918
#, c-format
-msgid " 3. Make sure the filesystem is NOT mounted from any node.\n"
+msgid ""
+"Inode #%llu (0x%llx): Extended Attribute leaf block #%llu (0x%llx) is "
+"invalid or out of range.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1628
-#, c-format
-msgid " 4. Make sure you have the latest software versions.\n"
+#: gfs2/fsck/pass1.c:925
+msgid "bad (out of range) Extended Attribute leaf"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1636
+#: gfs2/fsck/pass1.c:999
#, c-format
-msgid "gfs2_convert version %s (built %s %s)\n"
+msgid ""
+"%s block %lld (0x%llx), part of inode %lld (0x%llx), was previously "
+"referenced so the invalid reference is ignored.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1647
+#: gfs2/fsck/pass1.c:1073
#, c-format
msgid ""
-"\n"
-"Usage:\n"
+"Bad %s block pointer (invalid or out of range #%ld) found in inode %lld (0x"
+"%llx).\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1648
+#: gfs2/fsck/pass1.c:1087
#, c-format
msgid ""
-"%s [-hnqvVy] <device>\n"
-"\n"
+"Duplicated %s block pointer (violation %ld, block %lld (0x%llx)) found in "
+"inode %lld (0x%llx).\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1650
+#: gfs2/fsck/pass1.c:1162
#, c-format
-msgid "\th - print this help message\n"
+msgid "Error: inode %llu (0x%llx) has more than %d bad pointers.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1651
-#, c-format
-msgid "\tn - assume 'no' to all questions\n"
+#: gfs2/fsck/pass1.c:1168
+msgid "badly corrupt"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1652
+#: gfs2/fsck/pass1.c:1200
#, c-format
-msgid "\tq - quieter output\n"
+msgid ""
+"Directory dinode block #%llu (0x%llx) has bad depth. Found %u, Expected %u\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1653
-#, c-format
-msgid "\tv - more verbose output\n"
+#: gfs2/fsck/pass1.c:1206
+msgid "bad depth"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1654
+#: gfs2/fsck/pass1.c:1218
#, c-format
-msgid "\tV - print version information\n"
+msgid "Error: inode %llu (0x%llx) has unrecoverable errors; invalidating.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1655
-#, c-format
-msgid "\ty - assume 'yes' to all questions\n"
+#: gfs2/fsck/pass1.c:1229
+msgid "corrupt"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1695
+#: gfs2/fsck/pass1.c:1241
#, c-format
-msgid "Parameter not understood: %c\n"
+msgid ""
+"Inode #%llu (0x%llx): Ondisk block count (%llu) does not match what fsck "
+"found (%llu)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1759
-msgid "Converting journal space to rg space.\n"
+#: gfs2/fsck/pass1.c:1248
+#, c-format
+msgid ""
+"inode has: %lld, but fsck counts: Dinode:1 + indir:%lld + data: %lld + ea: "
+"%lld\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1781
-msgid "Error: No suitable rg found for journal.\n"
+#: gfs2/fsck/pass1.c:1254
+msgid "Fix ondisk block count? (y/n) "
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1784
+#: gfs2/fsck/pass1.c:1258
#, c-format
-msgid "Addr 0x%llx comes after rg at addr 0x%llx\n"
+msgid "Block count for #%llu (0x%llx) fixed\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1825
-msgid "gfs2_convert: Error converting bitmaps.\n"
+#: gfs2/fsck/pass1.c:1262
+#, c-format
+msgid "Bad block count for #%llu (0x%llx) not fixed\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1855
+#: gfs2/fsck/pass1.c:1288
#, c-format
msgid ""
-"\n"
-"Next Inum: %llu\n"
-msgstr ""
-
-#: gfs2/convert/gfs2_convert.c:1887
-msgid "Removing obsolete GFS1 file system structures.\n"
+"Found a duplicate inode block at #%llu (0x%llx) previously marked as a %s\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1927
+#: gfs2/fsck/pass1.c:1298
#, c-format
-msgid "Writing journal #%d..."
+msgid "Inode #%llu (0x%llx): Bad inode address found: %llu (0x%llx)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:1935
+#: gfs2/fsck/pass1.c:1303
#, c-format
-msgid "done.\n"
+msgid "Fix address in inode at block #%llu (0x%llx)? (y/n) "
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2054
+#: gfs2/fsck/pass1.c:1309
#, c-format
-msgid "Couldn't lookup new quota file: %d\n"
+msgid "Address in inode at block #%llu (0x%llx) not fixed\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2089
+#: gfs2/fsck/pass1.c:1333
#, c-format
-msgid "Convert %s from GFS1 to GFS2? (y/n)"
+msgid "Checking system inode '%s'\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2100
+#: gfs2/fsck/pass1.c:1338
#, c-format
-msgid "Bad response '%s', please type 'y' or 'n'.\n"
+msgid "System inode for '%s' is located at block %llu (0x%llx)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2130
+#: gfs2/fsck/pass1.c:1343
#, c-format
-msgid "%s not converted.\n"
+msgid "Found invalid system dinode at block #%llu (0x%llx)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2139
-msgid "Converting resource groups."
+#: gfs2/fsck/pass1.c:1359
+msgid "The inode exists but the block is not marked 'in use'; fixing it.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2144
+#: gfs2/fsck/pass1.c:1369
#, c-format
-msgid "%s: Unable to convert resource groups.\n"
+msgid "System inode for '%s' is corrupt or missing.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2156
+#: gfs2/fsck/pass1.c:1376
#, c-format
-msgid ""
-"\n"
-"%s: Error renumbering inodes.\n"
+msgid "Invalid or missing %s system inode (should be %d, is %d).\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2169
+#: gfs2/fsck/pass1.c:1378
#, c-format
-msgid ""
-"\n"
-"%s: Error fixing directories.\n"
+msgid "Create new %s system inode? (y/n) "
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2176
+#: gfs2/fsck/pass1.c:1379
#, c-format
-msgid "\r%llu cdpn symlinks moved to empty directories."
+msgid "Rebuilding system file \"%s\"\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2180
+#: gfs2/fsck/pass1.c:1383
#, c-format
-msgid ""
-"\n"
-"%s: Error fixing cdpn symlinks.\n"
+msgid "Error trying to rebuild system file %s: Cannot continue\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2186
-msgid ""
-"\n"
-"Converting journals.\n"
+#: gfs2/fsck/pass1.c:1395
+#, c-format
+msgid "Cannot continue without valid %s inode\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2189
+#: gfs2/fsck/pass1.c:1413
#, c-format
-msgid "%s: Error converting journal space.\n"
+msgid "Error found in %s while checking directory entries.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2211
+#: gfs2/fsck/pass1.c:1432
#, c-format
-msgid ""
-"Reduced journal size to %u MB to accommodate GFS2 file system structures.\n"
+msgid "Error %d building journal\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2219
-#, c-format
-msgid "Error: could not build jindex: %s\n"
+#: gfs2/fsck/pass1.c:1508
+msgid "gfs1 statfs inode"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2222
-msgid "Building GFS2 file system structures.\n"
+#: gfs2/fsck/pass1.c:1510
+msgid "gfs1 jindex inode"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2226
+#: gfs2/fsck/pass1.c:1512
+msgid "gfs1 rindex inode"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:1514
+msgid "gfs1 quota inode"
+msgstr ""
+
+#: gfs2/fsck/pass1.c:1578
#, c-format
-msgid "Error building per-node directories: %s\n"
+msgid "Checking metadata in Resource Group #%llu\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2233
+#: gfs2/fsck/pass1.c:1582
#, c-format
-msgid "Error building inum inode: %s\n"
+msgid "rgrp block %lld (0x%llx) is now marked as 'rgrp data'\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2241
+#: gfs2/fsck/pass1.c:1608
#, c-format
-msgid "Error building statfs inode: %s\n"
+msgid "Skipping rindex indir block %lld (0x%llx)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2251
+#: gfs2/fsck/pass1.c:1622
#, c-format
-msgid "Error building rindex inode: %s\n"
+msgid "Skipping pass 1 is not a good idea.\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2258
+#: gfs2/fsck/pass1.c:1627
#, c-format
-msgid "Error building quota inode: %s\n"
+msgid "Already processed system inode %lld (0x%llx)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2286
-msgid "Committing changes to disk.\n"
+#: gfs2/fsck/pass1.c:1655
+#, c-format
+msgid "Deferring GFS1 metadata block #%<PRIu64> (0x%<PRIx64>)\n"
msgstr ""
-#: gfs2/convert/gfs2_convert.c:2302
+#: gfs2/fsck/pass1.c:1665
#, c-format
-msgid "%s: filesystem converted successfully to gfs2.\n"
+msgid "Found invalid inode at block #%llu (0x%llx)\n"
msgstr ""
11 years, 5 months
gfs2-utils: master - libgfs2: Fix build with bison 2.6
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=110117a4...
Commit: 110117a426f1edc0c3110a7776f10db186bc6f7d
Parent: 4a98c699227bb9cea72293be54fccceb2111ab38
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Nov 14 12:22:03 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Nov 14 12:22:03 2012 +0000
libgfs2: Fix build with bison 2.6
Bison 2.6 adds a prototype for yyparse in the generated parser.h,
creating a circular dependency between lexer.{c.h} and parser.h.
This patch adds a typedef which breaks the cycle and allows libgfs2 to
build with bison 2.6 again.
It also fixes a race between libgfs2.la and gfs2l by clarifying gfs2l's
dependency on libgfs2.la.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/Makefile.am | 2 +-
gfs2/libgfs2/parser.y | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/gfs2/libgfs2/Makefile.am b/gfs2/libgfs2/Makefile.am
index 9c4e96b..b57f6d9 100644
--- a/gfs2/libgfs2/Makefile.am
+++ b/gfs2/libgfs2/Makefile.am
@@ -23,7 +23,7 @@ libgfs2_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 \
gfs2l_SOURCES = gfs2l.c
gfs2l_CPPFLAGS = -I$(top_srcdir)/gfs2/include
-gfs2l_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
+gfs2l_LDADD = libgfs2.la
# Autotools can't handle header files output by flex so we have to generate it manually
lexer.h: lexer.l
diff --git a/gfs2/libgfs2/parser.y b/gfs2/libgfs2/parser.y
index 084d15e..0321d74 100644
--- a/gfs2/libgfs2/parser.y
+++ b/gfs2/libgfs2/parser.y
@@ -1,3 +1,7 @@
+%code requires {
+/* Required to break a circular dependency introduced with bison 2.6 */
+typedef void* yyscan_t;
+}
%code top {
#include <errno.h>
#include "lang.h"
11 years, 5 months
gfs2-utils: the annotated tag 3.1.5 has been created
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=d09579bf...
Commit: d09579bf129a5531b2018d3ef6d17b368ce29e86
Parent: 0000000000000000000000000000000000000000
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: 2012-11-12 19:59 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: 2012-11-12 19:59 +0000
annotated tag: 3.1.5 has been created
at d09579bf129a5531b2018d3ef6d17b368ce29e86 (tag)
tagging 4a98c699227bb9cea72293be54fccceb2111ab38 (commit)
replaces 3.1.4
Version 3.1.5
Andrew Price (29):
gfs2_utils: Improve error messages
fsck.gfs2: Fix handling of eattr indirect blocks
libgfs2: Remove gfs_get_leaf_nr
libgfs2: Clean up some warnings
gfs2-utils: Remove references to unlinked file tag
gfs2_edit: Fix find_mtype and support gfs1 structures
gfs2_edit: Clean up some magic offsets
libgfs2: Use flags for versions in metadata description
mkfs.gfs2: Check for symlinks before reporting device contents
gfs2-utils: Remove obsolete tools
gfs2-utils: Make building gfs_controld optional
gfs2-utils: Only build group/ when gfs_controld is enabled
gfs2-utils: Remove unused exported functions
mkfs.gfs2: Avoid a rename race when checking file contents
fsck.gfs2: Fix buffer overflow in get_lockproto_table
libgfs2: Remove exit calls from inode_read and inode_get
libgfs2: Remove exit call from __gfs_inode_get
gfs2_edit: Some comment cleanups
mkfs.gfs2: Check locktable more strictly for valid chars
libgfs2: Add a gfs2 block query language
libgfs2: Move valid_block into fsck.gfs2
libgfs2: gfs2_get_bitmap performance enhancements
fsck.gfs2: Fix build failure
gfs2-utils: build: Avoid using the kernel versions of kernel headers
libgfs2: Add a small testing language UI
gfs2-utils: Update .gitignore
gfs2-utils: Remove gfs2_lockgather
gfs2-utils: Rename lockgather directory to lockcapture
gfs2-utils: Remove remaining references to gfs2_lockgather
Bob Peterson (8):
gfs2_edit savemeta: Get rid of "slow" mode
gfs2_edit savemeta: report save statistics more often
gfs2_edit savemeta: fix block range checking
gfs2_edit restoremeta: sync changes on a regular basis RHEL6
gfs_controld: fix ignore_nolock for mounted nolock fs
fsck.gfs2: soften the messages when reclaiming freemeta blocks
fsck.gfs2: Check for formal inode number mismatch
GFS2: Fix a compiler warning in pass2's check_dentry
Shane Bradley (1):
gfs2-utils: Added a new script called gfs2_lockcapture that will capture lockdump data.
Steven Whitehouse (3):
libgfs2: libgfs2.h: Add gfs_block_tag structure, and some more flag symbols
mount.gfs2: Remove obsolete tool
libgfs2: Add pointer restriction flags
11 years, 5 months
gfs2-utils: master - gfs2-utils: Remove remaining references to gfs2_lockgather
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=4a98c699...
Commit: 4a98c699227bb9cea72293be54fccceb2111ab38
Parent: a5ecf797309d57733e5ddaf33ea722c31da21b1a
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Nov 12 14:56:56 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Nov 12 14:56:56 2012 +0000
gfs2-utils: Remove remaining references to gfs2_lockgather
Update the build paths to "lockcapture" and remove the gfs2_lockgather
man page.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
configure.ac | 2 +-
gfs2/Makefile.am | 2 +-
gfs2/man/Makefile.am | 1 -
gfs2/man/gfs2_lockgather.8 | 26 --------------------------
4 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/configure.ac b/configure.ac
index 07c6673..3cb378a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,7 +261,7 @@ AC_CONFIG_FILES([Makefile
gfs2/mkfs/Makefile
gfs2/tune/Makefile
gfs2/man/Makefile
- gfs2/lockgather/Makefile
+ gfs2/lockcapture/Makefile
doc/Makefile
po/Makefile.in
])
diff --git a/gfs2/Makefile.am b/gfs2/Makefile.am
index 710ba8b..42a284f 100644
--- a/gfs2/Makefile.am
+++ b/gfs2/Makefile.am
@@ -1,4 +1,4 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = libgfs2 convert edit fsck mkfs man \
- tune include lockgather #init.d
+ tune include lockcapture #init.d
diff --git a/gfs2/man/Makefile.am b/gfs2/man/Makefile.am
index caf4658..83d6251 100644
--- a/gfs2/man/Makefile.am
+++ b/gfs2/man/Makefile.am
@@ -7,5 +7,4 @@ dist_man_MANS = fsck.gfs2.8 \
gfs2_grow.8 \
gfs2_jadd.8 \
mkfs.gfs2.8 \
- gfs2_lockgather.8 \
tunegfs2.8
diff --git a/gfs2/man/gfs2_lockgather.8 b/gfs2/man/gfs2_lockgather.8
deleted file mode 100644
index 3cd8b9c..0000000
--- a/gfs2/man/gfs2_lockgather.8
+++ /dev/null
@@ -1,26 +0,0 @@
-.TH gfs2_lockgather 8
-
-.SH NAME
-gfs2_lockgather - Gathers data for diagnosing GFS2 locking issues
-
-.SH SYNOPSIS
-.B gfs2_lockgather
-[\fIOPTIONS\fR]
-
-.SH DESCRIPTION
-gfs2_lockgather will gather data that is useful for diagnosing performance and locking issues
-involving GFS2 filesystems. The script gathers basic system and cluster data such as rpm output,
-kernel version, thread dumps from all processes, and 2 passes of glock and DLM locking data. After
-the data is gathered it is stored in a tarball under /tmp. The script can be invoked to gather
-data from a single node, or to gather data from all nodes via ssh.
-.SH OPTIONS
-.TP
-\fB-h, --help, --info\fP
-Display help and usage information.
-.TP
-\fB-q, --quiet\fP
-Quiet mode. Run with output supressed.
-.TP
-\fB-a, --allnodes\fP
-Gather data from all nodes via ssh.
-
11 years, 5 months
gfs2-utils: master - gfs2-utils: Rename lockgather directory to lockcapture
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=a5ecf797...
Commit: a5ecf797309d57733e5ddaf33ea722c31da21b1a
Parent: 956172a86275a372df11a5be41fbdd981d7aabac
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Nov 12 14:14:29 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Nov 12 14:14:29 2012 +0000
gfs2-utils: Rename lockgather directory to lockcapture
Update the name of the directory to match the new script name
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/lockcapture/Makefile.am | 12 +
gfs2/lockcapture/gfs2_lockcapture | 1078 +++++++++++++++++++++++++++++++++++++
gfs2/lockgather/Makefile.am | 12 -
gfs2/lockgather/gfs2_lockcapture | 1078 -------------------------------------
4 files changed, 1090 insertions(+), 1090 deletions(-)
diff --git a/gfs2/lockcapture/Makefile.am b/gfs2/lockcapture/Makefile.am
new file mode 100644
index 0000000..b88580e
--- /dev/null
+++ b/gfs2/lockcapture/Makefile.am
@@ -0,0 +1,12 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+# When an exec_prefix setting would have us install into /usr/sbin,
+# use /sbin instead.
+# Accept an existing sbindir value of /usr/sbin (probably for older automake),
+# or an empty value, for automake-1.11 and newer.
+sbindir := $(shell rpl=0; test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
+ || test '$(exec_prefix):$(sbindir)' = /usr: && rpl=1; \
+ test $$rpl = 1 && echo /sbin || echo '$(exec_prefix)/sbin')
+
+
+dist_sbin_SCRIPTS = gfs2_lockcapture
diff --git a/gfs2/lockcapture/gfs2_lockcapture b/gfs2/lockcapture/gfs2_lockcapture
new file mode 100644
index 0000000..a930a2f
--- /dev/null
+++ b/gfs2/lockcapture/gfs2_lockcapture
@@ -0,0 +1,1078 @@
+#!/usr/bin/env python
+"""
+This script will gather GFS2 glocks and dlm lock dump information for a cluster
+node. The script can get all the mounted GFS2 filesystem data or set of selected
+GFS2 filesystems. The script will also gather some general information about the
+system.
+
+@author : Shane Bradley
+@contact : sbradley(a)redhat.com
+@version : 0.9
+@copyright : GPLv2
+"""
+import sys
+import os
+import os.path
+import logging
+from optparse import OptionParser, Option
+import time
+import platform
+import shutil
+import subprocess
+import tarfile
+
+# #####################################################################
+# Global vars:
+# #####################################################################
+"""
+@cvar VERSION_NUMBER: The version number of this script.
+@type VERSION_NUMBER: String
+@cvar MAIN_LOGGER_NAME: The name of the logger.
+@type MAIN_LOGGER_NAME: String
+@cvar PATH_TO_DEBUG_DIR: The path to the debug directory for the linux kernel.
+@type PATH_TO_DEBUG_DIR: String
+@cvar PATH_TO_PID_FILENAME: The path to the pid file that will be used to make
+sure only 1 instance of this script is running at any time.
+@type PATH_TO_PID_FILENAME: String
+"""
+VERSION_NUMBER = "0.9-1"
+MAIN_LOGGER_NAME = "%s" %(os.path.basename(sys.argv[0]))
+PATH_TO_DEBUG_DIR="/sys/kernel/debug"
+PATH_TO_PID_FILENAME = "/var/run/%s.pid" %(os.path.basename(sys.argv[0]))
+
+# #####################################################################
+# Class to define what a clusternode is.
+# #####################################################################
+class ClusterNode:
+ """
+ This class represents a cluster node that is a current memeber in a cluster.
+ """
+ def __init__(self, clusternodeName, clusterName, mapOfMountedFilesystemLabels):
+ """
+ @param clusternodeName: The name of the cluster node.
+ @type clusternodeName: String
+ @param clusterName: The name of the cluster that this cluster node is a
+ member of.
+ @type clusterName: String
+ @param mapOfMountedFilesystemLabels: A map of filesystem labels(key) for
+ a mounted filesystem. The value is the line for the matching mounted
+ filesystem from the mount -l command.
+ @type mapOfMountedFilesystemLabels: Dict
+ """
+ self.__clusternodeName = clusternodeName
+ self.__clusterName = clusterName
+ self.__mapOfMountedFilesystemLabels = mapOfMountedFilesystemLabels
+
+ def __str__(self):
+ """
+ This function will return a string representation of the object.
+
+ @return: Returns a string representation of the object.
+ @rtype: String
+ """
+ rString = ""
+ rString += "%s:%s" %(self.getClusterName(), self.getClusterNodeName())
+ fsLabels = self.__mapOfMountedFilesystemLabels.keys()
+ fsLabels.sort()
+ for fsLabel in fsLabels:
+ rString += "\n\t%s --> %s" %(fsLabel, self.__mapOfMountedFilesystemLabels.get(fsLabel))
+ return rString.rstrip()
+
+ def getClusterNodeName(self):
+ """
+ Returns the name of the cluster node.
+
+ @return: Returns the name of the cluster node.
+ @rtype: String
+ """
+ return self.__clusternodeName
+
+ def getClusterName(self):
+ """
+ Returns the name of cluster that this cluster node is a member of.
+
+ @return: Returns the name of cluster that this cluster node is a member
+ of.
+ @rtype: String
+ """
+ return self.__clusterName
+
+ def getMountedGFS2FilesystemNames(self, includeClusterName=True):
+ """
+ Returns the names of all the mounted GFS2 filesystems. By default
+ includeClusterName is True which will include the name of the cluster
+ and the GFS2 filesystem name(ex. f18cluster:mygfs2vol1) in the list of
+ mounted GFS2 filesystems. If includeClusterName is False it will only
+ return a list of all the mounted GFS2 filesystem names(ex. mygfs2vol1).
+
+ @return: Returns a list of all teh mounted GFS2 filesystem names.
+ @rtype: Array
+
+ @param includeClusterName: By default this option is True and will
+ include the name of the cluster and the GFS2 filesystem name. If False
+ then only the GFS2 filesystem name will be included.
+ @param includeClusterName: Boolean
+ """
+ # If true will prepend the cluster name to gfs2 fs name
+ if (includeClusterName):
+ return self.__mapOfMountedFilesystemLabels.keys()
+ else:
+ listOfGFS2MountedFilesystemLabels = []
+ for fsLabel in self.__mapOfMountedFilesystemLabels.keys():
+ fsLabelSplit = fsLabel.split(":", 1)
+ if (len(fsLabelSplit) == 2):
+ listOfGFS2MountedFilesystemLabels.append(fsLabelSplit[1])
+ return listOfGFS2MountedFilesystemLabels
+
+# #####################################################################
+# Helper functions.
+# #####################################################################
+def runCommand(command, listOfCommandOptions, standardOut=subprocess.PIPE, standardError=subprocess.PIPE):
+ """
+ This function will execute a command. It will return True if the return code
+ was zero, otherwise False is returned.
+
+ @return: Returns True if the return code was zero, otherwise False is
+ returned.
+ @rtype: Boolean
+
+ @param command: The command that will be executed.
+ @type command: String
+ @param listOfCommandOptions: The list of options for the command that will
+ be executed.
+ @type listOfCommandOptions: Array
+ @param standardOut: The pipe that will be used to write standard output. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardOut: Pipe
+ @param standardError: The pipe that will be used to write standard error. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardError: Pipe
+ """
+ stdout = ""
+ stderr = ""
+ try:
+ commandList = [command]
+ commandList += listOfCommandOptions
+ task = subprocess.Popen(commandList, stdout=standardOut, stderr=standardError)
+ task.wait()
+ (stdout, stderr) = task.communicate()
+ return (task.returncode == 0)
+ except OSError:
+ commandOptionString = ""
+ for option in listOfCommandOptions:
+ commandOptionString += "%s " %(option)
+ message = "An error occurred running the command: $ %s %s\n" %(command, commandOptionString)
+ if (len(stdout) > 0):
+ message += stdout
+ message += "\n"
+ if (len(stderr) > 0):
+ message += stderr
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+
+def runCommandOutput(command, listOfCommandOptions, standardOut=subprocess.PIPE, standardError=subprocess.PIPE):
+ """
+ This function will execute a command. Returns the output that was written to standard output. None is
+ returned if there was an error.
+
+ @return: Returns the output that was written to standard output. None is
+ returned if there was an error.
+ @rtype: String
+
+ @param command: The command that will be executed.
+ @type command: String
+ @param listOfCommandOptions: The list of options for the command that will
+ be executed.
+ @type listOfCommandOptions: Array
+ @param standardOut: The pipe that will be used to write standard output. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardOut: Pipe
+ @param standardError: The pipe that will be used to write standard error. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardError: Pipe
+ """
+ stdout = ""
+ stderr = ""
+ try:
+ commandList = [command]
+ commandList += listOfCommandOptions
+ task = subprocess.Popen(commandList, stdout=standardOut, stderr=standardError)
+ task.wait()
+ (stdout, stderr) = task.communicate()
+ except OSError:
+ commandOptionString = ""
+ for option in listOfCommandOptions:
+ commandOptionString += "%s " %(option)
+ message = "An error occurred running the command: $ %s %s\n" %(command, commandOptionString)
+ if (len(stdout) > 0):
+ message += stdout
+ message += "\n"
+ if (len(stderr) > 0):
+ message += stderr
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return None
+ return stdout.strip().rstrip()
+
+def writeToFile(pathToFilename, data, appendToFile=True, createFile=False):
+ """
+ This function will write a string to a file.
+
+ @return: Returns True if the string was successfully written to the file,
+ otherwise False is returned.
+ @rtype: Boolean
+
+ @param pathToFilename: The path to the file that will have a string written
+ to it.
+ @type pathToFilename: String
+ @param data: The string that will be written to the file.
+ @type data: String
+ @param appendToFile: If True then the data will be appened to the file, if
+ False then the data will overwrite the contents of the file.
+ @type appendToFile: Boolean
+ @param createFile: If True then the file will be created if it does not
+ exists, if False then file will not be created if it does not exist
+ resulting in no data being written to the file.
+ @type createFile: Boolean
+ """
+ [parentDir, filename] = os.path.split(pathToFilename)
+ if (os.path.isfile(pathToFilename) or (os.path.isdir(parentDir) and createFile)):
+ try:
+ filemode = "w"
+ if (appendToFile):
+ filemode = "a"
+ fout = open(pathToFilename, filemode)
+ fout.write(data + "\n")
+ fout.close()
+ return True
+ except UnicodeEncodeError, e:
+ message = "There was a unicode encode error writing to the file: %s." %(pathToFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ except IOError:
+ message = "There was an error writing to the file: %s." %(pathToFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ return False
+
+def mkdirs(pathToDSTDir):
+ """
+ This function will attempt to create a directory with the path of the value of pathToDSTDir.
+
+ @return: Returns True if the directory was created or already exists.
+ @rtype: Boolean
+
+ @param pathToDSTDir: The path to the directory that will be created.
+ @type pathToDSTDir: String
+ """
+ if (os.path.isdir(pathToDSTDir)):
+ return True
+ elif ((not os.access(pathToDSTDir, os.F_OK)) and (len(pathToDSTDir) > 0)):
+ try:
+ os.makedirs(pathToDSTDir)
+ except (OSError, os.error):
+ message = "Could not create the directory: %s." %(pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ except (IOError, os.error):
+ message = "Could not create the directory with the path: %s." %(pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ return os.path.isdir(pathToDSTDir)
+
+def removePIDFile():
+ """
+ This function will remove the pid file.
+
+ @return: Returns True if the file was successfully remove or does not exist,
+ otherwise False is returned.
+ @rtype: Boolean
+ """
+ message = "Removing the pid file: %s" %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).debug(message)
+ if (os.path.exists(PATH_TO_PID_FILENAME)):
+ try:
+ os.remove(PATH_TO_PID_FILENAME)
+ except IOError:
+ message = "There was an error removing the file: %s." %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return os.path.exists(PATH_TO_PID_FILENAME)
+
+def archiveData(pathToSrcDir):
+ """
+ This function will return the path to the tar.bz2 file that was created. If
+ the tar.bz2 file failed to be created then an empty string will be returned
+ which would indicate an error occurred.
+
+ @return: This function will return the path to the tar.bz2 file that was
+ created. If the tar.bz2 file failed to be created then an empty string will
+ be returned which would indicate an error occurred.
+ @rtype: String
+
+ @param pathToSrcDir: The path to the directory that will be archived into a
+ .tar.bz2 file.
+ @type pathToSrcDir: String
+ """
+ if (os.path.exists(pathToSrcDir)):
+ pathToTarFilename = "%s.tar.bz2" %(pathToSrcDir)
+ if (os.path.exists(pathToTarFilename)):
+ message = "A compressed archvied file already exists and will be removed: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ try:
+ os.remove(PATH_TO_PID_FILENAME)
+ except IOError:
+ message = "There was an error removing the file: %s." %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return ""
+ message = "Creating a compressed archvied file: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ try:
+ tar = tarfile.open(pathToTarFilename, "w:bz2")
+ tar.add(pathToSrcDir, arcname=os.path.basename(pathToSrcDir))
+ tar.close()
+ except tarfile.TarError:
+ message = "There was an error creating the tarfile: %s." %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return ""
+ if (os.path.exists(pathToTarFilename)):
+ return pathToTarFilename
+ return ""
+
+def backupOutputDirectory(pathToOutputDir):
+ """
+ This function will return True if the pathToOutputDir does not exist or the
+ directory was successfully rename. If pathToOutputDir exists and was not
+ successfully rename then False is returned.
+
+ @return: Returns True if the pathToOutputDir does not exist or the directory
+ was successfully rename. If pathToOutputDir exists and was not successfully
+ rename then False is returned.
+ @rtype: Boolean
+
+ @param pathToOutputDir: The path to the directory that will be backed up.
+ @type pathToOutputDir: String
+ """
+ if (os.path.exists(pathToOutputDir)):
+ message = "The path already exists and could contain previous lockdump data: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ backupIndex = 1
+ pathToDST = ""
+ keepSearchingForIndex = True
+ while (keepSearchingForIndex):
+ pathToDST = "%s.bk-%d" %(pathToOutputDir, backupIndex)
+ if (os.path.exists(pathToDST)):
+ backupIndex += 1
+ else:
+ keepSearchingForIndex = False
+ try:
+ message = "The existing output directory will be renamed: %s to %s." %(pathToOutputDir, pathToDST)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ shutil.move(pathToOutputDir, pathToDST)
+ except shutil.Error:
+ message = "There was an error renaming the directory: %s to %s." %(pathToOutputDir, pathToDST)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ except OSError:
+ message = "There was an error renaming the directory: %s to %s." %(pathToOutputDir, pathToDST)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ # The path should not exists now, else there was an error backing up an
+ # existing output directory.
+ return (not os.path.exists(pathToOutputDir))
+
+def exitScript(removePidFile=True, errorCode=0):
+ """
+ This function will cause the script to exit or quit. It will return an error
+ code and will remove the pid file that was created.
+
+ @param removePidFile: If True(default) then the pid file will be remove
+ before the script exits.
+ @type removePidFile: Boolean
+ @param errorCode: The exit code that will be returned. The default value is 0.
+ @type errorCode: Int
+ """
+ if (removePidFile):
+ removePIDFile()
+ message = "The script will exit."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ sys.exit(errorCode)
+
+# #####################################################################
+# Helper functions for gathering the lockdumps.
+# #####################################################################
+def getClusterNode(listOfGFS2Names):
+ """
+ This function return a ClusterNode object if the machine is a member of a
+ cluster and has GFS2 filesystems mounted for that cluster. The
+ listOfGFS2Names is a list of GFS2 filesystem that need to have their data
+ capture. If the list is empty then that means that all the mounted GFS2
+ filesystems will be captured, if list is not empty then only those GFS2
+ filesystems in the list will have their data captured.
+
+ @return: Returns a cluster node object if there was mounted GFS2 filesystems
+ found that will have their data captured.
+ @rtype: ClusterNode
+
+ @param listOfGFS2Names: A list of GFS2 filesystem names that will have their
+ data captured. If the list is empty then that means that all the mounted
+ GFS2 filesystems will be captured, if list is not empty then only those GFS2
+ filesystems in the list will have their data captured.
+ @type listOfGFS2Names: Array
+ """
+ # Return a ClusterNode object if the clusternode and cluster name are found
+ # in the output, else return None.
+ clusterName = ""
+ clusternodeName = ""
+ if (runCommand("which", ["cman_tool"])):
+ stdout = runCommandOutput("cman_tool", ["status"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("\n")
+ clusterName = ""
+ clusternodeName = ""
+ for line in stdoutSplit:
+ if (line.startswith("Cluster Name:")):
+ clusterName = line.split("Cluster Name:")[1].strip().rstrip()
+ if (line.startswith("Node name: ")):
+ clusternodeName = line.split("Node name:")[1].strip().rstrip()
+ elif (runCommand("which", ["corosync-cmapctl"])):
+ # Another way to get the local cluster node is: $ crm_node -i; crm_node -l
+ # Get the name of the cluster.
+ stdout = runCommandOutput("corosync-cmapctl", ["-g", "totem.cluster_name"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("=")
+ if (len(stdoutSplit) == 2):
+ clusterName = stdoutSplit[1].strip().rstrip()
+ # Get the id of the local cluster node so we can get the clusternode name
+ thisNodeID = ""
+ stdout = runCommandOutput("corosync-cmapctl", ["-g", "runtime.votequorum.this_node_id"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("=")
+ if (len(stdoutSplit) == 2):
+ thisNodeID = stdoutSplit[1].strip().rstrip()
+ # Now that we the nodeid then we can get the clusternode name.
+ if (len(thisNodeID) > 0):
+ stdout = runCommandOutput("corosync-quorumtool", ["-l"])
+ if (not stdout == None):
+ for line in stdout.split("\n"):
+ splitLine = line.split()
+ if (len(splitLine) == 4):
+ if (splitLine[0].strip().rstrip() == thisNodeID):
+ clusternodeName = splitLine[3]
+ break;
+ # If a clusternode name and cluster name was found then return a new object
+ # since this means this cluster is part of cluster.
+ if ((len(clusterName) > 0) and (len(clusternodeName) > 0)):
+ mapOfMountedFilesystemLabels = getLabelMapForMountedFilesystems(clusterName, getMountedGFS2Filesystems())
+ # These will be the GFS2 filesystems that will have their lockdump information gathered.
+ if (len(listOfGFS2Names) > 0):
+ for label in mapOfMountedFilesystemLabels.keys():
+ foundMatch = False
+ for name in listOfGFS2Names:
+ if ((name == label) or ("%s:%s"%(clusterName, name) == label)):
+ foundMatch = True
+ break
+ if ((not foundMatch) and (mapOfMountedFilesystemLabels.has_key(label))):
+ del(mapOfMountedFilesystemLabels[label])
+ return ClusterNode(clusternodeName, clusterName, mapOfMountedFilesystemLabels)
+ else:
+ return None
+
+def getMountedGFS2Filesystems():
+ """
+ This function returns a list of all the mounted GFS2 filesystems.
+
+ @return: Returns a list of all the mounted GFS2 filesystems.
+ @rtype: Array
+ """
+ fsType = "gfs2"
+ listOfMountedFilesystems = []
+ stdout = runCommandOutput("mount", ["-l"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("\n")
+ for line in stdoutSplit:
+ splitLine = line.split()
+ if (len(splitLine) >= 5):
+ if (splitLine[4] == fsType):
+ listOfMountedFilesystems.append(line)
+ return listOfMountedFilesystems
+
+def getLabelMapForMountedFilesystems(clusterName, listOfMountedFilesystems):
+ """
+ This function will return a dictionary of the mounted GFS2 filesystem that
+ contain a label that starts with the cluster name. For example:
+ {'f18cluster:mygfs2vol1': '/dev/vdb1 on /mnt/gfs2vol1 type gfs2 (rw,relatime) [f18cluster:mygfs2vol1]'}
+
+ @return: Returns a dictionary of the mounted GFS2 filesystems that contain a
+ label that starts with the cluster name.
+ @rtype: Dict
+
+ @param clusterName: The name of the cluster.
+ @type clusterName: String
+ @param listOfMountedFilesystems: A list of all the mounted GFS2 filesystems.
+ @type listOfMountedFilesystems: Array
+ """
+ mapOfMountedFilesystemLabels = {}
+ for mountedFilesystem in listOfMountedFilesystems:
+ splitMountedFilesystem = mountedFilesystem.split()
+ fsLabel = splitMountedFilesystem[-1].strip().strip("[").rstrip("]")
+ if (len(fsLabel) > 0):
+ # Verify it starts with name of the cluster.
+ if (fsLabel.startswith("%s:" %(clusterName))):
+ mapOfMountedFilesystemLabels[fsLabel] = mountedFilesystem
+ return mapOfMountedFilesystemLabels
+
+def verifyDebugFilesystemMounted(enableMounting=True):
+ """
+ This function verifies that the debug filesystem is mounted. If the debug
+ filesystem is mounted then True is returned, otherwise False is returned.
+
+ @return: If the debug filesystem is mounted then True is returned, otherwise
+ False is returned.
+ @rtype: Boolean
+
+ @param enableMounting: If True then the debug filesystem will be mounted if
+ it is currently not mounted.
+ @type enableMounting: Boolean
+ """
+ if (os.path.ismount(PATH_TO_DEBUG_DIR)):
+ message = "The debug filesystem %s is mounted." %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ return True
+ else:
+ message = "The debug filesystem %s is not mounted." %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).warning(message)
+ if (cmdLineOpts.enableMountDebugFS):
+ if(mountFilesystem("debugfs", "none", PATH_TO_DEBUG_DIR)):
+ message = "The debug filesystem was mounted: %s." %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ return True
+ return False
+
+def mountFilesystem(filesystemType, pathToDevice, pathToMountPoint):
+ """
+ This function will attempt to mount a filesystem. If the filesystem is
+ already mounted or the filesystem was successfully mounted then True is
+ returned, otherwise False is returned.
+
+ @return: If the filesystem is already mounted or the filesystem was
+ successfully mounted then True is returned, otherwise False is returned.
+ @rtype: Boolean
+
+ @param filesystemType: The type of filesystem that will be mounted.
+ @type filesystemType: String
+ @param pathToDevice: The path to the device that will be mounted.
+ @type pathToDevice: String
+ @param pathToMountPoint: The path to the directory that will be used as the
+ mount point for the device.
+ @type pathToMountPoint: String
+ """
+ if (os.path.ismount(PATH_TO_DEBUG_DIR)):
+ return True
+ listOfCommandOptions = ["-t", filesystemType, pathToDevice, pathToMountPoint]
+ if (not runCommand("mount", listOfCommandOptions)):
+ message = "There was an error mounting the filesystem type %s for the device %s to the mount point %s." %(filesystemType, pathToDevice, pathToMountPoint)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return os.path.ismount(PATH_TO_DEBUG_DIR)
+
+def gatherGeneralInformation(pathToDSTDir):
+ """
+ This function will gather general information about the cluster and write
+ the results to a file. The following data will be captured: hostname, date,
+ uname -a, uptime, contents of /proc/mounts, and ps h -AL -o tid,s,cmd.
+
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ written to.
+ @type pathToDSTDir: String
+ """
+ # Gather some general information and write to system.txt.
+ systemString = "HOSTNAME: %s\nDATE: %s\n" %(platform.node(), time.strftime("%Y-%m-%d_%H:%M:%S"))
+ stdout = runCommandOutput("uname", ["-a"])
+ if (not stdout == None):
+ systemString += "UNAME-A: %s\n" %(stdout)
+ stdout = runCommandOutput("uptime", [])
+ if (not stdout == None):
+ systemString += "UPTIME: %s\n" %(stdout)
+ writeToFile(os.path.join(pathToDSTDir, "system.txt"), systemString, createFile=True)
+
+ # Get "mount -l" filesystem data.
+ command = "cat"
+ pathToCommandOutput = os.path.join(pathToDSTDir, "cat-proc_mounts.txt")
+ try:
+ fout = open(pathToCommandOutput, "w")
+ runCommand(command, ["/proc/mounts"], standardOut=fout)
+ fout.close()
+ except IOError:
+ message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+ # Get "ps -eo user,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,comm,wchan" data.
+ command = "ps"
+ pathToCommandOutput = os.path.join(pathToDSTDir, "ps.txt")
+ try:
+ fout = open(pathToCommandOutput, "w")
+ #runCommand(command, ["-eo", "user,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,comm,wchan"], standardOut=fout)
+ runCommand(command, ["h", "-AL", "-o", "tid,s,cmd"], standardOut=fout)
+ fout.close()
+ except IOError:
+ message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def triggerSysRQEvents():
+ """
+ This command will trigger sysrq events which will write the output to
+ /var/log/messages. The events that will be trigger are "m" and "t". The "m"
+ event will dump information about memory allocation. The "t" event will dump
+ all the threads state information.
+ """
+ command = "echo"
+ pathToSysrqTriggerFile = "/proc/sysrq-trigger"
+ # m - dump information about memory allocation
+ # t - dump thread state information
+ triggers = ["m", "t"]
+ for trigger in triggers:
+ try:
+ fout = open(pathToSysrqTriggerFile, "w")
+ runCommand(command, [trigger], standardOut=fout)
+ fout.close()
+ except IOError:
+ message = "There was an error the command output for %s to the file %s." %(command, pathToSysrqTriggerFile)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def gatherLogs(pathToDSTDir):
+ """
+ This function will copy all the cluster logs(/var/log/cluster) and the
+ system log(/var/log/messages) to the directory given by pathToDSTDir.
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ copied to.
+ @type pathToDSTDir: String
+ """
+ if (mkdirs(pathToDSTDir)):
+ # Copy messages logs that contain the sysrq data.
+ pathToLogFile = "/var/log/messages"
+ pathToDSTLogFile = os.path.join(pathToDSTDir, os.path.basename(pathToLogFile))
+ try:
+ shutil.copyfile(pathToLogFile, pathToDSTLogFile)
+ except shutil.Error:
+ message = "There was an error copying the file: %s to %s." %(pathToLogFile, pathToDSTLogFile)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+ pathToLogDir = "/var/log/cluster"
+ pathToDSTLogDir = os.path.join(pathToDSTDir, os.path.basename(pathToLogDir))
+ if (os.path.isdir(pathToLogDir)):
+ try:
+ shutil.copytree(pathToLogDir, pathToDSTLogDir)
+ except shutil.Error:
+ message = "There was an error copying the directory: %s to %s." %(pathToLogDir, pathToDSTLogDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def gatherDLMLockDumps(pathToDSTDir, listOfGFS2Filesystems):
+ """
+ This function copies the debug files for dlm for a GFS2 filesystem in the
+ list to a directory. The list of GFS2 filesystems will only include the
+ filesystem name for each item in the list. For example: "mygfs2vol1"
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ copied to.
+ @type pathToDSTDir: String
+ @param listOfGFS2Filesystems: This is the list of the GFS2 filesystems that
+ will have their debug directory copied.
+ @type listOfGFS2Filesystems: Array
+ """
+ lockDumpType = "dlm"
+ pathToSrcDir = os.path.join(PATH_TO_DEBUG_DIR, lockDumpType)
+ pathToOutputDir = os.path.join(pathToDSTDir, lockDumpType)
+ message = "Copying the files in the %s lockdump data directory %s for the selected GFS2 filesystem with dlm debug files." %(lockDumpType.upper(), pathToSrcDir)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ for filename in os.listdir(pathToSrcDir):
+ for name in listOfGFS2Filesystems:
+ if (filename.startswith(name)):
+ pathToCurrentFilename = os.path.join(pathToSrcDir, filename)
+ pathToDSTDir = os.path.join(pathToOutputDir, name)
+ mkdirs(pathToDSTDir)
+ pathToDSTFilename = os.path.join(pathToDSTDir, filename)
+ try:
+ shutil.copy(pathToCurrentFilename, pathToDSTFilename)
+ except shutil.Error:
+ message = "There was an error copying the file: %s to %s." %(pathToCurrentFilename, pathToDSTFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ except OSError:
+ message = "There was an error copying the file: %s to %s." %(pathToCurrentFilename, pathToDSTFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def gatherGFS2LockDumps(pathToDSTDir, listOfGFS2Filesystems):
+ """
+ This function copies the debug directory for a GFS2 filesystems in the list
+ to a directory. The list of GFS2 filesystems will include the cluster name
+ and filesystem name for each item in the list. For example:
+ "f18cluster:mygfs2vol1"
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ copied to.
+ @type pathToDSTDir: String
+ @param listOfGFS2Filesystems: This is the list of the GFS2 filesystems that
+ will have their debug directory copied.
+ @type listOfGFS2Filesystems: Array
+ """
+ lockDumpType = "gfs2"
+ pathToSrcDir = os.path.join(PATH_TO_DEBUG_DIR, lockDumpType)
+ pathToOutputDir = os.path.join(pathToDSTDir, lockDumpType)
+ for dirName in os.listdir(pathToSrcDir):
+ pathToCurrentDir = os.path.join(pathToSrcDir, dirName)
+ if ((os.path.isdir(pathToCurrentDir)) and (dirName in listOfGFS2Filesystems)):
+ mkdirs(pathToOutputDir)
+ pathToDSTDir = os.path.join(pathToOutputDir, dirName)
+ try:
+ message = "Copying the lockdump data for the %s filesystem: %s" %(lockDumpType.upper(), dirName)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ shutil.copytree(pathToCurrentDir, pathToDSTDir)
+ except shutil.Error:
+ message = "There was an error copying the directory: %s to %s." %(pathToCurrentDir, pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ except OSError:
+ message = "There was an error copying the directory: %s to %s." %(pathToCurrentDir, pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+# ##############################################################################
+# Get user selected options
+# ##############################################################################
+def __getOptions(version) :
+ """
+ This function creates the OptionParser and returns commandline
+ a tuple of the selected commandline options and commandline args.
+
+ The cmdlineOpts which is the options user selected and cmdLineArgs
+ is value passed and not associated with an option.
+
+ @return: A tuple of the selected commandline options and commandline args.
+ @rtype: Tuple
+
+ @param version: The version of the this script.
+ @type version: String
+ """
+ cmdParser = OptionParserExtended(version)
+ cmdParser.add_option("-d", "--debug",
+ action="store_true",
+ dest="enableDebugLogging",
+ help="Enables debug logging.",
+ default=False)
+ cmdParser.add_option("-q", "--quiet",
+ action="store_true",
+ dest="disableLoggingToConsole",
+ help="Disables logging to console.",
+ default=False)
+ cmdParser.add_option("-i", "--info",
+ action="store_true",
+ dest="enablePrintInfo",
+ help="Prints to console some basic information about the GFS2 filesystems mounted on the cluster node.",
+ default=False)
+ cmdParser.add_option("-M", "--mount_debug_fs",
+ action="store_true",
+ dest="enableMountDebugFS",
+ help="Enables the mounting of the debug filesystem if it is not mounted. Default is disabled.",
+ default=False)
+ cmdParser.add_option("-o", "--path_to_output_dir",
+ action="store",
+ dest="pathToOutputDir",
+ help="The path to the output directory where all the collect data will be stored. Default is /tmp/<date>-<hostname>-%s" %(os.path.basename(sys.argv[0])),
+ type="string",
+ default="")
+ cmdParser.add_option("-r", "--num_of_runs",
+ action="store",
+ dest="numberOfRuns",
+ help="The number of lockdumps runs to do. Default is 2.",
+ type="int",
+ default=2)
+ cmdParser.add_option("-s", "--seconds_sleep",
+ action="store",
+ dest="secondsToSleep",
+ help="The number of seconds sleep between runs. Default is 120 seconds.",
+ type="int",
+ default=120)
+ cmdParser.add_option("-t", "--archive",
+ action="store_true",
+ dest="enableArchiveOutputDir",
+ help="Enables archiving and compressing of the output directory with tar and bzip2. Default is disabled.",
+ default=False)
+ cmdParser.add_option("-n", "--fs_name",
+ action="extend",
+ dest="listOfGFS2Names",
+ help="List of GFS2 filesystems that will have their lockdump data gathered.",
+ type="string",
+ default=[]) # Get the options and return the result.
+ (cmdLineOpts, cmdLineArgs) = cmdParser.parse_args()
+ return (cmdLineOpts, cmdLineArgs)
+
+# ##############################################################################
+# OptParse classes for commandline options
+# ##############################################################################
+class OptionParserExtended(OptionParser):
+ """
+ This is the class that gets the command line options the end user
+ selects.
+ """
+ def __init__(self, version) :
+ """
+ @param version: The version of the this script.
+ @type version: String
+ """
+ self.__commandName = os.path.basename(sys.argv[0])
+ versionMessage = "%s %s\n" %(self.__commandName, version)
+
+ commandDescription ="%s will capture information about lockdata data for GFS2 and DLM required to analyze a GFS2 filesystem.\n"%(self.__commandName)
+
+ OptionParser.__init__(self, option_class=ExtendOption,
+ version=versionMessage,
+ description=commandDescription)
+
+ def print_help(self):
+ """
+ Print examples at the bottom of the help message.
+ """
+ self.print_version()
+ examplesMessage = "\n"
+ examplesMessage = "\nPrints information about the available GFS2 filesystems that can have lockdump data captured."
+ examplesMessage += "\n$ %s -i\n" %(self.__commandName)
+ examplesMessage += "\nThis command will mount the debug directory if it is not mounted. It will do 3 runs of\n"
+ examplesMessage += "gathering the lockdump information in 10 second intervals for only the GFS2 filesystems\n"
+ examplesMessage += "with the names myGFS2vol2,myGFS2vol1. Then it will archive and compress the data collected."
+ examplesMessage += "\n$ %s -M -r 3 -s 10 -t -n myGFS2vol2,myGFS2vol1\n" %(self.__commandName)
+ OptionParser.print_help(self)
+ print examplesMessage
+
+class ExtendOption (Option):
+ """
+ Allow to specify comma delimited list of entries for arrays
+ and dictionaries.
+ """
+ ACTIONS = Option.ACTIONS + ("extend",)
+ STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",)
+ TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extend",)
+
+ def take_action(self, action, dest, opt, value, values, parser):
+ """
+ This function is a wrapper to take certain options passed on command
+ prompt and wrap them into an Array.
+
+ @param action: The type of action that will be taken. For example:
+ "store_true", "store_false", "extend".
+ @type action: String
+ @param dest: The name of the variable that will be used to store the
+ option.
+ @type dest: String/Boolean/Array
+ @param opt: The option string that triggered the action.
+ @type opt: String
+ @param value: The value of opt(option) if it takes a
+ value, if not then None.
+ @type value:
+ @param values: All the opt(options) in a dictionary.
+ @type values: Dictionary
+ @param parser: The option parser that was orginally called.
+ @type parser: OptionParser
+ """
+ if (action == "extend") :
+ valueList=[]
+ try:
+ for v in value.split(","):
+ # Need to add code for dealing with paths if there is option for paths.
+ valueList.append(v)
+ except:
+ pass
+ else:
+ values.ensure_value(dest, []).extend(valueList)
+ else:
+ Option.take_action(self, action, dest, opt, value, values, parser)
+
+# ###############################################################################
+# Main Function
+# ###############################################################################
+if __name__ == "__main__":
+ """
+ When the script is executed then this code is ran.
+ """
+ try:
+ # #######################################################################
+ # Get the options from the commandline.
+ # #######################################################################
+ (cmdLineOpts, cmdLineArgs) = __getOptions(VERSION_NUMBER)
+ # #######################################################################
+ # Setup the logger and create config directory
+ # #######################################################################
+ # Create the logger
+ logLevel = logging.INFO
+ logger = logging.getLogger(MAIN_LOGGER_NAME)
+ logger.setLevel(logLevel)
+ # Create a new status function and level.
+ logging.STATUS = logging.INFO + 2
+ logging.addLevelName(logging.STATUS, "STATUS")
+ # Create a function for the STATUS_LEVEL since not defined by python. This
+ # means you can call it like the other predefined message
+ # functions. Example: logging.getLogger("loggerName").status(message)
+ setattr(logger, "status", lambda *args: logger.log(logging.STATUS, *args))
+ streamHandler = logging.StreamHandler()
+ streamHandler.setLevel(logLevel)
+ streamHandler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
+ logger.addHandler(streamHandler)
+
+ # Set the handler for writing to log file.
+ pathToLogFile = "/tmp/%s.log" %(MAIN_LOGGER_NAME)
+ if (((os.access(pathToLogFile, os.W_OK) and os.access("/tmp", os.R_OK))) or (not os.path.exists(pathToLogFile))):
+ fileHandler = logging.FileHandler(pathToLogFile)
+ fileHandler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s", "%Y-%m-%d %H:%M:%S"))
+ logger.addHandler(fileHandler)
+ message = "A log file will be created or appened to: %s" %(pathToLogFile)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ else:
+ message = "There was permission problem accessing the write attributes for the log file: %s." %(pathToLogFile)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ # #######################################################################
+ # Set the logging levels.
+ # #######################################################################
+ if ((cmdLineOpts.enableDebugLogging) and (not cmdLineOpts.disableLoggingToConsole)):
+ logging.getLogger(MAIN_LOGGER_NAME).setLevel(logging.DEBUG)
+ streamHandler.setLevel(logging.DEBUG)
+ message = "Debugging has been enabled."
+ logging.getLogger(MAIN_LOGGER_NAME).debug(message)
+ if (cmdLineOpts.disableLoggingToConsole):
+ logging.disable(logging.CRITICAL)
+ # #######################################################################
+ # Check to see if pid file exists and error if it does.
+ # #######################################################################
+ if (os.path.exists(PATH_TO_PID_FILENAME)):
+ message = "The PID file %s already exists and this script cannot run till it does not exist." %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ message = "Verify that there are no other existing processes running. If there are running processes those need to be stopped first and the file removed."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ exitScript(removePidFile=False, errorCode=1)
+ else:
+ message = "Creating the pid file: %s" %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).debug(message)
+ # Creata the pid file so we dont have more than 1 process of this
+ # script running.
+ writeToFile(PATH_TO_PID_FILENAME, str(os.getpid()), createFile=True)
+ # #######################################################################
+ # Get the clusternode name and verify that mounted GFS2 filesystems were
+ # found.
+ # #######################################################################
+ clusternode = getClusterNode(cmdLineOpts.listOfGFS2Names)
+ if (clusternode == None):
+ message = "The cluster or cluster node name could not be found."
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ exitScript(removePidFile=True, errorCode=1)
+ elif (not len(clusternode.getMountedGFS2FilesystemNames()) > 0):
+ message = "There were no mounted GFS2 filesystems found."
+ if (len(cmdLineOpts.listOfGFS2Names) > 0):
+ message = "There were no mounted GFS2 filesystems found with the name:"
+ for name in cmdLineOpts.listOfGFS2Names:
+ message += " %s" %(name)
+ message += "."
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ exitScript(removePidFile=True, errorCode=1)
+ if (cmdLineOpts.enablePrintInfo):
+ logging.disable(logging.CRITICAL)
+ print "List of all the mounted GFS2 filesystems that can have their lockdump data captured:"
+ print clusternode
+ exitScript()
+ # #######################################################################
+ # Create the output directory to verify it can be created before
+ # proceeding unless it is already created from a previous run data needs
+ # to be analyzed. Probably could add more debugging on if file or dir.
+ # #######################################################################
+ message = "The gathering of the lockdumps will be performed on the clusternode \"%s\" which is part of the cluster \"%s\"." %(clusternode.getClusterNodeName(), clusternode.getClusterName())
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ pathToOutputDir = cmdLineOpts.pathToOutputDir
+ if (not len(pathToOutputDir) > 0):
+ pathToOutputDir = "%s" %(os.path.join("/tmp", "%s-%s-%s" %(time.strftime("%Y-%m-%d_%H%M%S"), clusternode.getClusterNodeName(), os.path.basename(sys.argv[0]))))
+ # #######################################################################
+ # Backup any existing directory with same name as current output
+ # directory.
+ # #######################################################################
+ if (backupOutputDirectory(pathToOutputDir)):
+ message = "This directory that will be used to capture all the data: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ if (not mkdirs(pathToOutputDir)):
+ exitScript(errorCode=1)
+ else:
+ # There was an existing directory with same path as current output
+ # directory and it failed to back it up.
+ message = "Please change the output directory path (-o) or manual rename or remove the existing path: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ exitScript(errorCode=1)
+ # #######################################################################
+ # Check to see if the debug directory is mounted. If not then
+ # log an error.
+ # #######################################################################
+ result = verifyDebugFilesystemMounted(cmdLineOpts.enableMountDebugFS)
+ if (not result):
+ message = "Please mount the debug filesystem before running this script. For example: $ mount none -t debugfs %s" %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ exitScript(errorCode=1)
+
+ # #######################################################################
+ # Gather data and the lockdumps.
+ # #######################################################################
+ message = "The process of gathering all the required files will begin before capturing the lockdumps."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ for i in range(0,cmdLineOpts.numberOfRuns):
+ # The current log count that will start at 1 and not zero to make it
+ # make sense in logs.
+ currentLogRunCount = (i + 1)
+ # Add clusternode name under each run dir to make combining multple
+ # clusternode gfs2_lockgather data together and all data in each run directory.
+ pathToOutputRunDir = os.path.join(pathToOutputDir, "run%d/%s" %(i, clusternode.getClusterNodeName()))
+ if (not mkdirs(pathToOutputRunDir)):
+ exitScript(errorCode=1)
+ # Gather various bits of data from the clusternode.
+ message = "Gathering some general information about the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherGeneralInformation(pathToOutputRunDir)
+ # Trigger sysrq events to capture memory and thread information
+ message = "Triggering the sysrq events for the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ triggerSysRQEvents()
+ # Gather the dlm locks.
+ lockDumpType = "dlm"
+ message = "Gathering the %s lock dumps for clusternode %s for run %d/%d." %(lockDumpType.upper(), clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherDLMLockDumps(pathToOutputRunDir, clusternode.getMountedGFS2FilesystemNames(includeClusterName=False))
+ # Gather the glock locks from gfs2.
+ lockDumpType = "gfs2"
+ message = "Gathering the %s lock dumps for clusternode %s for run %d/%d." %(lockDumpType.upper(), clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherGFS2LockDumps(pathToOutputRunDir, clusternode.getMountedGFS2FilesystemNames())
+ # Gather log files
+ message = "Gathering the log files for the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherLogs(os.path.join(pathToOutputRunDir, "logs"))
+ # Sleep between each run if secondsToSleep is greater than or equal
+ # to 0 and current run is not the last run.
+ if ((cmdLineOpts.secondsToSleep >= 0) and (i < (cmdLineOpts.numberOfRuns - 1))):
+ message = "The script will sleep for %d seconds between each run of capturing the lockdumps." %(cmdLineOpts.secondsToSleep)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ message = "The script is sleeping before beginning the next run."
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ time.sleep(cmdLineOpts.secondsToSleep)
+ # #######################################################################
+ # Archive the directory that contains all the data and archive it after
+ # all the information has been gathered.
+ # #######################################################################
+ message = "All the files have been gathered and this directory contains all the captured data: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ if (cmdLineOpts.enableArchiveOutputDir):
+ message = "The lockdump data will now be archived. This could some time depending on the size of the data collected."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ pathToTarFilename = archiveData(pathToOutputDir)
+ if (os.path.exists(pathToTarFilename)):
+ message = "The compressed archvied file was created: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ else:
+ message = "The compressed archvied failed to be created: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ # #######################################################################
+ except KeyboardInterrupt:
+ print ""
+ message = "This script will exit since control-c was executed by end user."
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ exitScript(errorCode=1)
+ # #######################################################################
+ # Exit the application with zero exit code since we cleanly exited.
+ # #######################################################################
+ exitScript()
diff --git a/gfs2/lockgather/Makefile.am b/gfs2/lockgather/Makefile.am
deleted file mode 100644
index b88580e..0000000
--- a/gfs2/lockgather/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-# When an exec_prefix setting would have us install into /usr/sbin,
-# use /sbin instead.
-# Accept an existing sbindir value of /usr/sbin (probably for older automake),
-# or an empty value, for automake-1.11 and newer.
-sbindir := $(shell rpl=0; test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
- || test '$(exec_prefix):$(sbindir)' = /usr: && rpl=1; \
- test $$rpl = 1 && echo /sbin || echo '$(exec_prefix)/sbin')
-
-
-dist_sbin_SCRIPTS = gfs2_lockcapture
diff --git a/gfs2/lockgather/gfs2_lockcapture b/gfs2/lockgather/gfs2_lockcapture
deleted file mode 100644
index a930a2f..0000000
--- a/gfs2/lockgather/gfs2_lockcapture
+++ /dev/null
@@ -1,1078 +0,0 @@
-#!/usr/bin/env python
-"""
-This script will gather GFS2 glocks and dlm lock dump information for a cluster
-node. The script can get all the mounted GFS2 filesystem data or set of selected
-GFS2 filesystems. The script will also gather some general information about the
-system.
-
-@author : Shane Bradley
-@contact : sbradley(a)redhat.com
-@version : 0.9
-@copyright : GPLv2
-"""
-import sys
-import os
-import os.path
-import logging
-from optparse import OptionParser, Option
-import time
-import platform
-import shutil
-import subprocess
-import tarfile
-
-# #####################################################################
-# Global vars:
-# #####################################################################
-"""
-@cvar VERSION_NUMBER: The version number of this script.
-@type VERSION_NUMBER: String
-@cvar MAIN_LOGGER_NAME: The name of the logger.
-@type MAIN_LOGGER_NAME: String
-@cvar PATH_TO_DEBUG_DIR: The path to the debug directory for the linux kernel.
-@type PATH_TO_DEBUG_DIR: String
-@cvar PATH_TO_PID_FILENAME: The path to the pid file that will be used to make
-sure only 1 instance of this script is running at any time.
-@type PATH_TO_PID_FILENAME: String
-"""
-VERSION_NUMBER = "0.9-1"
-MAIN_LOGGER_NAME = "%s" %(os.path.basename(sys.argv[0]))
-PATH_TO_DEBUG_DIR="/sys/kernel/debug"
-PATH_TO_PID_FILENAME = "/var/run/%s.pid" %(os.path.basename(sys.argv[0]))
-
-# #####################################################################
-# Class to define what a clusternode is.
-# #####################################################################
-class ClusterNode:
- """
- This class represents a cluster node that is a current memeber in a cluster.
- """
- def __init__(self, clusternodeName, clusterName, mapOfMountedFilesystemLabels):
- """
- @param clusternodeName: The name of the cluster node.
- @type clusternodeName: String
- @param clusterName: The name of the cluster that this cluster node is a
- member of.
- @type clusterName: String
- @param mapOfMountedFilesystemLabels: A map of filesystem labels(key) for
- a mounted filesystem. The value is the line for the matching mounted
- filesystem from the mount -l command.
- @type mapOfMountedFilesystemLabels: Dict
- """
- self.__clusternodeName = clusternodeName
- self.__clusterName = clusterName
- self.__mapOfMountedFilesystemLabels = mapOfMountedFilesystemLabels
-
- def __str__(self):
- """
- This function will return a string representation of the object.
-
- @return: Returns a string representation of the object.
- @rtype: String
- """
- rString = ""
- rString += "%s:%s" %(self.getClusterName(), self.getClusterNodeName())
- fsLabels = self.__mapOfMountedFilesystemLabels.keys()
- fsLabels.sort()
- for fsLabel in fsLabels:
- rString += "\n\t%s --> %s" %(fsLabel, self.__mapOfMountedFilesystemLabels.get(fsLabel))
- return rString.rstrip()
-
- def getClusterNodeName(self):
- """
- Returns the name of the cluster node.
-
- @return: Returns the name of the cluster node.
- @rtype: String
- """
- return self.__clusternodeName
-
- def getClusterName(self):
- """
- Returns the name of cluster that this cluster node is a member of.
-
- @return: Returns the name of cluster that this cluster node is a member
- of.
- @rtype: String
- """
- return self.__clusterName
-
- def getMountedGFS2FilesystemNames(self, includeClusterName=True):
- """
- Returns the names of all the mounted GFS2 filesystems. By default
- includeClusterName is True which will include the name of the cluster
- and the GFS2 filesystem name(ex. f18cluster:mygfs2vol1) in the list of
- mounted GFS2 filesystems. If includeClusterName is False it will only
- return a list of all the mounted GFS2 filesystem names(ex. mygfs2vol1).
-
- @return: Returns a list of all teh mounted GFS2 filesystem names.
- @rtype: Array
-
- @param includeClusterName: By default this option is True and will
- include the name of the cluster and the GFS2 filesystem name. If False
- then only the GFS2 filesystem name will be included.
- @param includeClusterName: Boolean
- """
- # If true will prepend the cluster name to gfs2 fs name
- if (includeClusterName):
- return self.__mapOfMountedFilesystemLabels.keys()
- else:
- listOfGFS2MountedFilesystemLabels = []
- for fsLabel in self.__mapOfMountedFilesystemLabels.keys():
- fsLabelSplit = fsLabel.split(":", 1)
- if (len(fsLabelSplit) == 2):
- listOfGFS2MountedFilesystemLabels.append(fsLabelSplit[1])
- return listOfGFS2MountedFilesystemLabels
-
-# #####################################################################
-# Helper functions.
-# #####################################################################
-def runCommand(command, listOfCommandOptions, standardOut=subprocess.PIPE, standardError=subprocess.PIPE):
- """
- This function will execute a command. It will return True if the return code
- was zero, otherwise False is returned.
-
- @return: Returns True if the return code was zero, otherwise False is
- returned.
- @rtype: Boolean
-
- @param command: The command that will be executed.
- @type command: String
- @param listOfCommandOptions: The list of options for the command that will
- be executed.
- @type listOfCommandOptions: Array
- @param standardOut: The pipe that will be used to write standard output. By
- default the pipe that is used is subprocess.PIPE.
- @type standardOut: Pipe
- @param standardError: The pipe that will be used to write standard error. By
- default the pipe that is used is subprocess.PIPE.
- @type standardError: Pipe
- """
- stdout = ""
- stderr = ""
- try:
- commandList = [command]
- commandList += listOfCommandOptions
- task = subprocess.Popen(commandList, stdout=standardOut, stderr=standardError)
- task.wait()
- (stdout, stderr) = task.communicate()
- return (task.returncode == 0)
- except OSError:
- commandOptionString = ""
- for option in listOfCommandOptions:
- commandOptionString += "%s " %(option)
- message = "An error occurred running the command: $ %s %s\n" %(command, commandOptionString)
- if (len(stdout) > 0):
- message += stdout
- message += "\n"
- if (len(stderr) > 0):
- message += stderr
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return False
-
-def runCommandOutput(command, listOfCommandOptions, standardOut=subprocess.PIPE, standardError=subprocess.PIPE):
- """
- This function will execute a command. Returns the output that was written to standard output. None is
- returned if there was an error.
-
- @return: Returns the output that was written to standard output. None is
- returned if there was an error.
- @rtype: String
-
- @param command: The command that will be executed.
- @type command: String
- @param listOfCommandOptions: The list of options for the command that will
- be executed.
- @type listOfCommandOptions: Array
- @param standardOut: The pipe that will be used to write standard output. By
- default the pipe that is used is subprocess.PIPE.
- @type standardOut: Pipe
- @param standardError: The pipe that will be used to write standard error. By
- default the pipe that is used is subprocess.PIPE.
- @type standardError: Pipe
- """
- stdout = ""
- stderr = ""
- try:
- commandList = [command]
- commandList += listOfCommandOptions
- task = subprocess.Popen(commandList, stdout=standardOut, stderr=standardError)
- task.wait()
- (stdout, stderr) = task.communicate()
- except OSError:
- commandOptionString = ""
- for option in listOfCommandOptions:
- commandOptionString += "%s " %(option)
- message = "An error occurred running the command: $ %s %s\n" %(command, commandOptionString)
- if (len(stdout) > 0):
- message += stdout
- message += "\n"
- if (len(stderr) > 0):
- message += stderr
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return None
- return stdout.strip().rstrip()
-
-def writeToFile(pathToFilename, data, appendToFile=True, createFile=False):
- """
- This function will write a string to a file.
-
- @return: Returns True if the string was successfully written to the file,
- otherwise False is returned.
- @rtype: Boolean
-
- @param pathToFilename: The path to the file that will have a string written
- to it.
- @type pathToFilename: String
- @param data: The string that will be written to the file.
- @type data: String
- @param appendToFile: If True then the data will be appened to the file, if
- False then the data will overwrite the contents of the file.
- @type appendToFile: Boolean
- @param createFile: If True then the file will be created if it does not
- exists, if False then file will not be created if it does not exist
- resulting in no data being written to the file.
- @type createFile: Boolean
- """
- [parentDir, filename] = os.path.split(pathToFilename)
- if (os.path.isfile(pathToFilename) or (os.path.isdir(parentDir) and createFile)):
- try:
- filemode = "w"
- if (appendToFile):
- filemode = "a"
- fout = open(pathToFilename, filemode)
- fout.write(data + "\n")
- fout.close()
- return True
- except UnicodeEncodeError, e:
- message = "There was a unicode encode error writing to the file: %s." %(pathToFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return False
- except IOError:
- message = "There was an error writing to the file: %s." %(pathToFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return False
- return False
-
-def mkdirs(pathToDSTDir):
- """
- This function will attempt to create a directory with the path of the value of pathToDSTDir.
-
- @return: Returns True if the directory was created or already exists.
- @rtype: Boolean
-
- @param pathToDSTDir: The path to the directory that will be created.
- @type pathToDSTDir: String
- """
- if (os.path.isdir(pathToDSTDir)):
- return True
- elif ((not os.access(pathToDSTDir, os.F_OK)) and (len(pathToDSTDir) > 0)):
- try:
- os.makedirs(pathToDSTDir)
- except (OSError, os.error):
- message = "Could not create the directory: %s." %(pathToDSTDir)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return False
- except (IOError, os.error):
- message = "Could not create the directory with the path: %s." %(pathToDSTDir)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return False
- return os.path.isdir(pathToDSTDir)
-
-def removePIDFile():
- """
- This function will remove the pid file.
-
- @return: Returns True if the file was successfully remove or does not exist,
- otherwise False is returned.
- @rtype: Boolean
- """
- message = "Removing the pid file: %s" %(PATH_TO_PID_FILENAME)
- logging.getLogger(MAIN_LOGGER_NAME).debug(message)
- if (os.path.exists(PATH_TO_PID_FILENAME)):
- try:
- os.remove(PATH_TO_PID_FILENAME)
- except IOError:
- message = "There was an error removing the file: %s." %(PATH_TO_PID_FILENAME)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return os.path.exists(PATH_TO_PID_FILENAME)
-
-def archiveData(pathToSrcDir):
- """
- This function will return the path to the tar.bz2 file that was created. If
- the tar.bz2 file failed to be created then an empty string will be returned
- which would indicate an error occurred.
-
- @return: This function will return the path to the tar.bz2 file that was
- created. If the tar.bz2 file failed to be created then an empty string will
- be returned which would indicate an error occurred.
- @rtype: String
-
- @param pathToSrcDir: The path to the directory that will be archived into a
- .tar.bz2 file.
- @type pathToSrcDir: String
- """
- if (os.path.exists(pathToSrcDir)):
- pathToTarFilename = "%s.tar.bz2" %(pathToSrcDir)
- if (os.path.exists(pathToTarFilename)):
- message = "A compressed archvied file already exists and will be removed: %s" %(pathToTarFilename)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- try:
- os.remove(PATH_TO_PID_FILENAME)
- except IOError:
- message = "There was an error removing the file: %s." %(pathToTarFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return ""
- message = "Creating a compressed archvied file: %s" %(pathToTarFilename)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- try:
- tar = tarfile.open(pathToTarFilename, "w:bz2")
- tar.add(pathToSrcDir, arcname=os.path.basename(pathToSrcDir))
- tar.close()
- except tarfile.TarError:
- message = "There was an error creating the tarfile: %s." %(pathToTarFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return ""
- if (os.path.exists(pathToTarFilename)):
- return pathToTarFilename
- return ""
-
-def backupOutputDirectory(pathToOutputDir):
- """
- This function will return True if the pathToOutputDir does not exist or the
- directory was successfully rename. If pathToOutputDir exists and was not
- successfully rename then False is returned.
-
- @return: Returns True if the pathToOutputDir does not exist or the directory
- was successfully rename. If pathToOutputDir exists and was not successfully
- rename then False is returned.
- @rtype: Boolean
-
- @param pathToOutputDir: The path to the directory that will be backed up.
- @type pathToOutputDir: String
- """
- if (os.path.exists(pathToOutputDir)):
- message = "The path already exists and could contain previous lockdump data: %s" %(pathToOutputDir)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- backupIndex = 1
- pathToDST = ""
- keepSearchingForIndex = True
- while (keepSearchingForIndex):
- pathToDST = "%s.bk-%d" %(pathToOutputDir, backupIndex)
- if (os.path.exists(pathToDST)):
- backupIndex += 1
- else:
- keepSearchingForIndex = False
- try:
- message = "The existing output directory will be renamed: %s to %s." %(pathToOutputDir, pathToDST)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- shutil.move(pathToOutputDir, pathToDST)
- except shutil.Error:
- message = "There was an error renaming the directory: %s to %s." %(pathToOutputDir, pathToDST)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- except OSError:
- message = "There was an error renaming the directory: %s to %s." %(pathToOutputDir, pathToDST)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- # The path should not exists now, else there was an error backing up an
- # existing output directory.
- return (not os.path.exists(pathToOutputDir))
-
-def exitScript(removePidFile=True, errorCode=0):
- """
- This function will cause the script to exit or quit. It will return an error
- code and will remove the pid file that was created.
-
- @param removePidFile: If True(default) then the pid file will be remove
- before the script exits.
- @type removePidFile: Boolean
- @param errorCode: The exit code that will be returned. The default value is 0.
- @type errorCode: Int
- """
- if (removePidFile):
- removePIDFile()
- message = "The script will exit."
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- sys.exit(errorCode)
-
-# #####################################################################
-# Helper functions for gathering the lockdumps.
-# #####################################################################
-def getClusterNode(listOfGFS2Names):
- """
- This function return a ClusterNode object if the machine is a member of a
- cluster and has GFS2 filesystems mounted for that cluster. The
- listOfGFS2Names is a list of GFS2 filesystem that need to have their data
- capture. If the list is empty then that means that all the mounted GFS2
- filesystems will be captured, if list is not empty then only those GFS2
- filesystems in the list will have their data captured.
-
- @return: Returns a cluster node object if there was mounted GFS2 filesystems
- found that will have their data captured.
- @rtype: ClusterNode
-
- @param listOfGFS2Names: A list of GFS2 filesystem names that will have their
- data captured. If the list is empty then that means that all the mounted
- GFS2 filesystems will be captured, if list is not empty then only those GFS2
- filesystems in the list will have their data captured.
- @type listOfGFS2Names: Array
- """
- # Return a ClusterNode object if the clusternode and cluster name are found
- # in the output, else return None.
- clusterName = ""
- clusternodeName = ""
- if (runCommand("which", ["cman_tool"])):
- stdout = runCommandOutput("cman_tool", ["status"])
- if (not stdout == None):
- stdoutSplit = stdout.split("\n")
- clusterName = ""
- clusternodeName = ""
- for line in stdoutSplit:
- if (line.startswith("Cluster Name:")):
- clusterName = line.split("Cluster Name:")[1].strip().rstrip()
- if (line.startswith("Node name: ")):
- clusternodeName = line.split("Node name:")[1].strip().rstrip()
- elif (runCommand("which", ["corosync-cmapctl"])):
- # Another way to get the local cluster node is: $ crm_node -i; crm_node -l
- # Get the name of the cluster.
- stdout = runCommandOutput("corosync-cmapctl", ["-g", "totem.cluster_name"])
- if (not stdout == None):
- stdoutSplit = stdout.split("=")
- if (len(stdoutSplit) == 2):
- clusterName = stdoutSplit[1].strip().rstrip()
- # Get the id of the local cluster node so we can get the clusternode name
- thisNodeID = ""
- stdout = runCommandOutput("corosync-cmapctl", ["-g", "runtime.votequorum.this_node_id"])
- if (not stdout == None):
- stdoutSplit = stdout.split("=")
- if (len(stdoutSplit) == 2):
- thisNodeID = stdoutSplit[1].strip().rstrip()
- # Now that we the nodeid then we can get the clusternode name.
- if (len(thisNodeID) > 0):
- stdout = runCommandOutput("corosync-quorumtool", ["-l"])
- if (not stdout == None):
- for line in stdout.split("\n"):
- splitLine = line.split()
- if (len(splitLine) == 4):
- if (splitLine[0].strip().rstrip() == thisNodeID):
- clusternodeName = splitLine[3]
- break;
- # If a clusternode name and cluster name was found then return a new object
- # since this means this cluster is part of cluster.
- if ((len(clusterName) > 0) and (len(clusternodeName) > 0)):
- mapOfMountedFilesystemLabels = getLabelMapForMountedFilesystems(clusterName, getMountedGFS2Filesystems())
- # These will be the GFS2 filesystems that will have their lockdump information gathered.
- if (len(listOfGFS2Names) > 0):
- for label in mapOfMountedFilesystemLabels.keys():
- foundMatch = False
- for name in listOfGFS2Names:
- if ((name == label) or ("%s:%s"%(clusterName, name) == label)):
- foundMatch = True
- break
- if ((not foundMatch) and (mapOfMountedFilesystemLabels.has_key(label))):
- del(mapOfMountedFilesystemLabels[label])
- return ClusterNode(clusternodeName, clusterName, mapOfMountedFilesystemLabels)
- else:
- return None
-
-def getMountedGFS2Filesystems():
- """
- This function returns a list of all the mounted GFS2 filesystems.
-
- @return: Returns a list of all the mounted GFS2 filesystems.
- @rtype: Array
- """
- fsType = "gfs2"
- listOfMountedFilesystems = []
- stdout = runCommandOutput("mount", ["-l"])
- if (not stdout == None):
- stdoutSplit = stdout.split("\n")
- for line in stdoutSplit:
- splitLine = line.split()
- if (len(splitLine) >= 5):
- if (splitLine[4] == fsType):
- listOfMountedFilesystems.append(line)
- return listOfMountedFilesystems
-
-def getLabelMapForMountedFilesystems(clusterName, listOfMountedFilesystems):
- """
- This function will return a dictionary of the mounted GFS2 filesystem that
- contain a label that starts with the cluster name. For example:
- {'f18cluster:mygfs2vol1': '/dev/vdb1 on /mnt/gfs2vol1 type gfs2 (rw,relatime) [f18cluster:mygfs2vol1]'}
-
- @return: Returns a dictionary of the mounted GFS2 filesystems that contain a
- label that starts with the cluster name.
- @rtype: Dict
-
- @param clusterName: The name of the cluster.
- @type clusterName: String
- @param listOfMountedFilesystems: A list of all the mounted GFS2 filesystems.
- @type listOfMountedFilesystems: Array
- """
- mapOfMountedFilesystemLabels = {}
- for mountedFilesystem in listOfMountedFilesystems:
- splitMountedFilesystem = mountedFilesystem.split()
- fsLabel = splitMountedFilesystem[-1].strip().strip("[").rstrip("]")
- if (len(fsLabel) > 0):
- # Verify it starts with name of the cluster.
- if (fsLabel.startswith("%s:" %(clusterName))):
- mapOfMountedFilesystemLabels[fsLabel] = mountedFilesystem
- return mapOfMountedFilesystemLabels
-
-def verifyDebugFilesystemMounted(enableMounting=True):
- """
- This function verifies that the debug filesystem is mounted. If the debug
- filesystem is mounted then True is returned, otherwise False is returned.
-
- @return: If the debug filesystem is mounted then True is returned, otherwise
- False is returned.
- @rtype: Boolean
-
- @param enableMounting: If True then the debug filesystem will be mounted if
- it is currently not mounted.
- @type enableMounting: Boolean
- """
- if (os.path.ismount(PATH_TO_DEBUG_DIR)):
- message = "The debug filesystem %s is mounted." %(PATH_TO_DEBUG_DIR)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- return True
- else:
- message = "The debug filesystem %s is not mounted." %(PATH_TO_DEBUG_DIR)
- logging.getLogger(MAIN_LOGGER_NAME).warning(message)
- if (cmdLineOpts.enableMountDebugFS):
- if(mountFilesystem("debugfs", "none", PATH_TO_DEBUG_DIR)):
- message = "The debug filesystem was mounted: %s." %(PATH_TO_DEBUG_DIR)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- return True
- return False
-
-def mountFilesystem(filesystemType, pathToDevice, pathToMountPoint):
- """
- This function will attempt to mount a filesystem. If the filesystem is
- already mounted or the filesystem was successfully mounted then True is
- returned, otherwise False is returned.
-
- @return: If the filesystem is already mounted or the filesystem was
- successfully mounted then True is returned, otherwise False is returned.
- @rtype: Boolean
-
- @param filesystemType: The type of filesystem that will be mounted.
- @type filesystemType: String
- @param pathToDevice: The path to the device that will be mounted.
- @type pathToDevice: String
- @param pathToMountPoint: The path to the directory that will be used as the
- mount point for the device.
- @type pathToMountPoint: String
- """
- if (os.path.ismount(PATH_TO_DEBUG_DIR)):
- return True
- listOfCommandOptions = ["-t", filesystemType, pathToDevice, pathToMountPoint]
- if (not runCommand("mount", listOfCommandOptions)):
- message = "There was an error mounting the filesystem type %s for the device %s to the mount point %s." %(filesystemType, pathToDevice, pathToMountPoint)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- return os.path.ismount(PATH_TO_DEBUG_DIR)
-
-def gatherGeneralInformation(pathToDSTDir):
- """
- This function will gather general information about the cluster and write
- the results to a file. The following data will be captured: hostname, date,
- uname -a, uptime, contents of /proc/mounts, and ps h -AL -o tid,s,cmd.
-
-
- @param pathToDSTDir: This is the path to directory where the files will be
- written to.
- @type pathToDSTDir: String
- """
- # Gather some general information and write to system.txt.
- systemString = "HOSTNAME: %s\nDATE: %s\n" %(platform.node(), time.strftime("%Y-%m-%d_%H:%M:%S"))
- stdout = runCommandOutput("uname", ["-a"])
- if (not stdout == None):
- systemString += "UNAME-A: %s\n" %(stdout)
- stdout = runCommandOutput("uptime", [])
- if (not stdout == None):
- systemString += "UPTIME: %s\n" %(stdout)
- writeToFile(os.path.join(pathToDSTDir, "system.txt"), systemString, createFile=True)
-
- # Get "mount -l" filesystem data.
- command = "cat"
- pathToCommandOutput = os.path.join(pathToDSTDir, "cat-proc_mounts.txt")
- try:
- fout = open(pathToCommandOutput, "w")
- runCommand(command, ["/proc/mounts"], standardOut=fout)
- fout.close()
- except IOError:
- message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
- # Get "ps -eo user,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,comm,wchan" data.
- command = "ps"
- pathToCommandOutput = os.path.join(pathToDSTDir, "ps.txt")
- try:
- fout = open(pathToCommandOutput, "w")
- #runCommand(command, ["-eo", "user,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,comm,wchan"], standardOut=fout)
- runCommand(command, ["h", "-AL", "-o", "tid,s,cmd"], standardOut=fout)
- fout.close()
- except IOError:
- message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
-def triggerSysRQEvents():
- """
- This command will trigger sysrq events which will write the output to
- /var/log/messages. The events that will be trigger are "m" and "t". The "m"
- event will dump information about memory allocation. The "t" event will dump
- all the threads state information.
- """
- command = "echo"
- pathToSysrqTriggerFile = "/proc/sysrq-trigger"
- # m - dump information about memory allocation
- # t - dump thread state information
- triggers = ["m", "t"]
- for trigger in triggers:
- try:
- fout = open(pathToSysrqTriggerFile, "w")
- runCommand(command, [trigger], standardOut=fout)
- fout.close()
- except IOError:
- message = "There was an error the command output for %s to the file %s." %(command, pathToSysrqTriggerFile)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
-def gatherLogs(pathToDSTDir):
- """
- This function will copy all the cluster logs(/var/log/cluster) and the
- system log(/var/log/messages) to the directory given by pathToDSTDir.
-
- @param pathToDSTDir: This is the path to directory where the files will be
- copied to.
- @type pathToDSTDir: String
- """
- if (mkdirs(pathToDSTDir)):
- # Copy messages logs that contain the sysrq data.
- pathToLogFile = "/var/log/messages"
- pathToDSTLogFile = os.path.join(pathToDSTDir, os.path.basename(pathToLogFile))
- try:
- shutil.copyfile(pathToLogFile, pathToDSTLogFile)
- except shutil.Error:
- message = "There was an error copying the file: %s to %s." %(pathToLogFile, pathToDSTLogFile)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
- pathToLogDir = "/var/log/cluster"
- pathToDSTLogDir = os.path.join(pathToDSTDir, os.path.basename(pathToLogDir))
- if (os.path.isdir(pathToLogDir)):
- try:
- shutil.copytree(pathToLogDir, pathToDSTLogDir)
- except shutil.Error:
- message = "There was an error copying the directory: %s to %s." %(pathToLogDir, pathToDSTLogDir)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
-def gatherDLMLockDumps(pathToDSTDir, listOfGFS2Filesystems):
- """
- This function copies the debug files for dlm for a GFS2 filesystem in the
- list to a directory. The list of GFS2 filesystems will only include the
- filesystem name for each item in the list. For example: "mygfs2vol1"
-
- @param pathToDSTDir: This is the path to directory where the files will be
- copied to.
- @type pathToDSTDir: String
- @param listOfGFS2Filesystems: This is the list of the GFS2 filesystems that
- will have their debug directory copied.
- @type listOfGFS2Filesystems: Array
- """
- lockDumpType = "dlm"
- pathToSrcDir = os.path.join(PATH_TO_DEBUG_DIR, lockDumpType)
- pathToOutputDir = os.path.join(pathToDSTDir, lockDumpType)
- message = "Copying the files in the %s lockdump data directory %s for the selected GFS2 filesystem with dlm debug files." %(lockDumpType.upper(), pathToSrcDir)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- for filename in os.listdir(pathToSrcDir):
- for name in listOfGFS2Filesystems:
- if (filename.startswith(name)):
- pathToCurrentFilename = os.path.join(pathToSrcDir, filename)
- pathToDSTDir = os.path.join(pathToOutputDir, name)
- mkdirs(pathToDSTDir)
- pathToDSTFilename = os.path.join(pathToDSTDir, filename)
- try:
- shutil.copy(pathToCurrentFilename, pathToDSTFilename)
- except shutil.Error:
- message = "There was an error copying the file: %s to %s." %(pathToCurrentFilename, pathToDSTFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- except OSError:
- message = "There was an error copying the file: %s to %s." %(pathToCurrentFilename, pathToDSTFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
-def gatherGFS2LockDumps(pathToDSTDir, listOfGFS2Filesystems):
- """
- This function copies the debug directory for a GFS2 filesystems in the list
- to a directory. The list of GFS2 filesystems will include the cluster name
- and filesystem name for each item in the list. For example:
- "f18cluster:mygfs2vol1"
-
- @param pathToDSTDir: This is the path to directory where the files will be
- copied to.
- @type pathToDSTDir: String
- @param listOfGFS2Filesystems: This is the list of the GFS2 filesystems that
- will have their debug directory copied.
- @type listOfGFS2Filesystems: Array
- """
- lockDumpType = "gfs2"
- pathToSrcDir = os.path.join(PATH_TO_DEBUG_DIR, lockDumpType)
- pathToOutputDir = os.path.join(pathToDSTDir, lockDumpType)
- for dirName in os.listdir(pathToSrcDir):
- pathToCurrentDir = os.path.join(pathToSrcDir, dirName)
- if ((os.path.isdir(pathToCurrentDir)) and (dirName in listOfGFS2Filesystems)):
- mkdirs(pathToOutputDir)
- pathToDSTDir = os.path.join(pathToOutputDir, dirName)
- try:
- message = "Copying the lockdump data for the %s filesystem: %s" %(lockDumpType.upper(), dirName)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- shutil.copytree(pathToCurrentDir, pathToDSTDir)
- except shutil.Error:
- message = "There was an error copying the directory: %s to %s." %(pathToCurrentDir, pathToDSTDir)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- except OSError:
- message = "There was an error copying the directory: %s to %s." %(pathToCurrentDir, pathToDSTDir)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
-
-# ##############################################################################
-# Get user selected options
-# ##############################################################################
-def __getOptions(version) :
- """
- This function creates the OptionParser and returns commandline
- a tuple of the selected commandline options and commandline args.
-
- The cmdlineOpts which is the options user selected and cmdLineArgs
- is value passed and not associated with an option.
-
- @return: A tuple of the selected commandline options and commandline args.
- @rtype: Tuple
-
- @param version: The version of the this script.
- @type version: String
- """
- cmdParser = OptionParserExtended(version)
- cmdParser.add_option("-d", "--debug",
- action="store_true",
- dest="enableDebugLogging",
- help="Enables debug logging.",
- default=False)
- cmdParser.add_option("-q", "--quiet",
- action="store_true",
- dest="disableLoggingToConsole",
- help="Disables logging to console.",
- default=False)
- cmdParser.add_option("-i", "--info",
- action="store_true",
- dest="enablePrintInfo",
- help="Prints to console some basic information about the GFS2 filesystems mounted on the cluster node.",
- default=False)
- cmdParser.add_option("-M", "--mount_debug_fs",
- action="store_true",
- dest="enableMountDebugFS",
- help="Enables the mounting of the debug filesystem if it is not mounted. Default is disabled.",
- default=False)
- cmdParser.add_option("-o", "--path_to_output_dir",
- action="store",
- dest="pathToOutputDir",
- help="The path to the output directory where all the collect data will be stored. Default is /tmp/<date>-<hostname>-%s" %(os.path.basename(sys.argv[0])),
- type="string",
- default="")
- cmdParser.add_option("-r", "--num_of_runs",
- action="store",
- dest="numberOfRuns",
- help="The number of lockdumps runs to do. Default is 2.",
- type="int",
- default=2)
- cmdParser.add_option("-s", "--seconds_sleep",
- action="store",
- dest="secondsToSleep",
- help="The number of seconds sleep between runs. Default is 120 seconds.",
- type="int",
- default=120)
- cmdParser.add_option("-t", "--archive",
- action="store_true",
- dest="enableArchiveOutputDir",
- help="Enables archiving and compressing of the output directory with tar and bzip2. Default is disabled.",
- default=False)
- cmdParser.add_option("-n", "--fs_name",
- action="extend",
- dest="listOfGFS2Names",
- help="List of GFS2 filesystems that will have their lockdump data gathered.",
- type="string",
- default=[]) # Get the options and return the result.
- (cmdLineOpts, cmdLineArgs) = cmdParser.parse_args()
- return (cmdLineOpts, cmdLineArgs)
-
-# ##############################################################################
-# OptParse classes for commandline options
-# ##############################################################################
-class OptionParserExtended(OptionParser):
- """
- This is the class that gets the command line options the end user
- selects.
- """
- def __init__(self, version) :
- """
- @param version: The version of the this script.
- @type version: String
- """
- self.__commandName = os.path.basename(sys.argv[0])
- versionMessage = "%s %s\n" %(self.__commandName, version)
-
- commandDescription ="%s will capture information about lockdata data for GFS2 and DLM required to analyze a GFS2 filesystem.\n"%(self.__commandName)
-
- OptionParser.__init__(self, option_class=ExtendOption,
- version=versionMessage,
- description=commandDescription)
-
- def print_help(self):
- """
- Print examples at the bottom of the help message.
- """
- self.print_version()
- examplesMessage = "\n"
- examplesMessage = "\nPrints information about the available GFS2 filesystems that can have lockdump data captured."
- examplesMessage += "\n$ %s -i\n" %(self.__commandName)
- examplesMessage += "\nThis command will mount the debug directory if it is not mounted. It will do 3 runs of\n"
- examplesMessage += "gathering the lockdump information in 10 second intervals for only the GFS2 filesystems\n"
- examplesMessage += "with the names myGFS2vol2,myGFS2vol1. Then it will archive and compress the data collected."
- examplesMessage += "\n$ %s -M -r 3 -s 10 -t -n myGFS2vol2,myGFS2vol1\n" %(self.__commandName)
- OptionParser.print_help(self)
- print examplesMessage
-
-class ExtendOption (Option):
- """
- Allow to specify comma delimited list of entries for arrays
- and dictionaries.
- """
- ACTIONS = Option.ACTIONS + ("extend",)
- STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",)
- TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extend",)
-
- def take_action(self, action, dest, opt, value, values, parser):
- """
- This function is a wrapper to take certain options passed on command
- prompt and wrap them into an Array.
-
- @param action: The type of action that will be taken. For example:
- "store_true", "store_false", "extend".
- @type action: String
- @param dest: The name of the variable that will be used to store the
- option.
- @type dest: String/Boolean/Array
- @param opt: The option string that triggered the action.
- @type opt: String
- @param value: The value of opt(option) if it takes a
- value, if not then None.
- @type value:
- @param values: All the opt(options) in a dictionary.
- @type values: Dictionary
- @param parser: The option parser that was orginally called.
- @type parser: OptionParser
- """
- if (action == "extend") :
- valueList=[]
- try:
- for v in value.split(","):
- # Need to add code for dealing with paths if there is option for paths.
- valueList.append(v)
- except:
- pass
- else:
- values.ensure_value(dest, []).extend(valueList)
- else:
- Option.take_action(self, action, dest, opt, value, values, parser)
-
-# ###############################################################################
-# Main Function
-# ###############################################################################
-if __name__ == "__main__":
- """
- When the script is executed then this code is ran.
- """
- try:
- # #######################################################################
- # Get the options from the commandline.
- # #######################################################################
- (cmdLineOpts, cmdLineArgs) = __getOptions(VERSION_NUMBER)
- # #######################################################################
- # Setup the logger and create config directory
- # #######################################################################
- # Create the logger
- logLevel = logging.INFO
- logger = logging.getLogger(MAIN_LOGGER_NAME)
- logger.setLevel(logLevel)
- # Create a new status function and level.
- logging.STATUS = logging.INFO + 2
- logging.addLevelName(logging.STATUS, "STATUS")
- # Create a function for the STATUS_LEVEL since not defined by python. This
- # means you can call it like the other predefined message
- # functions. Example: logging.getLogger("loggerName").status(message)
- setattr(logger, "status", lambda *args: logger.log(logging.STATUS, *args))
- streamHandler = logging.StreamHandler()
- streamHandler.setLevel(logLevel)
- streamHandler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
- logger.addHandler(streamHandler)
-
- # Set the handler for writing to log file.
- pathToLogFile = "/tmp/%s.log" %(MAIN_LOGGER_NAME)
- if (((os.access(pathToLogFile, os.W_OK) and os.access("/tmp", os.R_OK))) or (not os.path.exists(pathToLogFile))):
- fileHandler = logging.FileHandler(pathToLogFile)
- fileHandler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s", "%Y-%m-%d %H:%M:%S"))
- logger.addHandler(fileHandler)
- message = "A log file will be created or appened to: %s" %(pathToLogFile)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- else:
- message = "There was permission problem accessing the write attributes for the log file: %s." %(pathToLogFile)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- # #######################################################################
- # Set the logging levels.
- # #######################################################################
- if ((cmdLineOpts.enableDebugLogging) and (not cmdLineOpts.disableLoggingToConsole)):
- logging.getLogger(MAIN_LOGGER_NAME).setLevel(logging.DEBUG)
- streamHandler.setLevel(logging.DEBUG)
- message = "Debugging has been enabled."
- logging.getLogger(MAIN_LOGGER_NAME).debug(message)
- if (cmdLineOpts.disableLoggingToConsole):
- logging.disable(logging.CRITICAL)
- # #######################################################################
- # Check to see if pid file exists and error if it does.
- # #######################################################################
- if (os.path.exists(PATH_TO_PID_FILENAME)):
- message = "The PID file %s already exists and this script cannot run till it does not exist." %(PATH_TO_PID_FILENAME)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- message = "Verify that there are no other existing processes running. If there are running processes those need to be stopped first and the file removed."
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- exitScript(removePidFile=False, errorCode=1)
- else:
- message = "Creating the pid file: %s" %(PATH_TO_PID_FILENAME)
- logging.getLogger(MAIN_LOGGER_NAME).debug(message)
- # Creata the pid file so we dont have more than 1 process of this
- # script running.
- writeToFile(PATH_TO_PID_FILENAME, str(os.getpid()), createFile=True)
- # #######################################################################
- # Get the clusternode name and verify that mounted GFS2 filesystems were
- # found.
- # #######################################################################
- clusternode = getClusterNode(cmdLineOpts.listOfGFS2Names)
- if (clusternode == None):
- message = "The cluster or cluster node name could not be found."
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- exitScript(removePidFile=True, errorCode=1)
- elif (not len(clusternode.getMountedGFS2FilesystemNames()) > 0):
- message = "There were no mounted GFS2 filesystems found."
- if (len(cmdLineOpts.listOfGFS2Names) > 0):
- message = "There were no mounted GFS2 filesystems found with the name:"
- for name in cmdLineOpts.listOfGFS2Names:
- message += " %s" %(name)
- message += "."
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- exitScript(removePidFile=True, errorCode=1)
- if (cmdLineOpts.enablePrintInfo):
- logging.disable(logging.CRITICAL)
- print "List of all the mounted GFS2 filesystems that can have their lockdump data captured:"
- print clusternode
- exitScript()
- # #######################################################################
- # Create the output directory to verify it can be created before
- # proceeding unless it is already created from a previous run data needs
- # to be analyzed. Probably could add more debugging on if file or dir.
- # #######################################################################
- message = "The gathering of the lockdumps will be performed on the clusternode \"%s\" which is part of the cluster \"%s\"." %(clusternode.getClusterNodeName(), clusternode.getClusterName())
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- pathToOutputDir = cmdLineOpts.pathToOutputDir
- if (not len(pathToOutputDir) > 0):
- pathToOutputDir = "%s" %(os.path.join("/tmp", "%s-%s-%s" %(time.strftime("%Y-%m-%d_%H%M%S"), clusternode.getClusterNodeName(), os.path.basename(sys.argv[0]))))
- # #######################################################################
- # Backup any existing directory with same name as current output
- # directory.
- # #######################################################################
- if (backupOutputDirectory(pathToOutputDir)):
- message = "This directory that will be used to capture all the data: %s" %(pathToOutputDir)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- if (not mkdirs(pathToOutputDir)):
- exitScript(errorCode=1)
- else:
- # There was an existing directory with same path as current output
- # directory and it failed to back it up.
- message = "Please change the output directory path (-o) or manual rename or remove the existing path: %s" %(pathToOutputDir)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- exitScript(errorCode=1)
- # #######################################################################
- # Check to see if the debug directory is mounted. If not then
- # log an error.
- # #######################################################################
- result = verifyDebugFilesystemMounted(cmdLineOpts.enableMountDebugFS)
- if (not result):
- message = "Please mount the debug filesystem before running this script. For example: $ mount none -t debugfs %s" %(PATH_TO_DEBUG_DIR)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- exitScript(errorCode=1)
-
- # #######################################################################
- # Gather data and the lockdumps.
- # #######################################################################
- message = "The process of gathering all the required files will begin before capturing the lockdumps."
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- for i in range(0,cmdLineOpts.numberOfRuns):
- # The current log count that will start at 1 and not zero to make it
- # make sense in logs.
- currentLogRunCount = (i + 1)
- # Add clusternode name under each run dir to make combining multple
- # clusternode gfs2_lockgather data together and all data in each run directory.
- pathToOutputRunDir = os.path.join(pathToOutputDir, "run%d/%s" %(i, clusternode.getClusterNodeName()))
- if (not mkdirs(pathToOutputRunDir)):
- exitScript(errorCode=1)
- # Gather various bits of data from the clusternode.
- message = "Gathering some general information about the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- gatherGeneralInformation(pathToOutputRunDir)
- # Trigger sysrq events to capture memory and thread information
- message = "Triggering the sysrq events for the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- triggerSysRQEvents()
- # Gather the dlm locks.
- lockDumpType = "dlm"
- message = "Gathering the %s lock dumps for clusternode %s for run %d/%d." %(lockDumpType.upper(), clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- gatherDLMLockDumps(pathToOutputRunDir, clusternode.getMountedGFS2FilesystemNames(includeClusterName=False))
- # Gather the glock locks from gfs2.
- lockDumpType = "gfs2"
- message = "Gathering the %s lock dumps for clusternode %s for run %d/%d." %(lockDumpType.upper(), clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- gatherGFS2LockDumps(pathToOutputRunDir, clusternode.getMountedGFS2FilesystemNames())
- # Gather log files
- message = "Gathering the log files for the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- gatherLogs(os.path.join(pathToOutputRunDir, "logs"))
- # Sleep between each run if secondsToSleep is greater than or equal
- # to 0 and current run is not the last run.
- if ((cmdLineOpts.secondsToSleep >= 0) and (i < (cmdLineOpts.numberOfRuns - 1))):
- message = "The script will sleep for %d seconds between each run of capturing the lockdumps." %(cmdLineOpts.secondsToSleep)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- message = "The script is sleeping before beginning the next run."
- logging.getLogger(MAIN_LOGGER_NAME).status(message)
- time.sleep(cmdLineOpts.secondsToSleep)
- # #######################################################################
- # Archive the directory that contains all the data and archive it after
- # all the information has been gathered.
- # #######################################################################
- message = "All the files have been gathered and this directory contains all the captured data: %s" %(pathToOutputDir)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- if (cmdLineOpts.enableArchiveOutputDir):
- message = "The lockdump data will now be archived. This could some time depending on the size of the data collected."
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- pathToTarFilename = archiveData(pathToOutputDir)
- if (os.path.exists(pathToTarFilename)):
- message = "The compressed archvied file was created: %s" %(pathToTarFilename)
- logging.getLogger(MAIN_LOGGER_NAME).info(message)
- else:
- message = "The compressed archvied failed to be created: %s" %(pathToTarFilename)
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- # #######################################################################
- except KeyboardInterrupt:
- print ""
- message = "This script will exit since control-c was executed by end user."
- logging.getLogger(MAIN_LOGGER_NAME).error(message)
- exitScript(errorCode=1)
- # #######################################################################
- # Exit the application with zero exit code since we cleanly exited.
- # #######################################################################
- exitScript()
11 years, 5 months
gfs2-utils: master - gfs2-utils: Remove gfs2_lockgather
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=956172a8...
Commit: 956172a86275a372df11a5be41fbdd981d7aabac
Parent: ee9967bac6295e0f23c980a321a30339ddf61be2
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Nov 12 14:11:45 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Nov 12 14:11:45 2012 +0000
gfs2-utils: Remove gfs2_lockgather
gfs2_lockcapture obsoletes gfs2_lockgather
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/lockgather/gfs2_lockgather | 129 ---------------------------------------
1 files changed, 0 insertions(+), 129 deletions(-)
diff --git a/gfs2/lockgather/gfs2_lockgather b/gfs2/lockgather/gfs2_lockgather
deleted file mode 100644
index ed4a0c5..0000000
--- a/gfs2/lockgather/gfs2_lockgather
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-
-# gfs2_lockgather - A script that gathers data for diagnosing GFS2 locking issues
-# Copyright 2012 Adam Drew <adrew(a)redhat.com>
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-QUIET=false
-
-#Handle arguments
-for var in "$@"
-do
- #Handle running on all nodes
- if [ $var == "--allnodes" ] || [ $var == "-a" ] ; then
-
- for node in $(ccs_tool lsnode | tail --lines=+5 | grep -v "Cluster name" | grep -v "Nodename" | awk '{print $1}') ; do
- #We gather via SSH on all nodes, even the local node
- #We do this becuase determining which node name is the
- #node running the script is too much logic to be worth it
- echo "Starting data gathering on $node..."
- ssh -q -f root@$node '/sbin/gfs2_lockgather -q'
- echo "gfs2_lockgather will log a message in /var/log/messages on $node when complete or if there is an error."
- done
- exit 0
- fi
-
- #Handle quiet mode
- if [ $var == "-q" ] || [ $var == "--quiet" ] ; then
- QUIET=true
- fi
-
- #Handle help request
- if [ $var == "--help" ] || [ $var == "--info" ] || [ $var == "-h" ] ; then
-
- echo "gfs2_lockgather, version 1"
- echo "A script that gathers data for diagnosing GFS2 locking issues."
- echo "---------------------------------------------------------------"
- echo "To gather on a single node invoke the script with no arguments."
- echo "To see this message use --help, --info, or -h."
- echo "To run with messages supressed use --quiet or -q."
- echo "To gather on all nodes invoke the script with --allnodes or -a."
- echo "Only 1 instance of gfs2_lockgather may run on a node at a time."
- echo ""
- exit 0
- fi
-
-done
-
-#Check for the lock file. We only want one instance running at a time.
-if [ -e /var/run/gfs2_lockgather.lock ]; then
- echo -ne 'Error: Lock file /var/run/gfs2_lockgather.lock found.\nAnother instance of gfs2_lockgather may be running.\nAnother node may be running a gather on this node.\n'
- logger -t gfs2_lockgather 'Error: Lock file /var/run/gfs2_lockgather.lock found. Another instance may be running. Quitting.'
- exit 1
-fi
-
-#Create the gather lock
-touch /var/run/gfs2_lockgather.lock
-
-logger -t gfs2_lockgather 'Gather started.'
-
-if [ $QUIET == false ] ; then echo -ne '[ ] Setting up for gather.\t\t\t\t\t\t\t\t\r' ; fi
-#Get the current datetime for unique naming
-DATETIME=$(date +%m%d%Y-%H%M%S)
-
-#Set up the directory structure
-mkdir /tmp/debugfs
-mount -t debugfs none /tmp/debugfs
-mkdir /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata
-mkdir /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/run1
-mkdir /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/run2
-
-if [ $QUIET == false ] ; then echo -ne '[# ] Gathering environment data.\t\t\t\t\t\t\t\t\r' ; fi
-#Gather some basics
-clustat > /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/clustat.out
-cman_tool services > /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/clustat.out
-mount -l > /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/mount-l.out
-ps aux > /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/ps-aux.out
-uname -a > /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/uname-a.out
-
-if [ $QUIET == false ] ; then echo -ne '[## ] Gathering GFS2 and DLM lock data: pass 1\t\t\t\t\t\t\t\t\r' ; fi
-#Glock and DLM lock dump 1
-for dlmfile in $(ls -lsv /tmp/debugfs/dlm/ | grep -v total | awk '{print $10}') ; do dd if=/tmp/debugfs/dlm/$dlmfile bs=1024M of=/tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/run1/$dlmfile &> /dev/null; done
-for fs in $(ls -lsv /tmp/debugfs/gfs2/ | grep -v total | awk '{print $10}') ; do dd if=/tmp/debugfs/gfs2/$fs/glocks bs=1024M of=/tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/run1/$fs-glocks &> /dev/null; done
-
-#Enable and trigger sysrq
-echo 1 > /proc/sys/kernel/sysrq
-
-#Thread Dump
-#This is much faster than waiting for syslog to dump the thread dumps to the messages log
-if [ $QUIET == false ] ; then echo -ne '[### ] Gathering thread dumps.\t\t\t\t\t\t\t\t\r' ; fi
-
-$(
-cat /proc/kmsg > /tmp/thread-dumps &
-echo 't' > /proc/sysrq-trigger
-sleep 10
-kill -9 $!
-)
-
-if [ $QUIET == false ] ; then echo -ne '[#### ] Gathering GFS2 and DLM lock data: pass 2.\t\t\t\t\t\t\t\t\r' ; fi
-#Glock and DLM dump 2
-for dlmfile in $(ls -lsv /tmp/debugfs/dlm/ | grep -v total | awk '{print $10}') ; do dd if=/tmp/debugfs/dlm/$dlmfile bs=1024M of=/tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/run2/$dlmfile &> /dev/null; done
-for fs in $(ls -lsv /tmp/debugfs/gfs2/ | grep -v total | awk '{print $10}') ; do dd if=/tmp/debugfs/gfs2/$fs/glocks bs=1024M of=/tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/run2/$fs-glocks &> /dev/null; done
-
-if [ $QUIET == false ] ; then echo -ne '[##### ] Gathering messages logs\t\t\t\t\t\t\t\t\r' ; fi
-#Get the messages log file
-cp /var/log/messages /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/
-
-#Tar up the results and clean up temporary files
-if [ $QUIET == false ] ; then echo -ne '[###### ] Cleaning up... 80%.\t\t\t\t\t\t\t\t\r' ; fi
-tar cjf /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata.tar.bz /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata/ &> /dev/null
-umount /tmp/debugfs/
-rm -f /var/run/gfs2_lockgather.lock
-rm -rf /tmp/debugfs
-rm -rf /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata
-logger -t gfs2_lockgather "Gather completed. File is /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata.tar.bz"
-if [ $QUIET == false ] ; then echo -ne "[#######] Done. File is /tmp/$(hostname)-$(echo $DATETIME)-gfshangdata.tar.bz\r\t\t\t\t\t\t\t\t\r\n" ; fi
-exit 0
11 years, 5 months
gfs2-utils: master - gfs2-utils: Added a new script called gfs2_lockcapture that will capture lockdump data.
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=ee9967ba...
Commit: ee9967bac6295e0f23c980a321a30339ddf61be2
Parent: 64c034a88c2ad84aaef179d6b8de9941ceb49759
Author: Shane Bradley <sbradley(a)redhat.com>
AuthorDate: Mon Nov 12 09:06:56 2012 -0500
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Nov 12 14:10:42 2012 +0000
gfs2-utils: Added a new script called gfs2_lockcapture that will capture lockdump data.
The script gfs2_lockcapture will capture lockdump data(including dlm debug data)
for the mounted GFS2 filesystems on a cluster node. In addition to the debug
data, uname -a, hostname, date, mount, ps, etc are gathered. The script contains
many configurable optons which include the number of iterations, sleep time
between runs, etc. The script is completed including docstrings. The Makefile
was also changed so that a similar script was removed called gfs2_lockgather and
was replaced with gfs2_lockcapture as the item that will be made.
Signed-off-by: Shane Bradley <sbradley(a)redhat.com>
---
gfs2/lockgather/Makefile.am | 2 +-
gfs2/lockgather/gfs2_lockcapture | 1078 ++++++++++++++++++++++++++++++++++++++
2 files changed, 1079 insertions(+), 1 deletions(-)
diff --git a/gfs2/lockgather/Makefile.am b/gfs2/lockgather/Makefile.am
index fe8b480..b88580e 100644
--- a/gfs2/lockgather/Makefile.am
+++ b/gfs2/lockgather/Makefile.am
@@ -9,4 +9,4 @@ sbindir := $(shell rpl=0; test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
test $$rpl = 1 && echo /sbin || echo '$(exec_prefix)/sbin')
-dist_sbin_SCRIPTS = gfs2_lockgather
+dist_sbin_SCRIPTS = gfs2_lockcapture
diff --git a/gfs2/lockgather/gfs2_lockcapture b/gfs2/lockgather/gfs2_lockcapture
new file mode 100644
index 0000000..a930a2f
--- /dev/null
+++ b/gfs2/lockgather/gfs2_lockcapture
@@ -0,0 +1,1078 @@
+#!/usr/bin/env python
+"""
+This script will gather GFS2 glocks and dlm lock dump information for a cluster
+node. The script can get all the mounted GFS2 filesystem data or set of selected
+GFS2 filesystems. The script will also gather some general information about the
+system.
+
+@author : Shane Bradley
+@contact : sbradley(a)redhat.com
+@version : 0.9
+@copyright : GPLv2
+"""
+import sys
+import os
+import os.path
+import logging
+from optparse import OptionParser, Option
+import time
+import platform
+import shutil
+import subprocess
+import tarfile
+
+# #####################################################################
+# Global vars:
+# #####################################################################
+"""
+@cvar VERSION_NUMBER: The version number of this script.
+@type VERSION_NUMBER: String
+@cvar MAIN_LOGGER_NAME: The name of the logger.
+@type MAIN_LOGGER_NAME: String
+@cvar PATH_TO_DEBUG_DIR: The path to the debug directory for the linux kernel.
+@type PATH_TO_DEBUG_DIR: String
+@cvar PATH_TO_PID_FILENAME: The path to the pid file that will be used to make
+sure only 1 instance of this script is running at any time.
+@type PATH_TO_PID_FILENAME: String
+"""
+VERSION_NUMBER = "0.9-1"
+MAIN_LOGGER_NAME = "%s" %(os.path.basename(sys.argv[0]))
+PATH_TO_DEBUG_DIR="/sys/kernel/debug"
+PATH_TO_PID_FILENAME = "/var/run/%s.pid" %(os.path.basename(sys.argv[0]))
+
+# #####################################################################
+# Class to define what a clusternode is.
+# #####################################################################
+class ClusterNode:
+ """
+ This class represents a cluster node that is a current memeber in a cluster.
+ """
+ def __init__(self, clusternodeName, clusterName, mapOfMountedFilesystemLabels):
+ """
+ @param clusternodeName: The name of the cluster node.
+ @type clusternodeName: String
+ @param clusterName: The name of the cluster that this cluster node is a
+ member of.
+ @type clusterName: String
+ @param mapOfMountedFilesystemLabels: A map of filesystem labels(key) for
+ a mounted filesystem. The value is the line for the matching mounted
+ filesystem from the mount -l command.
+ @type mapOfMountedFilesystemLabels: Dict
+ """
+ self.__clusternodeName = clusternodeName
+ self.__clusterName = clusterName
+ self.__mapOfMountedFilesystemLabels = mapOfMountedFilesystemLabels
+
+ def __str__(self):
+ """
+ This function will return a string representation of the object.
+
+ @return: Returns a string representation of the object.
+ @rtype: String
+ """
+ rString = ""
+ rString += "%s:%s" %(self.getClusterName(), self.getClusterNodeName())
+ fsLabels = self.__mapOfMountedFilesystemLabels.keys()
+ fsLabels.sort()
+ for fsLabel in fsLabels:
+ rString += "\n\t%s --> %s" %(fsLabel, self.__mapOfMountedFilesystemLabels.get(fsLabel))
+ return rString.rstrip()
+
+ def getClusterNodeName(self):
+ """
+ Returns the name of the cluster node.
+
+ @return: Returns the name of the cluster node.
+ @rtype: String
+ """
+ return self.__clusternodeName
+
+ def getClusterName(self):
+ """
+ Returns the name of cluster that this cluster node is a member of.
+
+ @return: Returns the name of cluster that this cluster node is a member
+ of.
+ @rtype: String
+ """
+ return self.__clusterName
+
+ def getMountedGFS2FilesystemNames(self, includeClusterName=True):
+ """
+ Returns the names of all the mounted GFS2 filesystems. By default
+ includeClusterName is True which will include the name of the cluster
+ and the GFS2 filesystem name(ex. f18cluster:mygfs2vol1) in the list of
+ mounted GFS2 filesystems. If includeClusterName is False it will only
+ return a list of all the mounted GFS2 filesystem names(ex. mygfs2vol1).
+
+ @return: Returns a list of all teh mounted GFS2 filesystem names.
+ @rtype: Array
+
+ @param includeClusterName: By default this option is True and will
+ include the name of the cluster and the GFS2 filesystem name. If False
+ then only the GFS2 filesystem name will be included.
+ @param includeClusterName: Boolean
+ """
+ # If true will prepend the cluster name to gfs2 fs name
+ if (includeClusterName):
+ return self.__mapOfMountedFilesystemLabels.keys()
+ else:
+ listOfGFS2MountedFilesystemLabels = []
+ for fsLabel in self.__mapOfMountedFilesystemLabels.keys():
+ fsLabelSplit = fsLabel.split(":", 1)
+ if (len(fsLabelSplit) == 2):
+ listOfGFS2MountedFilesystemLabels.append(fsLabelSplit[1])
+ return listOfGFS2MountedFilesystemLabels
+
+# #####################################################################
+# Helper functions.
+# #####################################################################
+def runCommand(command, listOfCommandOptions, standardOut=subprocess.PIPE, standardError=subprocess.PIPE):
+ """
+ This function will execute a command. It will return True if the return code
+ was zero, otherwise False is returned.
+
+ @return: Returns True if the return code was zero, otherwise False is
+ returned.
+ @rtype: Boolean
+
+ @param command: The command that will be executed.
+ @type command: String
+ @param listOfCommandOptions: The list of options for the command that will
+ be executed.
+ @type listOfCommandOptions: Array
+ @param standardOut: The pipe that will be used to write standard output. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardOut: Pipe
+ @param standardError: The pipe that will be used to write standard error. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardError: Pipe
+ """
+ stdout = ""
+ stderr = ""
+ try:
+ commandList = [command]
+ commandList += listOfCommandOptions
+ task = subprocess.Popen(commandList, stdout=standardOut, stderr=standardError)
+ task.wait()
+ (stdout, stderr) = task.communicate()
+ return (task.returncode == 0)
+ except OSError:
+ commandOptionString = ""
+ for option in listOfCommandOptions:
+ commandOptionString += "%s " %(option)
+ message = "An error occurred running the command: $ %s %s\n" %(command, commandOptionString)
+ if (len(stdout) > 0):
+ message += stdout
+ message += "\n"
+ if (len(stderr) > 0):
+ message += stderr
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+
+def runCommandOutput(command, listOfCommandOptions, standardOut=subprocess.PIPE, standardError=subprocess.PIPE):
+ """
+ This function will execute a command. Returns the output that was written to standard output. None is
+ returned if there was an error.
+
+ @return: Returns the output that was written to standard output. None is
+ returned if there was an error.
+ @rtype: String
+
+ @param command: The command that will be executed.
+ @type command: String
+ @param listOfCommandOptions: The list of options for the command that will
+ be executed.
+ @type listOfCommandOptions: Array
+ @param standardOut: The pipe that will be used to write standard output. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardOut: Pipe
+ @param standardError: The pipe that will be used to write standard error. By
+ default the pipe that is used is subprocess.PIPE.
+ @type standardError: Pipe
+ """
+ stdout = ""
+ stderr = ""
+ try:
+ commandList = [command]
+ commandList += listOfCommandOptions
+ task = subprocess.Popen(commandList, stdout=standardOut, stderr=standardError)
+ task.wait()
+ (stdout, stderr) = task.communicate()
+ except OSError:
+ commandOptionString = ""
+ for option in listOfCommandOptions:
+ commandOptionString += "%s " %(option)
+ message = "An error occurred running the command: $ %s %s\n" %(command, commandOptionString)
+ if (len(stdout) > 0):
+ message += stdout
+ message += "\n"
+ if (len(stderr) > 0):
+ message += stderr
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return None
+ return stdout.strip().rstrip()
+
+def writeToFile(pathToFilename, data, appendToFile=True, createFile=False):
+ """
+ This function will write a string to a file.
+
+ @return: Returns True if the string was successfully written to the file,
+ otherwise False is returned.
+ @rtype: Boolean
+
+ @param pathToFilename: The path to the file that will have a string written
+ to it.
+ @type pathToFilename: String
+ @param data: The string that will be written to the file.
+ @type data: String
+ @param appendToFile: If True then the data will be appened to the file, if
+ False then the data will overwrite the contents of the file.
+ @type appendToFile: Boolean
+ @param createFile: If True then the file will be created if it does not
+ exists, if False then file will not be created if it does not exist
+ resulting in no data being written to the file.
+ @type createFile: Boolean
+ """
+ [parentDir, filename] = os.path.split(pathToFilename)
+ if (os.path.isfile(pathToFilename) or (os.path.isdir(parentDir) and createFile)):
+ try:
+ filemode = "w"
+ if (appendToFile):
+ filemode = "a"
+ fout = open(pathToFilename, filemode)
+ fout.write(data + "\n")
+ fout.close()
+ return True
+ except UnicodeEncodeError, e:
+ message = "There was a unicode encode error writing to the file: %s." %(pathToFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ except IOError:
+ message = "There was an error writing to the file: %s." %(pathToFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ return False
+
+def mkdirs(pathToDSTDir):
+ """
+ This function will attempt to create a directory with the path of the value of pathToDSTDir.
+
+ @return: Returns True if the directory was created or already exists.
+ @rtype: Boolean
+
+ @param pathToDSTDir: The path to the directory that will be created.
+ @type pathToDSTDir: String
+ """
+ if (os.path.isdir(pathToDSTDir)):
+ return True
+ elif ((not os.access(pathToDSTDir, os.F_OK)) and (len(pathToDSTDir) > 0)):
+ try:
+ os.makedirs(pathToDSTDir)
+ except (OSError, os.error):
+ message = "Could not create the directory: %s." %(pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ except (IOError, os.error):
+ message = "Could not create the directory with the path: %s." %(pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return False
+ return os.path.isdir(pathToDSTDir)
+
+def removePIDFile():
+ """
+ This function will remove the pid file.
+
+ @return: Returns True if the file was successfully remove or does not exist,
+ otherwise False is returned.
+ @rtype: Boolean
+ """
+ message = "Removing the pid file: %s" %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).debug(message)
+ if (os.path.exists(PATH_TO_PID_FILENAME)):
+ try:
+ os.remove(PATH_TO_PID_FILENAME)
+ except IOError:
+ message = "There was an error removing the file: %s." %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return os.path.exists(PATH_TO_PID_FILENAME)
+
+def archiveData(pathToSrcDir):
+ """
+ This function will return the path to the tar.bz2 file that was created. If
+ the tar.bz2 file failed to be created then an empty string will be returned
+ which would indicate an error occurred.
+
+ @return: This function will return the path to the tar.bz2 file that was
+ created. If the tar.bz2 file failed to be created then an empty string will
+ be returned which would indicate an error occurred.
+ @rtype: String
+
+ @param pathToSrcDir: The path to the directory that will be archived into a
+ .tar.bz2 file.
+ @type pathToSrcDir: String
+ """
+ if (os.path.exists(pathToSrcDir)):
+ pathToTarFilename = "%s.tar.bz2" %(pathToSrcDir)
+ if (os.path.exists(pathToTarFilename)):
+ message = "A compressed archvied file already exists and will be removed: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ try:
+ os.remove(PATH_TO_PID_FILENAME)
+ except IOError:
+ message = "There was an error removing the file: %s." %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return ""
+ message = "Creating a compressed archvied file: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ try:
+ tar = tarfile.open(pathToTarFilename, "w:bz2")
+ tar.add(pathToSrcDir, arcname=os.path.basename(pathToSrcDir))
+ tar.close()
+ except tarfile.TarError:
+ message = "There was an error creating the tarfile: %s." %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return ""
+ if (os.path.exists(pathToTarFilename)):
+ return pathToTarFilename
+ return ""
+
+def backupOutputDirectory(pathToOutputDir):
+ """
+ This function will return True if the pathToOutputDir does not exist or the
+ directory was successfully rename. If pathToOutputDir exists and was not
+ successfully rename then False is returned.
+
+ @return: Returns True if the pathToOutputDir does not exist or the directory
+ was successfully rename. If pathToOutputDir exists and was not successfully
+ rename then False is returned.
+ @rtype: Boolean
+
+ @param pathToOutputDir: The path to the directory that will be backed up.
+ @type pathToOutputDir: String
+ """
+ if (os.path.exists(pathToOutputDir)):
+ message = "The path already exists and could contain previous lockdump data: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ backupIndex = 1
+ pathToDST = ""
+ keepSearchingForIndex = True
+ while (keepSearchingForIndex):
+ pathToDST = "%s.bk-%d" %(pathToOutputDir, backupIndex)
+ if (os.path.exists(pathToDST)):
+ backupIndex += 1
+ else:
+ keepSearchingForIndex = False
+ try:
+ message = "The existing output directory will be renamed: %s to %s." %(pathToOutputDir, pathToDST)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ shutil.move(pathToOutputDir, pathToDST)
+ except shutil.Error:
+ message = "There was an error renaming the directory: %s to %s." %(pathToOutputDir, pathToDST)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ except OSError:
+ message = "There was an error renaming the directory: %s to %s." %(pathToOutputDir, pathToDST)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ # The path should not exists now, else there was an error backing up an
+ # existing output directory.
+ return (not os.path.exists(pathToOutputDir))
+
+def exitScript(removePidFile=True, errorCode=0):
+ """
+ This function will cause the script to exit or quit. It will return an error
+ code and will remove the pid file that was created.
+
+ @param removePidFile: If True(default) then the pid file will be remove
+ before the script exits.
+ @type removePidFile: Boolean
+ @param errorCode: The exit code that will be returned. The default value is 0.
+ @type errorCode: Int
+ """
+ if (removePidFile):
+ removePIDFile()
+ message = "The script will exit."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ sys.exit(errorCode)
+
+# #####################################################################
+# Helper functions for gathering the lockdumps.
+# #####################################################################
+def getClusterNode(listOfGFS2Names):
+ """
+ This function return a ClusterNode object if the machine is a member of a
+ cluster and has GFS2 filesystems mounted for that cluster. The
+ listOfGFS2Names is a list of GFS2 filesystem that need to have their data
+ capture. If the list is empty then that means that all the mounted GFS2
+ filesystems will be captured, if list is not empty then only those GFS2
+ filesystems in the list will have their data captured.
+
+ @return: Returns a cluster node object if there was mounted GFS2 filesystems
+ found that will have their data captured.
+ @rtype: ClusterNode
+
+ @param listOfGFS2Names: A list of GFS2 filesystem names that will have their
+ data captured. If the list is empty then that means that all the mounted
+ GFS2 filesystems will be captured, if list is not empty then only those GFS2
+ filesystems in the list will have their data captured.
+ @type listOfGFS2Names: Array
+ """
+ # Return a ClusterNode object if the clusternode and cluster name are found
+ # in the output, else return None.
+ clusterName = ""
+ clusternodeName = ""
+ if (runCommand("which", ["cman_tool"])):
+ stdout = runCommandOutput("cman_tool", ["status"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("\n")
+ clusterName = ""
+ clusternodeName = ""
+ for line in stdoutSplit:
+ if (line.startswith("Cluster Name:")):
+ clusterName = line.split("Cluster Name:")[1].strip().rstrip()
+ if (line.startswith("Node name: ")):
+ clusternodeName = line.split("Node name:")[1].strip().rstrip()
+ elif (runCommand("which", ["corosync-cmapctl"])):
+ # Another way to get the local cluster node is: $ crm_node -i; crm_node -l
+ # Get the name of the cluster.
+ stdout = runCommandOutput("corosync-cmapctl", ["-g", "totem.cluster_name"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("=")
+ if (len(stdoutSplit) == 2):
+ clusterName = stdoutSplit[1].strip().rstrip()
+ # Get the id of the local cluster node so we can get the clusternode name
+ thisNodeID = ""
+ stdout = runCommandOutput("corosync-cmapctl", ["-g", "runtime.votequorum.this_node_id"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("=")
+ if (len(stdoutSplit) == 2):
+ thisNodeID = stdoutSplit[1].strip().rstrip()
+ # Now that we the nodeid then we can get the clusternode name.
+ if (len(thisNodeID) > 0):
+ stdout = runCommandOutput("corosync-quorumtool", ["-l"])
+ if (not stdout == None):
+ for line in stdout.split("\n"):
+ splitLine = line.split()
+ if (len(splitLine) == 4):
+ if (splitLine[0].strip().rstrip() == thisNodeID):
+ clusternodeName = splitLine[3]
+ break;
+ # If a clusternode name and cluster name was found then return a new object
+ # since this means this cluster is part of cluster.
+ if ((len(clusterName) > 0) and (len(clusternodeName) > 0)):
+ mapOfMountedFilesystemLabels = getLabelMapForMountedFilesystems(clusterName, getMountedGFS2Filesystems())
+ # These will be the GFS2 filesystems that will have their lockdump information gathered.
+ if (len(listOfGFS2Names) > 0):
+ for label in mapOfMountedFilesystemLabels.keys():
+ foundMatch = False
+ for name in listOfGFS2Names:
+ if ((name == label) or ("%s:%s"%(clusterName, name) == label)):
+ foundMatch = True
+ break
+ if ((not foundMatch) and (mapOfMountedFilesystemLabels.has_key(label))):
+ del(mapOfMountedFilesystemLabels[label])
+ return ClusterNode(clusternodeName, clusterName, mapOfMountedFilesystemLabels)
+ else:
+ return None
+
+def getMountedGFS2Filesystems():
+ """
+ This function returns a list of all the mounted GFS2 filesystems.
+
+ @return: Returns a list of all the mounted GFS2 filesystems.
+ @rtype: Array
+ """
+ fsType = "gfs2"
+ listOfMountedFilesystems = []
+ stdout = runCommandOutput("mount", ["-l"])
+ if (not stdout == None):
+ stdoutSplit = stdout.split("\n")
+ for line in stdoutSplit:
+ splitLine = line.split()
+ if (len(splitLine) >= 5):
+ if (splitLine[4] == fsType):
+ listOfMountedFilesystems.append(line)
+ return listOfMountedFilesystems
+
+def getLabelMapForMountedFilesystems(clusterName, listOfMountedFilesystems):
+ """
+ This function will return a dictionary of the mounted GFS2 filesystem that
+ contain a label that starts with the cluster name. For example:
+ {'f18cluster:mygfs2vol1': '/dev/vdb1 on /mnt/gfs2vol1 type gfs2 (rw,relatime) [f18cluster:mygfs2vol1]'}
+
+ @return: Returns a dictionary of the mounted GFS2 filesystems that contain a
+ label that starts with the cluster name.
+ @rtype: Dict
+
+ @param clusterName: The name of the cluster.
+ @type clusterName: String
+ @param listOfMountedFilesystems: A list of all the mounted GFS2 filesystems.
+ @type listOfMountedFilesystems: Array
+ """
+ mapOfMountedFilesystemLabels = {}
+ for mountedFilesystem in listOfMountedFilesystems:
+ splitMountedFilesystem = mountedFilesystem.split()
+ fsLabel = splitMountedFilesystem[-1].strip().strip("[").rstrip("]")
+ if (len(fsLabel) > 0):
+ # Verify it starts with name of the cluster.
+ if (fsLabel.startswith("%s:" %(clusterName))):
+ mapOfMountedFilesystemLabels[fsLabel] = mountedFilesystem
+ return mapOfMountedFilesystemLabels
+
+def verifyDebugFilesystemMounted(enableMounting=True):
+ """
+ This function verifies that the debug filesystem is mounted. If the debug
+ filesystem is mounted then True is returned, otherwise False is returned.
+
+ @return: If the debug filesystem is mounted then True is returned, otherwise
+ False is returned.
+ @rtype: Boolean
+
+ @param enableMounting: If True then the debug filesystem will be mounted if
+ it is currently not mounted.
+ @type enableMounting: Boolean
+ """
+ if (os.path.ismount(PATH_TO_DEBUG_DIR)):
+ message = "The debug filesystem %s is mounted." %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ return True
+ else:
+ message = "The debug filesystem %s is not mounted." %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).warning(message)
+ if (cmdLineOpts.enableMountDebugFS):
+ if(mountFilesystem("debugfs", "none", PATH_TO_DEBUG_DIR)):
+ message = "The debug filesystem was mounted: %s." %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ return True
+ return False
+
+def mountFilesystem(filesystemType, pathToDevice, pathToMountPoint):
+ """
+ This function will attempt to mount a filesystem. If the filesystem is
+ already mounted or the filesystem was successfully mounted then True is
+ returned, otherwise False is returned.
+
+ @return: If the filesystem is already mounted or the filesystem was
+ successfully mounted then True is returned, otherwise False is returned.
+ @rtype: Boolean
+
+ @param filesystemType: The type of filesystem that will be mounted.
+ @type filesystemType: String
+ @param pathToDevice: The path to the device that will be mounted.
+ @type pathToDevice: String
+ @param pathToMountPoint: The path to the directory that will be used as the
+ mount point for the device.
+ @type pathToMountPoint: String
+ """
+ if (os.path.ismount(PATH_TO_DEBUG_DIR)):
+ return True
+ listOfCommandOptions = ["-t", filesystemType, pathToDevice, pathToMountPoint]
+ if (not runCommand("mount", listOfCommandOptions)):
+ message = "There was an error mounting the filesystem type %s for the device %s to the mount point %s." %(filesystemType, pathToDevice, pathToMountPoint)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ return os.path.ismount(PATH_TO_DEBUG_DIR)
+
+def gatherGeneralInformation(pathToDSTDir):
+ """
+ This function will gather general information about the cluster and write
+ the results to a file. The following data will be captured: hostname, date,
+ uname -a, uptime, contents of /proc/mounts, and ps h -AL -o tid,s,cmd.
+
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ written to.
+ @type pathToDSTDir: String
+ """
+ # Gather some general information and write to system.txt.
+ systemString = "HOSTNAME: %s\nDATE: %s\n" %(platform.node(), time.strftime("%Y-%m-%d_%H:%M:%S"))
+ stdout = runCommandOutput("uname", ["-a"])
+ if (not stdout == None):
+ systemString += "UNAME-A: %s\n" %(stdout)
+ stdout = runCommandOutput("uptime", [])
+ if (not stdout == None):
+ systemString += "UPTIME: %s\n" %(stdout)
+ writeToFile(os.path.join(pathToDSTDir, "system.txt"), systemString, createFile=True)
+
+ # Get "mount -l" filesystem data.
+ command = "cat"
+ pathToCommandOutput = os.path.join(pathToDSTDir, "cat-proc_mounts.txt")
+ try:
+ fout = open(pathToCommandOutput, "w")
+ runCommand(command, ["/proc/mounts"], standardOut=fout)
+ fout.close()
+ except IOError:
+ message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+ # Get "ps -eo user,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,comm,wchan" data.
+ command = "ps"
+ pathToCommandOutput = os.path.join(pathToDSTDir, "ps.txt")
+ try:
+ fout = open(pathToCommandOutput, "w")
+ #runCommand(command, ["-eo", "user,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,comm,wchan"], standardOut=fout)
+ runCommand(command, ["h", "-AL", "-o", "tid,s,cmd"], standardOut=fout)
+ fout.close()
+ except IOError:
+ message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def triggerSysRQEvents():
+ """
+ This command will trigger sysrq events which will write the output to
+ /var/log/messages. The events that will be trigger are "m" and "t". The "m"
+ event will dump information about memory allocation. The "t" event will dump
+ all the threads state information.
+ """
+ command = "echo"
+ pathToSysrqTriggerFile = "/proc/sysrq-trigger"
+ # m - dump information about memory allocation
+ # t - dump thread state information
+ triggers = ["m", "t"]
+ for trigger in triggers:
+ try:
+ fout = open(pathToSysrqTriggerFile, "w")
+ runCommand(command, [trigger], standardOut=fout)
+ fout.close()
+ except IOError:
+ message = "There was an error the command output for %s to the file %s." %(command, pathToSysrqTriggerFile)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def gatherLogs(pathToDSTDir):
+ """
+ This function will copy all the cluster logs(/var/log/cluster) and the
+ system log(/var/log/messages) to the directory given by pathToDSTDir.
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ copied to.
+ @type pathToDSTDir: String
+ """
+ if (mkdirs(pathToDSTDir)):
+ # Copy messages logs that contain the sysrq data.
+ pathToLogFile = "/var/log/messages"
+ pathToDSTLogFile = os.path.join(pathToDSTDir, os.path.basename(pathToLogFile))
+ try:
+ shutil.copyfile(pathToLogFile, pathToDSTLogFile)
+ except shutil.Error:
+ message = "There was an error copying the file: %s to %s." %(pathToLogFile, pathToDSTLogFile)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+ pathToLogDir = "/var/log/cluster"
+ pathToDSTLogDir = os.path.join(pathToDSTDir, os.path.basename(pathToLogDir))
+ if (os.path.isdir(pathToLogDir)):
+ try:
+ shutil.copytree(pathToLogDir, pathToDSTLogDir)
+ except shutil.Error:
+ message = "There was an error copying the directory: %s to %s." %(pathToLogDir, pathToDSTLogDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def gatherDLMLockDumps(pathToDSTDir, listOfGFS2Filesystems):
+ """
+ This function copies the debug files for dlm for a GFS2 filesystem in the
+ list to a directory. The list of GFS2 filesystems will only include the
+ filesystem name for each item in the list. For example: "mygfs2vol1"
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ copied to.
+ @type pathToDSTDir: String
+ @param listOfGFS2Filesystems: This is the list of the GFS2 filesystems that
+ will have their debug directory copied.
+ @type listOfGFS2Filesystems: Array
+ """
+ lockDumpType = "dlm"
+ pathToSrcDir = os.path.join(PATH_TO_DEBUG_DIR, lockDumpType)
+ pathToOutputDir = os.path.join(pathToDSTDir, lockDumpType)
+ message = "Copying the files in the %s lockdump data directory %s for the selected GFS2 filesystem with dlm debug files." %(lockDumpType.upper(), pathToSrcDir)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ for filename in os.listdir(pathToSrcDir):
+ for name in listOfGFS2Filesystems:
+ if (filename.startswith(name)):
+ pathToCurrentFilename = os.path.join(pathToSrcDir, filename)
+ pathToDSTDir = os.path.join(pathToOutputDir, name)
+ mkdirs(pathToDSTDir)
+ pathToDSTFilename = os.path.join(pathToDSTDir, filename)
+ try:
+ shutil.copy(pathToCurrentFilename, pathToDSTFilename)
+ except shutil.Error:
+ message = "There was an error copying the file: %s to %s." %(pathToCurrentFilename, pathToDSTFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ except OSError:
+ message = "There was an error copying the file: %s to %s." %(pathToCurrentFilename, pathToDSTFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+def gatherGFS2LockDumps(pathToDSTDir, listOfGFS2Filesystems):
+ """
+ This function copies the debug directory for a GFS2 filesystems in the list
+ to a directory. The list of GFS2 filesystems will include the cluster name
+ and filesystem name for each item in the list. For example:
+ "f18cluster:mygfs2vol1"
+
+ @param pathToDSTDir: This is the path to directory where the files will be
+ copied to.
+ @type pathToDSTDir: String
+ @param listOfGFS2Filesystems: This is the list of the GFS2 filesystems that
+ will have their debug directory copied.
+ @type listOfGFS2Filesystems: Array
+ """
+ lockDumpType = "gfs2"
+ pathToSrcDir = os.path.join(PATH_TO_DEBUG_DIR, lockDumpType)
+ pathToOutputDir = os.path.join(pathToDSTDir, lockDumpType)
+ for dirName in os.listdir(pathToSrcDir):
+ pathToCurrentDir = os.path.join(pathToSrcDir, dirName)
+ if ((os.path.isdir(pathToCurrentDir)) and (dirName in listOfGFS2Filesystems)):
+ mkdirs(pathToOutputDir)
+ pathToDSTDir = os.path.join(pathToOutputDir, dirName)
+ try:
+ message = "Copying the lockdump data for the %s filesystem: %s" %(lockDumpType.upper(), dirName)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ shutil.copytree(pathToCurrentDir, pathToDSTDir)
+ except shutil.Error:
+ message = "There was an error copying the directory: %s to %s." %(pathToCurrentDir, pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ except OSError:
+ message = "There was an error copying the directory: %s to %s." %(pathToCurrentDir, pathToDSTDir)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+
+# ##############################################################################
+# Get user selected options
+# ##############################################################################
+def __getOptions(version) :
+ """
+ This function creates the OptionParser and returns commandline
+ a tuple of the selected commandline options and commandline args.
+
+ The cmdlineOpts which is the options user selected and cmdLineArgs
+ is value passed and not associated with an option.
+
+ @return: A tuple of the selected commandline options and commandline args.
+ @rtype: Tuple
+
+ @param version: The version of the this script.
+ @type version: String
+ """
+ cmdParser = OptionParserExtended(version)
+ cmdParser.add_option("-d", "--debug",
+ action="store_true",
+ dest="enableDebugLogging",
+ help="Enables debug logging.",
+ default=False)
+ cmdParser.add_option("-q", "--quiet",
+ action="store_true",
+ dest="disableLoggingToConsole",
+ help="Disables logging to console.",
+ default=False)
+ cmdParser.add_option("-i", "--info",
+ action="store_true",
+ dest="enablePrintInfo",
+ help="Prints to console some basic information about the GFS2 filesystems mounted on the cluster node.",
+ default=False)
+ cmdParser.add_option("-M", "--mount_debug_fs",
+ action="store_true",
+ dest="enableMountDebugFS",
+ help="Enables the mounting of the debug filesystem if it is not mounted. Default is disabled.",
+ default=False)
+ cmdParser.add_option("-o", "--path_to_output_dir",
+ action="store",
+ dest="pathToOutputDir",
+ help="The path to the output directory where all the collect data will be stored. Default is /tmp/<date>-<hostname>-%s" %(os.path.basename(sys.argv[0])),
+ type="string",
+ default="")
+ cmdParser.add_option("-r", "--num_of_runs",
+ action="store",
+ dest="numberOfRuns",
+ help="The number of lockdumps runs to do. Default is 2.",
+ type="int",
+ default=2)
+ cmdParser.add_option("-s", "--seconds_sleep",
+ action="store",
+ dest="secondsToSleep",
+ help="The number of seconds sleep between runs. Default is 120 seconds.",
+ type="int",
+ default=120)
+ cmdParser.add_option("-t", "--archive",
+ action="store_true",
+ dest="enableArchiveOutputDir",
+ help="Enables archiving and compressing of the output directory with tar and bzip2. Default is disabled.",
+ default=False)
+ cmdParser.add_option("-n", "--fs_name",
+ action="extend",
+ dest="listOfGFS2Names",
+ help="List of GFS2 filesystems that will have their lockdump data gathered.",
+ type="string",
+ default=[]) # Get the options and return the result.
+ (cmdLineOpts, cmdLineArgs) = cmdParser.parse_args()
+ return (cmdLineOpts, cmdLineArgs)
+
+# ##############################################################################
+# OptParse classes for commandline options
+# ##############################################################################
+class OptionParserExtended(OptionParser):
+ """
+ This is the class that gets the command line options the end user
+ selects.
+ """
+ def __init__(self, version) :
+ """
+ @param version: The version of the this script.
+ @type version: String
+ """
+ self.__commandName = os.path.basename(sys.argv[0])
+ versionMessage = "%s %s\n" %(self.__commandName, version)
+
+ commandDescription ="%s will capture information about lockdata data for GFS2 and DLM required to analyze a GFS2 filesystem.\n"%(self.__commandName)
+
+ OptionParser.__init__(self, option_class=ExtendOption,
+ version=versionMessage,
+ description=commandDescription)
+
+ def print_help(self):
+ """
+ Print examples at the bottom of the help message.
+ """
+ self.print_version()
+ examplesMessage = "\n"
+ examplesMessage = "\nPrints information about the available GFS2 filesystems that can have lockdump data captured."
+ examplesMessage += "\n$ %s -i\n" %(self.__commandName)
+ examplesMessage += "\nThis command will mount the debug directory if it is not mounted. It will do 3 runs of\n"
+ examplesMessage += "gathering the lockdump information in 10 second intervals for only the GFS2 filesystems\n"
+ examplesMessage += "with the names myGFS2vol2,myGFS2vol1. Then it will archive and compress the data collected."
+ examplesMessage += "\n$ %s -M -r 3 -s 10 -t -n myGFS2vol2,myGFS2vol1\n" %(self.__commandName)
+ OptionParser.print_help(self)
+ print examplesMessage
+
+class ExtendOption (Option):
+ """
+ Allow to specify comma delimited list of entries for arrays
+ and dictionaries.
+ """
+ ACTIONS = Option.ACTIONS + ("extend",)
+ STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",)
+ TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extend",)
+
+ def take_action(self, action, dest, opt, value, values, parser):
+ """
+ This function is a wrapper to take certain options passed on command
+ prompt and wrap them into an Array.
+
+ @param action: The type of action that will be taken. For example:
+ "store_true", "store_false", "extend".
+ @type action: String
+ @param dest: The name of the variable that will be used to store the
+ option.
+ @type dest: String/Boolean/Array
+ @param opt: The option string that triggered the action.
+ @type opt: String
+ @param value: The value of opt(option) if it takes a
+ value, if not then None.
+ @type value:
+ @param values: All the opt(options) in a dictionary.
+ @type values: Dictionary
+ @param parser: The option parser that was orginally called.
+ @type parser: OptionParser
+ """
+ if (action == "extend") :
+ valueList=[]
+ try:
+ for v in value.split(","):
+ # Need to add code for dealing with paths if there is option for paths.
+ valueList.append(v)
+ except:
+ pass
+ else:
+ values.ensure_value(dest, []).extend(valueList)
+ else:
+ Option.take_action(self, action, dest, opt, value, values, parser)
+
+# ###############################################################################
+# Main Function
+# ###############################################################################
+if __name__ == "__main__":
+ """
+ When the script is executed then this code is ran.
+ """
+ try:
+ # #######################################################################
+ # Get the options from the commandline.
+ # #######################################################################
+ (cmdLineOpts, cmdLineArgs) = __getOptions(VERSION_NUMBER)
+ # #######################################################################
+ # Setup the logger and create config directory
+ # #######################################################################
+ # Create the logger
+ logLevel = logging.INFO
+ logger = logging.getLogger(MAIN_LOGGER_NAME)
+ logger.setLevel(logLevel)
+ # Create a new status function and level.
+ logging.STATUS = logging.INFO + 2
+ logging.addLevelName(logging.STATUS, "STATUS")
+ # Create a function for the STATUS_LEVEL since not defined by python. This
+ # means you can call it like the other predefined message
+ # functions. Example: logging.getLogger("loggerName").status(message)
+ setattr(logger, "status", lambda *args: logger.log(logging.STATUS, *args))
+ streamHandler = logging.StreamHandler()
+ streamHandler.setLevel(logLevel)
+ streamHandler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
+ logger.addHandler(streamHandler)
+
+ # Set the handler for writing to log file.
+ pathToLogFile = "/tmp/%s.log" %(MAIN_LOGGER_NAME)
+ if (((os.access(pathToLogFile, os.W_OK) and os.access("/tmp", os.R_OK))) or (not os.path.exists(pathToLogFile))):
+ fileHandler = logging.FileHandler(pathToLogFile)
+ fileHandler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s", "%Y-%m-%d %H:%M:%S"))
+ logger.addHandler(fileHandler)
+ message = "A log file will be created or appened to: %s" %(pathToLogFile)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ else:
+ message = "There was permission problem accessing the write attributes for the log file: %s." %(pathToLogFile)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ # #######################################################################
+ # Set the logging levels.
+ # #######################################################################
+ if ((cmdLineOpts.enableDebugLogging) and (not cmdLineOpts.disableLoggingToConsole)):
+ logging.getLogger(MAIN_LOGGER_NAME).setLevel(logging.DEBUG)
+ streamHandler.setLevel(logging.DEBUG)
+ message = "Debugging has been enabled."
+ logging.getLogger(MAIN_LOGGER_NAME).debug(message)
+ if (cmdLineOpts.disableLoggingToConsole):
+ logging.disable(logging.CRITICAL)
+ # #######################################################################
+ # Check to see if pid file exists and error if it does.
+ # #######################################################################
+ if (os.path.exists(PATH_TO_PID_FILENAME)):
+ message = "The PID file %s already exists and this script cannot run till it does not exist." %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ message = "Verify that there are no other existing processes running. If there are running processes those need to be stopped first and the file removed."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ exitScript(removePidFile=False, errorCode=1)
+ else:
+ message = "Creating the pid file: %s" %(PATH_TO_PID_FILENAME)
+ logging.getLogger(MAIN_LOGGER_NAME).debug(message)
+ # Creata the pid file so we dont have more than 1 process of this
+ # script running.
+ writeToFile(PATH_TO_PID_FILENAME, str(os.getpid()), createFile=True)
+ # #######################################################################
+ # Get the clusternode name and verify that mounted GFS2 filesystems were
+ # found.
+ # #######################################################################
+ clusternode = getClusterNode(cmdLineOpts.listOfGFS2Names)
+ if (clusternode == None):
+ message = "The cluster or cluster node name could not be found."
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ exitScript(removePidFile=True, errorCode=1)
+ elif (not len(clusternode.getMountedGFS2FilesystemNames()) > 0):
+ message = "There were no mounted GFS2 filesystems found."
+ if (len(cmdLineOpts.listOfGFS2Names) > 0):
+ message = "There were no mounted GFS2 filesystems found with the name:"
+ for name in cmdLineOpts.listOfGFS2Names:
+ message += " %s" %(name)
+ message += "."
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ exitScript(removePidFile=True, errorCode=1)
+ if (cmdLineOpts.enablePrintInfo):
+ logging.disable(logging.CRITICAL)
+ print "List of all the mounted GFS2 filesystems that can have their lockdump data captured:"
+ print clusternode
+ exitScript()
+ # #######################################################################
+ # Create the output directory to verify it can be created before
+ # proceeding unless it is already created from a previous run data needs
+ # to be analyzed. Probably could add more debugging on if file or dir.
+ # #######################################################################
+ message = "The gathering of the lockdumps will be performed on the clusternode \"%s\" which is part of the cluster \"%s\"." %(clusternode.getClusterNodeName(), clusternode.getClusterName())
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ pathToOutputDir = cmdLineOpts.pathToOutputDir
+ if (not len(pathToOutputDir) > 0):
+ pathToOutputDir = "%s" %(os.path.join("/tmp", "%s-%s-%s" %(time.strftime("%Y-%m-%d_%H%M%S"), clusternode.getClusterNodeName(), os.path.basename(sys.argv[0]))))
+ # #######################################################################
+ # Backup any existing directory with same name as current output
+ # directory.
+ # #######################################################################
+ if (backupOutputDirectory(pathToOutputDir)):
+ message = "This directory that will be used to capture all the data: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ if (not mkdirs(pathToOutputDir)):
+ exitScript(errorCode=1)
+ else:
+ # There was an existing directory with same path as current output
+ # directory and it failed to back it up.
+ message = "Please change the output directory path (-o) or manual rename or remove the existing path: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ exitScript(errorCode=1)
+ # #######################################################################
+ # Check to see if the debug directory is mounted. If not then
+ # log an error.
+ # #######################################################################
+ result = verifyDebugFilesystemMounted(cmdLineOpts.enableMountDebugFS)
+ if (not result):
+ message = "Please mount the debug filesystem before running this script. For example: $ mount none -t debugfs %s" %(PATH_TO_DEBUG_DIR)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ exitScript(errorCode=1)
+
+ # #######################################################################
+ # Gather data and the lockdumps.
+ # #######################################################################
+ message = "The process of gathering all the required files will begin before capturing the lockdumps."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ for i in range(0,cmdLineOpts.numberOfRuns):
+ # The current log count that will start at 1 and not zero to make it
+ # make sense in logs.
+ currentLogRunCount = (i + 1)
+ # Add clusternode name under each run dir to make combining multple
+ # clusternode gfs2_lockgather data together and all data in each run directory.
+ pathToOutputRunDir = os.path.join(pathToOutputDir, "run%d/%s" %(i, clusternode.getClusterNodeName()))
+ if (not mkdirs(pathToOutputRunDir)):
+ exitScript(errorCode=1)
+ # Gather various bits of data from the clusternode.
+ message = "Gathering some general information about the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherGeneralInformation(pathToOutputRunDir)
+ # Trigger sysrq events to capture memory and thread information
+ message = "Triggering the sysrq events for the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ triggerSysRQEvents()
+ # Gather the dlm locks.
+ lockDumpType = "dlm"
+ message = "Gathering the %s lock dumps for clusternode %s for run %d/%d." %(lockDumpType.upper(), clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherDLMLockDumps(pathToOutputRunDir, clusternode.getMountedGFS2FilesystemNames(includeClusterName=False))
+ # Gather the glock locks from gfs2.
+ lockDumpType = "gfs2"
+ message = "Gathering the %s lock dumps for clusternode %s for run %d/%d." %(lockDumpType.upper(), clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherGFS2LockDumps(pathToOutputRunDir, clusternode.getMountedGFS2FilesystemNames())
+ # Gather log files
+ message = "Gathering the log files for the clusternode %s for run %d/%d." %(clusternode.getClusterNodeName(), currentLogRunCount, cmdLineOpts.numberOfRuns)
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ gatherLogs(os.path.join(pathToOutputRunDir, "logs"))
+ # Sleep between each run if secondsToSleep is greater than or equal
+ # to 0 and current run is not the last run.
+ if ((cmdLineOpts.secondsToSleep >= 0) and (i < (cmdLineOpts.numberOfRuns - 1))):
+ message = "The script will sleep for %d seconds between each run of capturing the lockdumps." %(cmdLineOpts.secondsToSleep)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ message = "The script is sleeping before beginning the next run."
+ logging.getLogger(MAIN_LOGGER_NAME).status(message)
+ time.sleep(cmdLineOpts.secondsToSleep)
+ # #######################################################################
+ # Archive the directory that contains all the data and archive it after
+ # all the information has been gathered.
+ # #######################################################################
+ message = "All the files have been gathered and this directory contains all the captured data: %s" %(pathToOutputDir)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ if (cmdLineOpts.enableArchiveOutputDir):
+ message = "The lockdump data will now be archived. This could some time depending on the size of the data collected."
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ pathToTarFilename = archiveData(pathToOutputDir)
+ if (os.path.exists(pathToTarFilename)):
+ message = "The compressed archvied file was created: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).info(message)
+ else:
+ message = "The compressed archvied failed to be created: %s" %(pathToTarFilename)
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ # #######################################################################
+ except KeyboardInterrupt:
+ print ""
+ message = "This script will exit since control-c was executed by end user."
+ logging.getLogger(MAIN_LOGGER_NAME).error(message)
+ exitScript(errorCode=1)
+ # #######################################################################
+ # Exit the application with zero exit code since we cleanly exited.
+ # #######################################################################
+ exitScript()
11 years, 5 months
gfs2-utils: master - gfs2-utils: Update .gitignore
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=64c034a8...
Commit: 64c034a88c2ad84aaef179d6b8de9941ceb49759
Parent: be4c96088702582b49f9d0c28404606eee5bd055
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Sat Nov 10 22:53:22 2012 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Sat Nov 10 22:53:22 2012 +0000
gfs2-utils: Update .gitignore
Update .gitignore to list gfs2l and remove listings for utils which have
been removed.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
.gitignore | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4e3071a..0627928 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,15 +32,13 @@ cscope.out
*.lo
gfs2/convert/gfs2_convert
gfs2/edit/gfs2_edit
+gfs2/libgfs2/gfs2l
gfs2/libgfs2/parser.c
gfs2/libgfs2/parser.h
gfs2/libgfs2/lexer.c
gfs2/libgfs2/lexer.h
gfs2/fsck/fsck.gfs2
gfs2/mkfs/mkfs.gfs2
-gfs2/mount/mount.gfs2
-gfs2/quota/gfs2_quota
-gfs2/tool/gfs2_tool
gfs2/tune/tunegfs2
group/gfs_control/gfs_control
group/gfs_controld/gfs_controld
11 years, 5 months