gfs2-utils: master - gfs2_convert: Fix conversion of gfs1 CDPNs
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: 56b6aa902c70fcdc78edf58352d850f62f1e67be
Parent: e28e009ef8f86b7f02ed2c4a16e7a836679d9a8e
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Wed Apr 7 12:02:06 2010 -0500
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Tue Apr 20 10:36:45 2010 -0500
gfs2_convert: Fix conversion of gfs1 CDPNs
GFS2 does not support Context Dependent PathNames,
so we need a way to properly convert cdpns in gfs1
to gfs2. With this patch, we replace symlinks that
point to cdpns with empty directories and adjust
the dirents in the parent directories to reflect
this.
Resolves: rhbz#579625
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 224 +++++++++++++++++++++++++++++++++++++------
1 files changed, 193 insertions(+), 31 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index c64657b..324342d 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <time.h>
#include <sys/time.h>
+#include <errno.h>
#include <linux/types.h>
#include <linux/gfs2_ondisk.h>
@@ -114,6 +115,12 @@ struct gfs1_sb {
char sb_reserved[96];
};
+struct inode_dir_block {
+ osi_list_t list;
+ uint64_t di_addr;
+ uint64_t di_paddr; /* Parent dir inode addr */
+};
+
struct inode_block {
osi_list_t list;
uint64_t di_addr;
@@ -131,9 +138,11 @@ struct gfs1_sb raw_gfs1_ondisk_sb;
struct gfs2_sbd sb2;
char device[256];
struct inode_block dirs_to_fix; /* linked list of directories to fix */
+struct inode_dir_block cdpns_to_fix; /* linked list of cdpn symlinks */
int seconds;
struct timeval tv;
uint64_t dirs_fixed;
+uint64_t cdpns_fixed;
uint64_t dirents_fixed;
struct gfs1_jindex *sd_jindex = NULL; /* gfs1 journal index in memory */
int gfs2_inptrs;
@@ -896,6 +905,42 @@ out:
return error;
}
+const char *cdpn[14] = {"{hostname}", "{mach}", "{os}", "{uid}", "{gid}", "{sys}", "{jid}",
+ "@hostname", "@mach", "@os", "@uid", "@gid", "@sys", "@jid"};
+static int has_cdpn(const char *str)
+{
+ int i;
+ for (i=0; i<14; i++)
+ if (strstr(str, cdpn[i]) != NULL)
+ return 1;
+ return 0;
+}
+
+static int fix_cdpn_symlink(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh, struct gfs2_inode *ip)
+{
+ int ret = 0;
+ char *linkptr = NULL;
+
+ if (ip->i_di.di_height != 0)
+ return 0;
+
+ linkptr = bh->b_data + sizeof(struct gfs_dinode);
+ if (has_cdpn(linkptr)) {
+ struct inode_dir_block *fix;
+ /* Save the symlink di_addr. We'll find the parent di_addr later */
+ fix = malloc(sizeof(struct inode_dir_block));
+ if (!fix) {
+ log_crit("Error: out of memory.\n");
+ return -1;
+ }
+ memset(fix, 0, sizeof(struct inode_dir_block));
+ fix->di_addr = ip->i_di.di_num.no_addr;
+ osi_list_add_prev((osi_list_t *)&fix->list,
+ (osi_list_t *)&cdpns_to_fix);
+ }
+
+ return ret;
+}
/* ------------------------------------------------------------------------- */
/* adjust_inode - change an inode from gfs1 to gfs2 */
/* */
@@ -981,6 +1026,12 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh)
ret = adjust_indirect_blocks(sbp, inode);
if (ret)
return -1;
+ /* Check for cdpns */
+ if (inode->i_di.di_mode & S_IFLNK) {
+ ret = fix_cdpn_symlink(sbp, bh, inode);
+ if (ret)
+ return -1;
+ }
}
bmodified(inode->i_bh);
@@ -997,7 +1048,7 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh)
/* */
/* Returns: 0 on success, -1 on failure */
/* ------------------------------------------------------------------------- */
-static int inode_renumber(struct gfs2_sbd *sbp, uint64_t root_inode_addr)
+static int inode_renumber(struct gfs2_sbd *sbp, uint64_t root_inode_addr, osi_list_t *cdpn_to_fix)
{
struct rgrp_list *rgd;
osi_list_t *tmp;
@@ -1085,13 +1136,16 @@ static int inode_renumber(struct gfs2_sbd *sbp, uint64_t root_inode_addr)
/* fetch_inum - fetch an inum entry from disk, given its block */
/* ------------------------------------------------------------------------- */
static int fetch_inum(struct gfs2_sbd *sbp, uint64_t iblock,
- struct gfs2_inum *inum)
+ struct gfs2_inum *inum, uint64_t *eablk)
{
struct gfs2_inode *fix_inode;
fix_inode = inode_read(sbp, iblock);
inum->no_formal_ino = fix_inode->i_di.di_num.no_formal_ino;
inum->no_addr = fix_inode->i_di.di_num.no_addr;
+ if (eablk)
+ *eablk = fix_inode->i_di.di_eattr;
+
inode_put(&fix_inode);
return 0;
}/* fetch_inum */
@@ -1102,12 +1156,12 @@ static int fetch_inum(struct gfs2_sbd *sbp, uint64_t iblock,
/* We changed inode numbers, so we must update that number into the */
/* directory entries themselves. */
/* */
-/* Returns: 0 on success, -1 on failure */
+/* Returns: 0 on success, -1 on failure, -EISDIR when dentmod marked DT_DIR */
/* ------------------------------------------------------------------------- */
static int process_dirent_info(struct gfs2_inode *dip, struct gfs2_sbd *sbp,
- struct gfs2_buffer_head *bh, int dir_entries)
+ struct gfs2_buffer_head *bh, int dir_entries, uint64_t dentmod)
{
- int error;
+ int error = 0;
struct gfs2_dirent *dent;
int de; /* directory entry index */
@@ -1116,12 +1170,23 @@ static int process_dirent_info(struct gfs2_inode *dip, struct gfs2_sbd *sbp,
log_crit("Error retrieving directory.\n");
return -1;
}
+ error = 0;
/* Go through every dirent in the buffer and process it. */
/* Turns out you can't trust dir_entries is correct. */
for (de = 0; ; de++) {
struct gfs2_inum inum;
int dent_was_gfs1;
-
+
+ if (dentmod) {
+ if (dent->de_type == cpu_to_be16(DT_LNK)
+ && cpu_to_be64(dent->de_inum.no_addr) == dentmod) {
+ dent->de_type = cpu_to_be16(DT_DIR);
+ error = -EISDIR;
+ break;
+ }
+ goto skip_next;
+ }
+
gettimeofday(&tv, NULL);
/* Do more warm fuzzy stuff for the customer. */
dirents_fixed++;
@@ -1135,7 +1200,7 @@ static int process_dirent_info(struct gfs2_inode *dip, struct gfs2_sbd *sbp,
gfs2_inum_in(&inum, (char *)&dent->de_inum);
dent_was_gfs1 = (dent->de_inum.no_addr == dent->de_inum.no_formal_ino);
if (inum.no_formal_ino) { /* if not a sentinel (placeholder) */
- error = fetch_inum(sbp, inum.no_addr, &inum);
+ error = fetch_inum(sbp, inum.no_addr, &inum, NULL);
if (error) {
log_crit("Error retrieving inode 0x%llx\n",
(unsigned long long)inum.no_addr);
@@ -1179,11 +1244,30 @@ static int process_dirent_info(struct gfs2_inode *dip, struct gfs2_sbd *sbp,
break;
}
}
+ /*
+ * Compare this dirent address with every one in the
+ * cdpns_to_fix list to find if this directory (dip) is
+ * a cdpn symlink's parent. If so add it to the list element
+ */
+ if (dent->de_type == cpu_to_be16(DT_LNK)) {
+ osi_list_t *tmp;
+ struct inode_dir_block *fix;
+ osi_list_foreach(tmp, &cdpns_to_fix.list) {
+ fix = osi_list_entry(tmp, struct inode_dir_block, list);
+ if (fix->di_addr == inum.no_addr)
+ fix->di_paddr = dip->i_di.di_num.no_addr;
+ }
+ }
+
+ skip_next:
error = gfs2_dirent_next(dip, bh, &dent);
- if (error)
+ if (error) {
+ if (error == -ENOENT) /* beyond the end of this bh */
+ error = 0;
break;
+ }
} /* for every directory entry */
- return 0;
+ return error;
}/* process_dirent_info */
/* ------------------------------------------------------------------------- */
@@ -1194,7 +1278,7 @@ static int process_dirent_info(struct gfs2_inode *dip, struct gfs2_sbd *sbp,
/* */
/* Returns: 0 on success, -1 on failure */
/* ------------------------------------------------------------------------- */
-static int fix_one_directory_exhash(struct gfs2_sbd *sbp, struct gfs2_inode *dip)
+static int fix_one_directory_exhash(struct gfs2_sbd *sbp, struct gfs2_inode *dip, uint64_t dentmod)
{
struct gfs2_buffer_head *bh_leaf;
int error;
@@ -1230,13 +1314,40 @@ static int fix_one_directory_exhash(struct gfs2_sbd *sbp, struct gfs2_inode *dip
break;
}
gfs2_leaf_in(&leaf, bh_leaf); /* buffer to structure */
- error = process_dirent_info(dip, sbp, bh_leaf, leaf.lf_entries);
+ error = process_dirent_info(dip, sbp, bh_leaf, leaf.lf_entries, dentmod);
bmodified(bh_leaf);
brelse(bh_leaf);
+ if (dentmod && error == -EISDIR) /* dentmod was marked DT_DIR, break out */
+ break;
} /* for leaf_num */
return 0;
}/* fix_one_directory_exhash */
+static int process_directory(struct gfs2_sbd *sbp, uint64_t dirblock, uint64_t dentmod)
+{
+ struct gfs2_inode *dip;
+ int error = 0;
+ /* read in the directory inode */
+ dip = inode_read(sbp, dirblock);
+ /* fix the directory: either exhash (leaves) or linear (stuffed) */
+ if (dip->i_di.di_flags & GFS2_DIF_EXHASH) {
+ if (fix_one_directory_exhash(sbp, dip, dentmod)) {
+ log_crit("Error fixing exhash directory.\n");
+ inode_put(&dip);
+ return -1;
+ }
+ } else {
+ error = process_dirent_info(dip, sbp, dip->i_bh, dip->i_di.di_entries, dentmod);
+ if (error && error != -EISDIR) {
+ log_crit("Error fixing linear directory.\n");
+ inode_put(&dip);
+ return -1;
+ }
+ }
+ bmodified(dip->i_bh);
+ inode_put(&dip);
+ return 0;
+}
/* ------------------------------------------------------------------------- */
/* fix_directory_info - sync new inode numbers with directory info */
/* Returns: 0 on success, -1 on failure */
@@ -1246,7 +1357,6 @@ static int fix_directory_info(struct gfs2_sbd *sbp, osi_list_t *dir_to_fix)
osi_list_t *tmp, *fix;
struct inode_block *dir_iblk;
uint64_t offset, dirblock;
- struct gfs2_inode *dip;
dirs_fixed = 0;
dirents_fixed = 0;
@@ -1267,25 +1377,10 @@ static int fix_directory_info(struct gfs2_sbd *sbp, osi_list_t *dir_to_fix)
/* figure out the directory inode block and read it in */
dir_iblk = (struct inode_block *)fix;
dirblock = dir_iblk->di_addr; /* addr of dir inode */
- /* read in the directory inode */
- dip = inode_read(sbp, dirblock);
- /* fix the directory: either exhash (leaves) or linear (stuffed) */
- if (dip->i_di.di_flags & GFS2_DIF_EXHASH) {
- if (fix_one_directory_exhash(sbp, dip)) {
- log_crit("Error fixing exhash directory.\n");
- inode_put(&dip);
- return -1;
- }
- }
- else {
- if (process_dirent_info(dip, sbp, dip->i_bh,
- dip->i_di.di_entries)) {
- log_crit("Error fixing linear directory.\n");
- inode_put(&dip);
- return -1;
- }
+ if (process_directory(sbp, dirblock, 0)) {
+ log_crit("Error processing directory\n");
+ return -1;
}
- inode_put(&dip);
}
/* Free the last entry in memory: */
if (tmp) {
@@ -1296,6 +1391,60 @@ static int fix_directory_info(struct gfs2_sbd *sbp, osi_list_t *dir_to_fix)
}/* fix_directory_info */
/* ------------------------------------------------------------------------- */
+/* fix_cdpn_symlinks - convert cdpn symlinks to empty directories */
+/* Returns: 0 on success, -1 on failure */
+/* ------------------------------------------------------------------------- */
+static int fix_cdpn_symlinks(struct gfs2_sbd *sbp, osi_list_t *cdpn_to_fix)
+{
+ osi_list_t *tmp, *x;
+ int error = 0;
+
+ cdpns_fixed = 0;
+ osi_list_foreach_safe(tmp, cdpn_to_fix, x) {
+ struct gfs2_inum fix, dir;
+ struct inode_dir_block *l_fix;
+ struct gfs2_buffer_head *bh;
+ struct gfs2_inode *fix_inode;
+ uint64_t eablk;
+
+ l_fix = osi_list_entry(tmp, struct inode_dir_block, list);
+ osi_list_del(tmp);
+
+ /* convert symlink to empty dir */
+ error = fetch_inum(sbp, l_fix->di_addr, &fix, &eablk);
+ if (error) {
+ log_crit("Error retrieving inode at block %llx\n",
+ (unsigned long long)l_fix->di_addr);
+ break;
+ }
+ error = fetch_inum(sbp, l_fix->di_paddr, &dir, NULL);
+ if (error) {
+ log_crit("Error retrieving inode at block %llx\n",
+ (unsigned long long)l_fix->di_paddr);
+ break;
+ }
+
+ /* initialize the symlink inode to be a directory */
+ bh = init_dinode(sbp, &fix, S_IFDIR | 0755, 0, &dir);
+ fix_inode = inode_get(sbp, bh);
+ fix_inode->i_di.di_eattr = eablk; /*fix extended attribute */
+ inode_put(&fix_inode);
+ bmodified(bh);
+ brelse(bh);
+
+ /* fix the parent directory dirent entry for this inode */
+ error = process_directory(sbp, l_fix->di_paddr, l_fix->di_addr);
+ if (error) {
+ log_crit("Error trying to fix cdpn dentry\n");
+ break;
+ }
+ free(l_fix);
+ cdpns_fixed++;
+ }
+ return error;
+} /* fix_cdpn_symlinks */
+
+/* ------------------------------------------------------------------------- */
/* Fetch gfs1 jindex structure from buffer */
/* ------------------------------------------------------------------------- */
static void gfs1_jindex_in(struct gfs1_jindex *jindex, char *buf)
@@ -1393,6 +1542,7 @@ static int init(struct gfs2_sbd *sbp)
sbp->sd_sb.sb_header.mh_format = GFS2_FORMAT_SB;
osi_list_init((osi_list_t *)&dirs_to_fix);
+ osi_list_init((osi_list_t *)&cdpns_to_fix);
/* ---------------------------------------------- */
/* Initialize lists and read in the superblock. */
/* ---------------------------------------------- */
@@ -1957,7 +2107,8 @@ int main(int argc, char **argv)
/* Renumber the inodes consecutively. */
/* ---------------------------------------------- */
if (!error) {
- error = inode_renumber(&sb2, sb2.sd_sb.sb_root_dir.no_addr);
+ error = inode_renumber(&sb2, sb2.sd_sb.sb_root_dir.no_addr,
+ (osi_list_t *)&cdpns_to_fix);
if (error)
log_crit("\n%s: Error renumbering inodes.\n", device);
fsync(sb2.device_fd); /* write the buffers to disk */
@@ -1974,6 +2125,17 @@ int main(int argc, char **argv)
log_crit("\n%s: Error fixing directories.\n", device);
}
/* ---------------------------------------------- */
+ /* Convert cdpn symlinks to empty dirs */
+ /* ---------------------------------------------- */
+ if (!error) {
+ error = fix_cdpn_symlinks(&sb2, (osi_list_t *)&cdpns_to_fix);
+ log_notice("\r%" PRIu64 " cdpn symlinks moved to empty directories.",
+ cdpns_fixed);
+ fflush(stdout);
+ if (error)
+ log_crit("\n%s: Error fixing cdpn symlinks.\n", device);
+ }
+ /* ---------------------------------------------- */
/* Convert journal space to rg space */
/* ---------------------------------------------- */
if (!error) {
14 years
gfs2-utils: master - gfs2_convert: gfs2_convert uses too much memory for jdata conversion
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: e28e009ef8f86b7f02ed2c4a16e7a836679d9a8e
Parent: e41bb86156dad9a8335634494fa1d902f7eaa6f5
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Wed Apr 7 11:57:32 2010 -0500
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Tue Apr 20 10:35:49 2010 -0500
gfs2_convert: gfs2_convert uses too much memory for jdata conversion
Moved some code around so that the data blocks of the
jdata file are not mapped into buffers in advance.
Instead, only indirect blocks one level below are mapped.
The data blocks are then mapped one-by-one while they're
copied onto the new converted jdata file.
Resolves: rhbz#579623
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 98 +++++++++++++++++++++++++++++-------------
gfs2/libgfs2/fs_ops.c | 1 +
2 files changed, 68 insertions(+), 31 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index f128efb..c64657b 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -317,8 +317,7 @@ static void fix_metatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
bh = ip->i_bh;
/* First, build up the metatree */
for (h = 0; h < blk->height; h++) {
- lookup_block(ip, ip->i_bh, h, &blk->mp, 1, &new,
- &block);
+ lookup_block(ip, bh, h, &blk->mp, 1, &new, &block);
if (bh != ip->i_bh)
brelse(bh);
if (!block)
@@ -649,8 +648,7 @@ static void fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
bh = ip->i_bh;
/* First, build up the metatree */
for (h = 0; h < blk->height; h++) {
- lookup_block(ip, ip->i_bh, h, &blk->mp, 1, &new,
- &block);
+ lookup_block(ip, bh, h, &blk->mp, 1, &new, &block);
if (bh != ip->i_bh)
brelse(bh);
if (!block)
@@ -743,16 +741,14 @@ static int adjust_jdata_inode(struct gfs2_sbd *sbp, struct gfs2_inode *ip)
sbp->bsize - sizeof(struct gfs_dinode));
osi_list_add_prev(&blk->list, &blocks.list);
- /* Now run the metadata chain and build lists of all data/metadata blocks */
+ /* Now run the metadata chain and build lists of all metadata blocks */
osi_list_foreach(tmp, &blocks.list) {
blk = osi_list_entry(tmp, struct blocklist, list);
- if (blk->height >= ip->i_di.di_height)
+ if (blk->height >= ip->i_di.di_height - 1)
continue;
-
header_size = (blk->height > 0 ? sizeof(struct gfs_indirect) :
sizeof(struct gfs_dinode));
-
for (ptr1 = (uint64_t *)blk->ptrbuf, ptrnum = 0;
ptrnum < sbp->sd_inptrs; ptr1++, ptrnum++) {
if (!*ptr1)
@@ -785,23 +781,13 @@ static int adjust_jdata_inode(struct gfs2_sbd *sbp, struct gfs2_inode *ip)
/* Queue it to be processed later on in the loop. */
osi_list_add_prev(&newblk->list, &blocks.list);
+ /* read the new metadata block's pointers */
bh = bread(sbp, block);
- if (newblk->height == ip->i_di.di_height) {
- /* read in the jdata block */
- memcpy(newblk->ptrbuf, bh->b_data +
- sizeof(struct gfs2_meta_header), bufsize);
- /* Zero the buffer so we can fill it in later */
- memset(bh->b_data + sizeof(struct gfs2_meta_header), 0,
- bufsize);
- } else {
- /* read the new metadata block's pointers */
- memcpy(newblk->ptrbuf, bh->b_data +
- sizeof(struct gfs_indirect),
- sbp->bsize - sizeof(struct gfs_indirect));
- /* Zero the buffer so we can fill it in later */
- memset(bh->b_data + sizeof(struct gfs_indirect), 0,
- sbp->bsize - sizeof(struct gfs_indirect));
- }
+ memcpy(newblk->ptrbuf, bh->b_data + sizeof(struct gfs_indirect),
+ sbp->bsize - sizeof(struct gfs_indirect));
+ /* Zero the buffer so we can fill it in later */
+ memset(bh->b_data + sizeof(struct gfs_indirect), 0,
+ sbp->bsize - sizeof(struct gfs_indirect));
bmodified(bh);
brelse(bh);
/* Free the block so we can reuse it. This allows us to
@@ -827,18 +813,68 @@ static int adjust_jdata_inode(struct gfs2_sbd *sbp, struct gfs2_inode *ip)
blk = osi_list_entry(tmp, struct blocklist, list);
/* If it's not a data block at the highest level */
- if (blk->height != di_height) {
+ if (blk->height != di_height - 1) {
osi_list_del(tmp);
free(blk->ptrbuf);
free(blk);
continue;
}
- len = bufsize;
- jdata_mp_gfs1_to_gfs2(sbp, di_height, gfs2_hgt, &blk->mp, &gfs2mp, &len, dinode_size);
- memcpy(&blk->mp, &gfs2mp, sizeof(struct metapath));
- blk->height -= di_height - gfs2_hgt;
- if (len)
- fix_jdatatree(sbp, ip, blk, blk->ptrbuf, len);
+ /*
+ * For each metadata block that holds jdata block pointers,
+ * get the blk pointers and copy them block by block
+ */
+ for (ptr1 = (uint64_t *) blk->ptrbuf, ptrnum = 0;
+ ptrnum < sbp->sd_inptrs; ptr1++, ptrnum++) {
+ if (!*ptr1)
+ continue;
+ block = be64_to_cpu(*ptr1);
+
+ newblk = malloc(sizeof(struct blocklist));
+ if (!newblk) {
+ log_crit("Error: Can't allocate memory"
+ " for indirect block fix.\n");
+ error = -1;
+ goto out;
+ }
+ memset(newblk, 0, sizeof(*newblk));
+ newblk->ptrbuf = malloc(bufsize);
+ if (!newblk->ptrbuf) {
+ log_crit("Error: Can't allocate memory"
+ " for file conversion.\n");
+ free(newblk);
+ goto out;
+ }
+ memset(newblk->ptrbuf, 0, bufsize);
+ newblk->block = block;
+ newblk->height = blk->height + 1;
+ /* Build the metapointer list from our predecessors */
+ for (h=0; h < blk->height; h++)
+ newblk->mp.mp_list[h] = blk->mp.mp_list[h];
+ newblk->mp.mp_list[h] = ptrnum;
+ bh = bread(sbp, block);
+ /* This is a data block. i.e newblk->height == ip->i_di.di_height */
+ /* read in the jdata block */
+ memcpy(newblk->ptrbuf, bh->b_data +
+ sizeof(struct gfs2_meta_header), bufsize);
+ memset(bh->b_data + sizeof(struct gfs2_meta_header), 0,
+ bufsize);
+ bmodified(bh);
+ brelse(bh);
+ /* Free the block so we can reuse it. This allows us to
+ convert a "full" file system */
+ ip->i_di.di_blocks--;
+ gfs2_free_block(sbp, block);
+
+ len = bufsize;
+ jdata_mp_gfs1_to_gfs2(sbp, di_height, gfs2_hgt, &newblk->mp, &gfs2mp,
+ &len, dinode_size);
+ memcpy(&newblk->mp, &gfs2mp, sizeof(struct metapath));
+ newblk->height -= di_height - gfs2_hgt;
+ if (len)
+ fix_jdatatree(sbp, ip, newblk, newblk->ptrbuf, len);
+ free(newblk->ptrbuf);
+ free(newblk);
+ }
osi_list_del(tmp);
free(blk->ptrbuf);
free(blk);
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index 4c67983..633eb5a 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -936,6 +936,7 @@ static void dir_split_leaf(struct gfs2_inode *dip, uint32_t lindex,
dip->i_di.di_blocks++;
bmodified(dip->i_bh);
+ bmodified(obh); /* Need to do this in case nothing was moved */
brelse(obh);
bmodified(nbh);
brelse(nbh);
14 years
gfs2-utils: master - gfs2_convert: gfs2_convert segfaults when converting filesystems of blocksize 512 bytes
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: e41bb86156dad9a8335634494fa1d902f7eaa6f5
Parent: 3f5709b2167d405435730ae9103f48116cc2c9a2
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Wed Apr 7 11:51:47 2010 -0500
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Tue Apr 20 10:35:30 2010 -0500
gfs2_convert: gfs2_convert segfaults when converting filesystems of blocksize 512 bytes
gfs2_convert segfaults when the jindex inode is unstuffed.
i.e. if the block size is small enough such that the jindex
entries (directly proportional to the number of journals)
don't fit in the disk inode block, the jindex inode is
unstuffed. This is a journaled data file and the structures
are different for such files in gfs1 and gfs2 with respect
to metaheaders. gfs2_convert needs to trick the file
reading code in libgfs2 to think it's dealing with a gfs2
directory (whose structure is similar to a gfs1 jdata inode)
to operate on the file at the right offsets.
Resolves: rhbz#579621
Signed-off-by: adas(a)redhat.com
---
gfs2/convert/gfs2_convert.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index e28b8e7..f128efb 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1281,6 +1281,7 @@ static int read_gfs1_jiindex(struct gfs2_sbd *sdp)
char buf[sizeof(struct gfs1_jindex)];
unsigned int j;
int error=0;
+ unsigned int tmp_mode = 0;
if(ip->i_di.di_size % sizeof(struct gfs1_jindex) != 0){
log_crit("The size reported in the journal index"
@@ -1296,6 +1297,14 @@ static int read_gfs1_jiindex(struct gfs2_sbd *sdp)
log_crit("Unable to zero journal index\n");
return -1;
}
+ /* ugly hack
+ * Faking the gfs1_jindex inode as a directory to gfs2_readi
+ * so it skips the metaheader struct in the data blocks
+ * in the inode. gfs2_jindex inode doesn't have metaheaders
+ * in the data blocks */
+ tmp_mode = ip->i_di.di_mode;
+ ip->i_di.di_mode &= ~S_IFMT;
+ ip->i_di.di_mode |= S_IFDIR;
for (j = 0; ; j++) {
struct gfs1_jindex *journ;
@@ -1312,6 +1321,7 @@ static int read_gfs1_jiindex(struct gfs2_sbd *sdp)
gfs1_jindex_in(journ, buf);
sdp->jsize = (journ->ji_nsegment * 16 * sdp->bsize) >> 20;
}
+ ip->i_di.di_mode = tmp_mode;
if(j * sizeof(struct gfs1_jindex) != ip->i_di.di_size){
log_crit("journal inode size invalid\n");
goto fail;
14 years
gfs2-utils: master - gfs2_convert: Does not convert full gfs1 filesystems
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: 3f5709b2167d405435730ae9103f48116cc2c9a2
Parent: 8eea6115a16de81ba457ae16b28b3ac49bfad08e
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Mon Apr 19 16:32:08 2010 -0500
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Tue Apr 20 09:25:41 2010 -0500
gfs2_convert: Does not convert full gfs1 filesystems
We now check to see if the number of blocks we intend
to allocate while creating GFS2 file system structures
are less than the available free blocks. If not enough
blocks are available, we reduce the journal size (1MB
at a time) until we can fit everything in.
Resolves: rhbz#581047
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 106 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 106 insertions(+), 0 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 97d00cb..e28b8e7 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -61,6 +61,8 @@
#define GFS_FORMAT_FS (1309) /* Filesystem (all-encompassing) */
#define GFS_FORMAT_MULTI (1401) /* Multi-Host */
+#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
+
struct gfs1_rgrp {
struct gfs2_meta_header rg_header; /* hasn't changed from gfs1 to 2 */
uint32_t rg_flags;
@@ -1770,6 +1772,100 @@ static void conv_build_jindex(struct gfs2_sbd *sdp)
inode_put(&sdp->md.jiinode);
}
+static unsigned int total_file_blocks(struct gfs2_sbd *sdp,
+ uint64_t filesize, int journaled)
+{
+ unsigned int data_blks = 0, meta_blks = 0, total_blks;
+ unsigned int max, height, bsize;
+ uint64_t *arr;
+
+ /* Now find the total meta blocks required for data_blks */
+ if (filesize <= sdp->bsize - sizeof(struct gfs2_dinode)) {
+ total_blks = 1; /* stuffed inode */
+ goto out;
+ }
+
+ if (journaled) {
+ arr = sdp->sd_jheightsize;
+ max = sdp->sd_max_jheight;
+ bsize = sdp->sd_jbsize;
+ } else {
+ arr = sdp->sd_heightsize;
+ max = sdp->sd_max_height;
+ bsize = sdp->bsize;
+ }
+ data_blks = DIV_RU(filesize, bsize); /* total data blocks reqd */
+
+ for (height = 0; height < max; height++)
+ if (arr[height] >= filesize)
+ break;
+ if (height == 1) {
+ total_blks = data_blks + 1; /* dinode has direct ptrs to data blocks */
+ goto out;
+ }
+
+ meta_blks = DIV_RU(data_blks, sdp->sd_inptrs);
+ total_blks = data_blks + meta_blks;
+out:
+ return data_blks + meta_blks;
+}
+
+/* We check if the GFS2 filesystem files/structures created after the call to
+ * check_fit() in main() will fit in the currently available free blocks
+ */
+static int check_fit(struct gfs2_sbd *sdp)
+{
+ unsigned int blks_need = 0, blks_avail = sdp->blks_total - sdp->blks_alloced;
+
+ /* build_master() */
+ blks_need++; /*creation of master dir inode - 1 block */
+
+ /* conv_build_jindex() */
+ {
+ blks_need++; /* creation of 'jindex' disk inode */
+ /* creation of journals */
+ blks_need += sdp->md.journals *
+ total_file_blocks(sdp, sdp->jsize << 20, 1);
+ }
+ /* build_per_node() */
+ {
+ blks_need++; /* creation of 'per_node' dir inode */
+ /* njourn x (inum_range + statfs_change + quota_change inodes) */
+ blks_need += sdp->md.journals * 3;
+ /* quota change inodes are prealloced */
+ blks_need += sdp->md.journals *
+ total_file_blocks(sdp, sdp->qcsize << 20, 1);
+ }
+ /* build_inum() */
+ blks_need++; /* creation of 'inum' disk inode */
+
+ /* build_statfs() */
+ blks_need++; /* creation of 'statfs' disk inode */
+
+ /* build_rindex() */
+ {
+ osi_list_t *tmp, *head;
+ unsigned int rg_count = 0;
+
+ blks_need++; /* creationg of 'rindex' disk inode */
+ /* find the total # of rindex entries, gives size of rindex inode */
+ for (head = &sdp->rglist, tmp = head->next; tmp != head;
+ tmp = tmp->next)
+ rg_count++;
+ blks_need +=
+ total_file_blocks(sdp, rg_count * sizeof(struct gfs2_rindex), 1);
+ }
+ /* build_quota() */
+ blks_need++; /* quota inode block and uid=gid=0 quota - total 1 block */
+
+ /* Up until this point we require blks_need blocks. We don't
+ * include the blocks freed by the next step (remove_obsolete_gfs1)
+ * because it's possible for us to exceed the available blocks
+ * before this step */
+
+ return blks_avail > blks_need;
+}
+
/* ------------------------------------------------------------------------- */
/* main - mainline code */
/* ------------------------------------------------------------------------- */
@@ -1845,12 +1941,22 @@ int main(int argc, char **argv)
/* Create our system files and directories. */
/* ---------------------------------------------- */
if (!error) {
+ int jreduce = 0;
/* Now we've got to treat it as a gfs2 file system */
if (compute_constants(&sb2)) {
log_crit("Error: Bad constants (1)\n");
exit(-1);
}
+ /* Check if all the files we're about to create will
+ * fit into the space remaining on the device */
+ while (!check_fit(&sb2)) {
+ sb2.jsize--; /* reduce jsize by 1MB each time */
+ jreduce = 1;
+ }
+ if (jreduce)
+ log_notice("Reduced journal size to %u MB to accommodate "
+ "GFS2 file system structures.\n", sb2.jsize);
/* Build the master subdirectory. */
build_master(&sb2); /* Does not do inode_put */
sb2.sd_sb.sb_master_dir = sb2.master_dir->i_di.di_num;
14 years
cluster: STABLE3 - dlm_controld: don't log errors after disabling plocks
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: e525126429881a286149c04d140082b86dcf5339
Parent: ba5c4842666530a318296ccd037a7ffb02436baa
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 13 15:40:55 2010 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 20 09:05:03 2010 -0500
dlm_controld: don't log errors after disabling plocks
Once plocks are disabled due to bad checkpoint data, don't spam
the logs with irrelevant plock errors.
bz 582017
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/dlm_controld/cpg.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index af7ac40..2eb3d65 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1595,26 +1595,32 @@ static void deliver_cb(cpg_handle_t handle,
break;
case DLM_MSG_PLOCK:
+ if (ls->disable_plock)
+ break;
if (cfgd_enable_plock)
receive_plock(ls, hd, len);
- else if (!ls->disable_plock)
+ else
log_error("msg %d nodeid %d enable_plock %d",
hd->type, nodeid, cfgd_enable_plock);
break;
case DLM_MSG_PLOCK_OWN:
+ if (ls->disable_plock)
+ break;
if (cfgd_enable_plock && cfgd_plock_ownership)
receive_own(ls, hd, len);
- else if (!ls->disable_plock)
+ else
log_error("msg %d nodeid %d enable_plock %d owner %d",
hd->type, nodeid, cfgd_enable_plock,
cfgd_plock_ownership);
break;
case DLM_MSG_PLOCK_DROP:
+ if (ls->disable_plock)
+ break;
if (cfgd_enable_plock && cfgd_plock_ownership)
receive_drop(ls, hd, len);
- else if (!ls->disable_plock)
+ else
log_error("msg %d nodeid %d enable_plock %d owner %d",
hd->type, nodeid, cfgd_enable_plock,
cfgd_plock_ownership);
@@ -1622,18 +1628,22 @@ static void deliver_cb(cpg_handle_t handle,
case DLM_MSG_PLOCK_SYNC_LOCK:
case DLM_MSG_PLOCK_SYNC_WAITER:
+ if (ls->disable_plock)
+ break;
if (cfgd_enable_plock && cfgd_plock_ownership)
receive_sync(ls, hd, len);
- else if (!ls->disable_plock)
+ else
log_error("msg %d nodeid %d enable_plock %d owner %d",
hd->type, nodeid, cfgd_enable_plock,
cfgd_plock_ownership);
break;
case DLM_MSG_PLOCKS_STORED:
+ if (ls->disable_plock)
+ break;
if (cfgd_enable_plock)
receive_plocks_stored(ls, hd, len);
- else if (!ls->disable_plock)
+ else
log_error("msg %d nodeid %d enable_plock %d",
hd->type, nodeid, cfgd_enable_plock);
break;
14 years
cluster: STABLE3 - fence_ilo_mp: fix release version
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: ba5c4842666530a318296ccd037a7ffb02436baa
Parent: dd798057688f05adcda65ba1bcc929987f1600b8
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Apr 20 15:41:33 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Apr 20 15:41:33 2010 +0200
fence_ilo_mp: fix release version
Resolves: rhbz#584003
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
fence/agents/ilo_mp/fence_ilo_mp.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ilo_mp/fence_ilo_mp.py b/fence/agents/ilo_mp/fence_ilo_mp.py
index e2f26fa..1618216 100644
--- a/fence/agents/ilo_mp/fence_ilo_mp.py
+++ b/fence/agents/ilo_mp/fence_ilo_mp.py
@@ -5,7 +5,7 @@ sys.path.append("@FENCEAGENTSLIBDIR@")
from fencing import *
#BEGIN_VERSION_GENERATION
-FENCE_RELEASE_NAME=""
+RELEASE_VERSION=""
REDHAT_COPYRIGHT=""
BUILD_DATE=""
#END_VERSION_GENERATION
14 years
fence-agents: master - update fence_ack_manual man page
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: cbc3aed43b6b96187c376facb24903a754249d68
Parent: 2d7644acb8c83ee3c9ea24e0115efa49d09066ff
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Apr 20 15:21:25 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Apr 20 15:21:25 2010 +0200
update fence_ack_manual man page
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
fence/agents/manual/fence_ack_manual.8 | 55 +++++++++++++++++---------------
1 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/fence/agents/manual/fence_ack_manual.8 b/fence/agents/manual/fence_ack_manual.8
index e2ba505..6b4cd14 100644
--- a/fence/agents/manual/fence_ack_manual.8
+++ b/fence/agents/manual/fence_ack_manual.8
@@ -1,36 +1,39 @@
-.TH fence_ack_manual 8
+.TH FENCE_ACK_MANUAL 8 2009-12-21 cluster cluster
.SH NAME
-fence_ack_manual - program run by an operator as a part of manual I/O Fencing
+fence_ack_manual \- a program to override fenced fencing operations
.SH SYNOPSIS
-.B
-fence_ack_manual
-[\fIOPTION\fR]...
+.B fence_ack_manual
+[OPTIONS]
+.I nodename
.SH DESCRIPTION
-fence_ack_manual is run by an operator on the same node that fence_manual(8)
-was run after the operator has reset a node which required fencing. A message
-in the system log indicates to the operator that they must reset a machine and
-then run fence_ack_manual. Running fence_ack_manual allows the cluster to
-continue with recovery of the fenced machine. The victim may be disconnected
-from storage rather than resetting it.
+When
+.BR fenced (8)
+fails to fence a node, it retries indefinately.
+.BR fence_ack_manual (8)
+tells fenced to stop retrying and consider the node fenced.
+
+.P
+It is important that this only be done after the node has been manually
+turned off or prevented from writing to shared storage.
+Without this manual action and verification, the storage that fencing
+protects may become corrupted.
+
+.P
+When fenced fences a node that has no fence devices defined in the cluster
+configuration, the fencing operation fails. This failure will be repeated
+indefinately until fence_ack_manual is run by an operator to indicate
+the node is in a safe state to proceed.
+(Defining no fencing devices for node is the equivalent of using the
+fence_manual agent in previous versions.)
.SH OPTIONS
.TP
-\fB-h\fP
-Print out a help message describing available options, then exit.
-.TP
-\fB-O\fP
-Run without prompting for user confirmation.
-.TP
-\fB-n\fP \fInodename\fP
-Name of node that has been reset or disconnected from storage.
-.TP
-\fB-s\fP \fIIPaddress\fP
-IP address of the machine which has been reset or disconnected from storage. (Deprecated; use -n instead.)
-.TP
-\fB-V\fP
-Print out a version message, then exit.
+.B \-h
+Print a help message describing available options, then exit.
+
.SH SEE ALSO
-fence(8), fence_node(8)
+.BR fenced (8)
+
14 years
fence-agents: master - lpar: fix spacing
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 2d7644acb8c83ee3c9ea24e0115efa49d09066ff
Parent: 35d5ebb6a9304d74cc69dd17416be192118815d9
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Apr 20 15:21:10 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Apr 20 15:21:10 2010 +0200
lpar: fix spacing
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
fence/agents/lpar/fence_lpar.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 61d12a9..00ea66c 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -156,8 +156,10 @@ def main():
if 0 == options.has_key("-s"):
fail_usage("Failed: You have to enter name of managed system")
+
if (0 == ["list", "monitor"].count(options["-o"].lower())) and (0 == options.has_key("-n")):
fail_usage("Failed: You have to enter name of the partition")
+
if 1 == options.has_key("-H") and (options["-H"] != "3" and options["-H"] != "4"):
fail_usage("Failed: You have to enter valid version number: 3 or 4")
14 years
fence-agents: master - ipmilan: build man page at build time
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 35d5ebb6a9304d74cc69dd17416be192118815d9
Parent: 3b302d1306320c2709d9feaebe37535d37fbddfe
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Apr 20 15:20:48 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Apr 20 15:20:48 2010 +0200
ipmilan: build man page at build time
---
fence/agents/ipmilan/Makefile.am | 9 +++
fence/agents/ipmilan/fence_ipmilan.8 | 110 ----------------------------------
2 files changed, 9 insertions(+), 110 deletions(-)
diff --git a/fence/agents/ipmilan/Makefile.am b/fence/agents/ipmilan/Makefile.am
index 72437ef..dcba792 100644
--- a/fence/agents/ipmilan/Makefile.am
+++ b/fence/agents/ipmilan/Makefile.am
@@ -7,3 +7,12 @@ noinst_HEADERS = expect.h
fence_ipmilan_SOURCES = expect.c ipmilan.c
dist_man_MANS = fence_ipmilan.8
+
+fence_ipmilan.8: fence_ipmilan $(top_srcdir)/fence/agents/lib/fence2man.xsl
+ set -e && \
+ PYTHONPATH=$(top_srcdir)/fence/agents/lib:$(top_builddir)/fence/agents/lib \
+ ./$^ -o metadata > .$@.tmp && \
+ xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@
+
+clean-local:
+ rm -f *.8 .*.8.tmp
diff --git a/fence/agents/ipmilan/fence_ipmilan.8 b/fence/agents/ipmilan/fence_ipmilan.8
deleted file mode 100644
index 98006f6..0000000
--- a/fence/agents/ipmilan/fence_ipmilan.8
+++ /dev/null
@@ -1,110 +0,0 @@
-.TH fence_ipmilan 8
-
-.SH NAME
-fence_ipmilan - I/O Fencing agent for machines controlled by IPMI over
-LAN.
-
-.SH SYNOPSIS
-.B
-fence_ipmilan
-[\fIOPTION\fR]...
-
-.SH DESCRIPTION
-fence_ipmilan is an I/O Fencing agent which can be used with
-machines controlled by IPMI. This agent calls support software
-using ipmitool (http://ipmitool.sf.net/).
-
-fence_ipmilan accepts options on the command line as well as from stdin.
-fenced sends the options through stdin when it execs the agent. fence_ipmilan
-can be run by itself with command line options which is useful for testing.
-
-.SH OPTIONS
-.TP
-\fB-a\fP \fIIPaddress\fP
-IP address or hostname of the IPMI controller.
-.TP
-\fB-h\fP
-Print out a help message describing available options, then exit.
-.TP
-\fB-l\fP \fIlogin\fP
-Login (if required) with administrative privileges.
-.TP
-\fB-o\fP \fIoption\fP
-Action to perform (on, off, reboot).
-.TP
-\fB-p\fP \fIpassword\fP
-Password (if required) for login.
-.TP
-\fB-S\fP \fIpath\fR
-Full path to an executable to generate the password for login.
-.TP
-\fB-P\fP
-Use the lanplus option if this is a lanplus capable interface (for example iLo2)
-.TP
-\fB-A\fP \fIAuthentication Type\fP
-Can be set to none, password, md2, or md5.
-.TP
-\fB-C\fP \fICiphersuite Type\fP
-If you are using lanplus, this option avails you to define type of ciphersuite to
-use. Standard is 3 (defined if you just use lanplus). For more information please
-refer ipmitool man page (option -C).
-.TP
-\fB-M\fP \fImethod\fP
-Method to fence (onoff or cycle). Default is onoff. Use cycle in case your management
-card will power off with default method so there will be no chance to power machine
-on by IPMI.
-.TP
-\fB-t\fP \fItimeout\fP
-Timeout in seconds for IPMI operation. Default is 10, but in some cases it
-must be set to higher value (anything above 30 is not recommended and may
-cause strange problems).
-.TP
-\fB-q\fP
-Quiet operation. Only print out error messages.
-.TP
-\fB-V\fP
-Print out a version message, then exit.
-.TP
-\fB-v\fP
-Verbose mode.
-
-.SH STDIN PARAMETERS
-.TP
-\fIipaddr = < hostname | ip >\fR
-IP address or hostname of the IPMI controller.
-.TP
-\fIlogin= < param >\fR
-Login (if required) with administrative privileges.
-.TP
-\fIoption = < param >\fR
-Action to perform (on, off, reboot).
-.TP
-\fIpasswd = < param >\fR
-Password (if required) for login.
-.TP
-\fIpasswd_script = < param >\fR
-Full path to an executable to generate the password for login.
-.TP
-\fIauth = < param >\fR
-Authentication type (none, password, md2, md5).
-.TP
-\fItimeout = < param >\fR
-Timeout in seconds for IPMI operation. Default is 10, but in some cases it
-must be set to higher value (anything above 30 is not recommended and may
-cause strange problems).
-.TP
-\fIcipher = < param >\fR
-If you are using lanplus, this option avails you to define type of ciphersuite to
-use. Standard is 3 (defined if you just use lanplus). For more information please
-refer ipmitool man page (option -C).
-.TP
-\fImethod = < param >\fR
-Method to fence (onoff or cycle). Default is onoff. Use cycle in case your management
-card will power off with default method so there will be no chance to power machine
-on by IPMI.
-.TP
-\fIlanplus\fR
-If we are using the lanplus option for ipmitool
-
-.SH SEE ALSO
-fence(8), fence_node(8), ipmitool(1)
14 years
fence-agents: master - fence: fix make distcheck build out of tree
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 3b302d1306320c2709d9feaebe37535d37fbddfe
Parent: 9d7745c86de6c22e98ada07b1f3fdcd414eb0935
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Apr 20 14:59:42 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Apr 20 14:59:42 2010 +0200
fence: fix make distcheck build out of tree
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
make/fenceman.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/make/fenceman.mk b/make/fenceman.mk
index 410d6cb..5da0a3a 100644
--- a/make/fenceman.mk
+++ b/make/fenceman.mk
@@ -1,6 +1,6 @@
%.8: $(TARGET) $(top_srcdir)/fence/agents/lib/fence2man.xsl
set -e && \
- PYTHONPATH=$(top_srcdir)/fence/agents/lib \
+ PYTHONPATH=$(top_srcdir)/fence/agents/lib:$(top_builddir)/fence/agents/lib \
python $^ -o metadata > .$@.tmp && \
xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@
14 years