[gfs2-utils] 01/01: fsck.gfs2: Use O_DIRECT
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-dio-test
in repository gfs2-utils.
commit f757540559a9402fa839a96728123f2a1d6f9380
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Aug 15 02:09:24 2018 +0100
fsck.gfs2: Use O_DIRECT
This required changes in libgfs2 and fsck.gfs2 to make sure buffers are
appropriately aligned. posix_fadvise()-based readahead is also removed.
This adds a significant overhead where buffered i/o was previously
beneficial. This should be accounted for in future improvements.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/initialize.c | 42 +++++++++++--------
gfs2/fsck/metawalk.c | 101 ----------------------------------------------
gfs2/fsck/pass1.c | 10 -----
gfs2/libgfs2/buf.c | 10 +++--
gfs2/libgfs2/fs_ops.c | 4 +-
gfs2/libgfs2/structures.c | 20 +++++----
6 files changed, 45 insertions(+), 142 deletions(-)
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index d1c620a..f6eea30 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -1,5 +1,6 @@
#include "clusterautoconfig.h"
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
@@ -135,10 +136,12 @@ static int set_block_ranges(struct gfs2_sbd *sdp)
struct osi_node *n, *next = NULL;
struct rgrp_tree *rgd;
struct gfs2_rindex *ri;
- char buf[sdp->sd_sb.sb_bsize];
uint64_t rmax = 0;
uint64_t rmin = 0;
- int error;
+ ssize_t bytes;
+ off_t off;
+ void *buf;
+ int err;
log_info( _("Setting block ranges..."));
@@ -165,28 +168,32 @@ static int set_block_ranges(struct gfs2_sbd *sdp)
last_data_block = rmax;
first_data_block = rmin;
- if (fsck_lseek(sdp->device_fd, (last_fs_block * sdp->sd_sb.sb_bsize))){
- log_crit( _("Can't seek to last block in file system: %llu"
- " (0x%llx)\n"), (unsigned long long)last_fs_block,
- (unsigned long long)last_fs_block);
+ err = posix_memalign(&buf, getpagesize(), sdp->sd_sb.sb_bsize);
+ if (err != 0) {
+ log_crit(_("Failed to allocate memory for buffer: %s\n"),
+ strerror(err));
goto fail;
}
-
- memset(buf, 0, sdp->sd_sb.sb_bsize);
- error = read(sdp->device_fd, buf, sdp->sd_sb.sb_bsize);
- if (error != sdp->sd_sb.sb_bsize){
- log_crit( _("Can't read last block in file system (error %u), "
- "last_fs_block: %llu (0x%llx)\n"), error,
- (unsigned long long)last_fs_block,
- (unsigned long long)last_fs_block);
- goto fail;
+ off = last_fs_block * sdp->sd_sb.sb_bsize;
+ bytes = pread(sdp->device_fd, buf, sdp->sd_sb.sb_bsize, off);
+ if (bytes == -1) {
+ log_crit(_("Error reading last filesystem block (%"PRIu64"): %s\n"),
+ last_fs_block, strerror(errno));
+ goto fail_free;
+ }
+ if (bytes != sdp->sd_sb.sb_bsize) {
+ log_crit(_("Bad read of %ldB for last filesystem block (%"PRIu64")\n"),
+ (long int)bytes, last_fs_block);
+ goto fail_free;
}
log_info(_("0x%llx to 0x%llx\n"), (unsigned long long)first_data_block,
(unsigned long long)last_data_block);
+ free(buf);
return 0;
-
- fail:
+fail_free:
+ free(buf);
+fail:
log_info( _("Error\n"));
return -1;
}
@@ -1569,6 +1576,7 @@ int initialize(struct gfs2_sbd *sdp, int force_check, int preen,
open_flag = O_RDONLY;
else
open_flag = O_RDWR | O_EXCL;
+ open_flag |= O_DIRECT|O_CLOEXEC|O_NOATIME;
sdp->device_fd = open(opts.device, open_flag);
if (sdp->device_fd < 0) {
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index a7780d7..027587a 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -683,37 +683,6 @@ bad_leaf:
return 1;
}
-static int u64cmp(const void *p1, const void *p2)
-{
- uint64_t a = *(uint64_t *)p1;
- uint64_t b = *(uint64_t *)p2;
-
- if (a > b)
- return 1;
- if (a < b)
- return -1;
-
- return 0;
-}
-
-static void dir_leaf_reada(struct gfs2_inode *ip, uint64_t *tbl, unsigned hsize)
-{
- uint64_t *t = alloca(hsize * sizeof(uint64_t));
- uint64_t leaf_no;
- struct gfs2_sbd *sdp = ip->i_sbd;
- unsigned n = 0;
- unsigned i;
-
- for (i = 0; i < hsize; i++) {
- leaf_no = be64_to_cpu(tbl[i]);
- if (valid_block_ip(ip, leaf_no))
- t[n++] = leaf_no * sdp->bsize;
- }
- qsort(t, n, sizeof(uint64_t), u64cmp);
- for (i = 0; i < n; i++)
- posix_fadvise(sdp->device_fd, t[i], sdp->bsize, POSIX_FADV_WILLNEED);
-}
-
/* Checks exhash directory entries */
int check_leaf_blks(struct gfs2_inode *ip, struct metawalk_fxns *pass)
{
@@ -738,17 +707,10 @@ int check_leaf_blks(struct gfs2_inode *ip, struct metawalk_fxns *pass)
orig_di_height = ip->i_di.di_height;
orig_di_blocks = ip->i_di.di_blocks;
- /* Turn off system readahead */
- posix_fadvise(sdp->device_fd, 0, 0, POSIX_FADV_RANDOM);
-
- /* Readahead */
- dir_leaf_reada(ip, tbl, hsize);
-
if (pass->check_hash_tbl) {
error = pass->check_hash_tbl(ip, tbl, hsize, pass->private);
if (error < 0) {
free(tbl);
- posix_fadvise(sdp->device_fd, 0, 0, POSIX_FADV_NORMAL);
return error;
}
/* If hash table changes were made, read it in again. */
@@ -785,7 +747,6 @@ int check_leaf_blks(struct gfs2_inode *ip, struct metawalk_fxns *pass)
(unsigned long long)ip->i_di.di_num.no_addr,
(unsigned long long)ip->i_di.di_num.no_addr);
free(tbl);
- posix_fadvise(sdp->device_fd, 0, 0, POSIX_FADV_NORMAL);
return 1;
}
lindex = 0;
@@ -830,7 +791,6 @@ int check_leaf_blks(struct gfs2_inode *ip, struct metawalk_fxns *pass)
struct gfs2_leaf leaf;
if (fsck_abort) {
free(tbl);
- posix_fadvise(sdp->device_fd, 0, 0, POSIX_FADV_NORMAL);
return 0;
}
error = check_leaf(ip, lindex, pass, &leaf_no, &leaf,
@@ -879,7 +839,6 @@ int check_leaf_blks(struct gfs2_inode *ip, struct metawalk_fxns *pass)
lindex += ref_count;
} /* for every leaf block */
free(tbl);
- posix_fadvise(sdp->device_fd, 0, 0, POSIX_FADV_NORMAL);
return 0;
}
@@ -1157,59 +1116,6 @@ static void free_metalist(struct gfs2_inode *ip, osi_list_t *mlp)
}
}
-static void file_ra(struct gfs2_inode *ip, struct gfs2_buffer_head *bh,
- int head_size, int maxptrs, int h)
-{
- struct gfs2_sbd *sdp = ip->i_sbd;
- uint64_t *p, sblock = 0, block;
- int extlen = 0;
-
- if (h + 2 == ip->i_di.di_height) {
- p = (uint64_t *)(bh->b_data + head_size);
- if (*p && *(p + 1)) {
- sblock = be64_to_cpu(*p);
- p++;
- block = be64_to_cpu(*p);
- extlen = block - sblock;
- if (extlen > 1 && extlen <= maxptrs) {
- posix_fadvise(sdp->device_fd,
- sblock * sdp->bsize,
- (extlen + 1) * sdp->bsize,
- POSIX_FADV_WILLNEED);
- return;
- }
- }
- extlen = 0;
- }
- for (p = (uint64_t *)(bh->b_data + head_size);
- p < (uint64_t *)(bh->b_data + sdp->bsize); p++) {
- if (*p) {
- if (!sblock) {
- sblock = be64_to_cpu(*p);
- extlen = 1;
- continue;
- }
- block = be64_to_cpu(*p);
- if (block == sblock + extlen) {
- extlen++;
- continue;
- }
- }
- if (extlen && sblock) {
- if (extlen > 1)
- extlen--;
- posix_fadvise(sdp->device_fd, sblock * sdp->bsize,
- extlen * sdp->bsize,
- POSIX_FADV_WILLNEED);
- extlen = 0;
- p--;
- }
- }
- if (extlen)
- posix_fadvise(sdp->device_fd, sblock * sdp->bsize,
- extlen * sdp->bsize, POSIX_FADV_WILLNEED);
-}
-
/**
* build_and_check_metalist - check a bunch of indirect blocks
* This includes hash table blocks for directories
@@ -1230,7 +1136,6 @@ static int build_and_check_metalist(struct gfs2_inode *ip, osi_list_t *mlp,
int h, head_size, iblk_type;
uint64_t *ptr, block, *undoptr;
int error, was_duplicate, is_valid;
- int maxptrs;
osi_list_add(&metabh->b_altlist, &mlp[0]);
@@ -1254,16 +1159,12 @@ static int build_and_check_metalist(struct gfs2_inode *ip, osi_list_t *mlp,
iblk_type = GFS2_METATYPE_IN;
if (ip->i_sbd->gfs1) {
head_size = sizeof(struct gfs_indirect);
- maxptrs = (ip->i_sbd->bsize - head_size) /
- sizeof(uint64_t);
} else {
head_size = sizeof(struct gfs2_meta_header);
- maxptrs = ip->i_sbd->sd_inptrs;
}
} else {
iblk_type = GFS2_METATYPE_DI;
head_size = sizeof(struct gfs2_dinode);
- maxptrs = ip->i_sbd->sd_diptrs;
}
prev_list = &mlp[h - 1];
cur_list = &mlp[h];
@@ -1278,8 +1179,6 @@ static int build_and_check_metalist(struct gfs2_inode *ip, osi_list_t *mlp,
continue;
}
- if (pass->readahead)
- file_ra(ip, bh, head_size, maxptrs, h);
/* Now check the metadata itself */
for (ptr = (uint64_t *)(bh->b_data + head_size);
(char *)ptr < (bh->b_data + ip->i_sbd->bsize);
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index 3c2f74f..2788b1b 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -1889,22 +1889,12 @@ static int pass1_process_bitmap(struct gfs2_sbd *sdp, struct rgrp_tree *rgd, uin
uint64_t block;
struct gfs2_inode *ip;
int q;
- /* Readahead numbers arrived at by experiment */
- unsigned rawin = 50;
- unsigned ralen = 100 * sdp->bsize;
- unsigned r = 0;
for (i = 0; i < n; i++) {
int is_inode;
uint32_t check_magic;
block = ibuf[i];
-
- if (r++ == rawin) {
- posix_fadvise(sdp->device_fd, block * sdp->bsize, ralen, POSIX_FADV_WILLNEED);
- r = 0;
- }
-
/* skip gfs1 rindex indirect blocks */
if (sdp->gfs1 && blockfind(&gfs1_rindex_blks, block)) {
log_debug(_("Skipping rindex indir block "
diff --git a/gfs2/libgfs2/buf.c b/gfs2/libgfs2/buf.c
index 92cd393..a2af4ff 100644
--- a/gfs2/libgfs2/buf.c
+++ b/gfs2/libgfs2/buf.c
@@ -26,14 +26,16 @@
struct gfs2_buffer_head *bget(struct gfs2_sbd *sdp, uint64_t num)
{
struct gfs2_buffer_head *bh;
+ void *buf;
- bh = calloc(1, sizeof(struct gfs2_buffer_head) + sdp->bsize);
- if (bh == NULL)
+ if (posix_memalign(&buf, getpagesize(), sizeof(*bh) + sdp->bsize))
return NULL;
+ memset(buf, 0, sizeof(*bh) + sdp->bsize);
+ bh = (struct gfs2_buffer_head *)((char *)buf + sdp->bsize);
bh->b_blocknr = num;
bh->sdp = sdp;
- bh->iov.iov_base = (char *)bh + sizeof(struct gfs2_buffer_head);
+ bh->iov.iov_base = buf;
bh->iov.iov_len = sdp->bsize;
return bh;
@@ -106,7 +108,7 @@ int brelse(struct gfs2_buffer_head *bh)
bh->b_blocknr = -1;
if (bh->b_altlist.next && !osi_list_empty(&bh->b_altlist))
osi_list_del(&bh->b_altlist);
- free(bh);
+ free(bh->iov.iov_base);
return error;
}
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index 7e87e43..2c1b1d5 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -1500,13 +1500,13 @@ int lgfs2_write_filemeta(struct gfs2_inode *ip)
}
lgfs2_fill_indir(start, bh->b_data + sdp->bsize, ptr0, ptrs, &p);
if (bwrite(bh)) {
- free(bh);
+ free(bh->iov.iov_base);
return 1;
}
}
ptr0 += ptrs;
}
- free(bh);
+ free(bh->iov.iov_base);
return 0;
}
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index c84701d..b857489 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -74,12 +74,15 @@ int lgfs2_sb_write(const struct gfs2_sb *sb, int fd, const unsigned bsize)
struct iovec *iov;
const size_t sb_addr = GFS2_SB_ADDR * GFS2_BASIC_BLOCK / bsize;
const size_t len = sb_addr + 1;
+ ssize_t bytes;
+ void *buf;
/* We only need 2 blocks: one for zeroing and a second for the superblock */
- char *buf = calloc(2, bsize);
- if (buf == NULL)
+ if ((err = posix_memalign(&buf, getpagesize(), 2 * bsize))) {
+ errno = err;
return -1;
-
+ }
+ memset(buf, 0, 2 * bsize);
iov = malloc(len * sizeof(*iov));
if (iov == NULL)
goto out_buf;
@@ -89,10 +92,11 @@ int lgfs2_sb_write(const struct gfs2_sb *sb, int fd, const unsigned bsize)
iov[i].iov_len = bsize;
}
- gfs2_sb_out(sb, buf + bsize);
- iov[sb_addr].iov_base = buf + bsize;
+ iov[sb_addr].iov_base = (char *)buf + bsize;
+ gfs2_sb_out(sb, iov[sb_addr].iov_base);
- if (pwritev(fd, iov, len, 0) < (len * bsize))
+ bytes = pwritev(fd, iov, len, 0);
+ if (bytes < (long)(len * bsize))
goto out_iov;
err = 0;
@@ -181,7 +185,7 @@ int lgfs2_write_journal_data(struct gfs2_inode *ip)
#endif
if (bwrite(bh)) {
- free(bh);
+ free(bh->iov.iov_base);
return -1;
}
@@ -190,7 +194,7 @@ int lgfs2_write_journal_data(struct gfs2_inode *ip)
} while (++bh->b_blocknr < jext0 + blocks);
- free(bh);
+ free(bh->iov.iov_base);
return 0;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 1 month
[gfs2-utils] 02/02: gfs2_grow.8: Add a reference to the lvm docs
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 5f1eb6a32f8871c0cf800837aff09d43c95394cb
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Feb 15 16:14:56 2019 +0000
gfs2_grow.8: Add a reference to the lvm docs
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/man/gfs2_grow.8 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gfs2/man/gfs2_grow.8 b/gfs2/man/gfs2_grow.8
index 317d4f2..8bef1a4 100644
--- a/gfs2/man/gfs2_grow.8
+++ b/gfs2/man/gfs2_grow.8
@@ -17,6 +17,9 @@ filesystem extension. When this operation is complete, the resource
group index for the filesystem is updated so that all nodes in the
cluster can use the extra storage space that has been added.
+See \fBlvmlockd(8)\fP for the procedure to extend and refresh the logical
+volume prior to running gfs2_grow.
+
You may only run gfs2_grow on a mounted filesystem; expansion of
unmounted filesystems is not supported. You only need to
run gfs2_grow on one node in the cluster. All the other nodes will
@@ -62,5 +65,8 @@ Version. Print out version information, then exit.
There is no way to shrink a GFS2 filesystem.
.SH SEE ALSO
-mkfs.gfs2(8) gfs2_jadd(8)
+.BR mkfs.gfs2(8)
+.BR gfs2_jadd(8)
+.BR lvextend(8)
+.BR lvmlockd(8)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 2 months
[gfs2-utils] 01/02: gfs2.5: General updates and layout improvements
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 75934649b85259d1559eabca40be820095643239
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Feb 12 09:58:11 2019 +0000
gfs2.5: General updates and layout improvements
- Update the manpage to mention lvmlockd and don't mention gfs2_quota
or gfs_controld (both obsolete).
- Simplify the setup instructions and refer to distribution-specific
docs and support requirements.
- Rearrange the "See also" section for relevance and incorporate the
references from the setup section.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/man/gfs2.5 | 239 +++++++++++---------------------------------------------
1 file changed, 44 insertions(+), 195 deletions(-)
diff --git a/gfs2/man/gfs2.5 b/gfs2/man/gfs2.5
index 56d1a00..436abc0 100644
--- a/gfs2/man/gfs2.5
+++ b/gfs2/man/gfs2.5
@@ -21,6 +21,20 @@ mounts which are equivalent to mounting a read-only block device and as
such can neither recover a journal or write to the filesystem, so do not
require a journal assigned to them.
+The GFS2 documentation has been split into a number of sections:
+
+\fBmkfs.gfs2\fP(8) Create a GFS2 filesystem
+.br
+\fBfsck.gfs2\fP(8) The GFS2 filesystem checker
+.br
+\fBgfs2_grow\fP(8) Growing a GFS2 filesystem
+.br
+\fBgfs2_jadd\fP(8) Adding a journal to a GFS2 filesystem
+.br
+\fBtunegfs2\fP(8) Tool to manipulate GFS2 superblocks
+.br
+\fBgfs2_edit\fP(8) A GFS2 debug tool (use with caution)
+
.SH MOUNT OPTIONS
.TP
@@ -200,220 +214,55 @@ versa. Finally, when first enabling this option on a filesystem that had been
previously mounted without it, you must make sure that there are no outstanding
cookies being cached by other software, such as NFS.
-.SH BUGS
-
-GFS2 doesn't support \fBerrors=\fP\fIremount-ro\fR or \fBdata=\fP\fIjournal\fR.
-It is not possible to switch support for user and group quotas on and
-off independently of each other. Some of the error messages are rather
-cryptic, if you encounter one of these messages check firstly that gfs_controld
-is running and secondly that you have enough journals on the filesystem
-for the number of nodes in use.
-
-.SH SEE ALSO
-
-\fBmount\fP(8) for general mount options,
-\fBchmod\fP(1) and \fBchmod\fP(2) for access permission flags,
-\fBacl\fP(5) for access control lists,
-\fBlvm\fP(8) for volume management,
-\fBccs\fP(7) for cluster management,
-\fBumount\fP(8),
-\fBinitrd\fP(4).
-
-The GFS2 documentation has been split into a number of sections:
-
-\fBgfs2_edit\fP(8) A GFS2 debug tool (use with caution)
-\fBfsck.gfs2\fP(8) The GFS2 file system checker
-\fBgfs2_grow\fP(8) Growing a GFS2 file system
-\fBgfs2_jadd\fP(8) Adding a journal to a GFS2 file system
-\fBmkfs.gfs2\fP(8) Make a GFS2 file system
-\fBgfs2_quota\fP(8) Manipulate GFS2 disk quotas
-\fBgfs2_tool\fP(8) Tool to manipulate a GFS2 file system (obsolete)
-\fBtunegfs2\fP(8) Tool to manipulate GFS2 superblocks
-
.SH SETUP
-GFS2 clustering is driven by the dlm, which depends on dlm_controld to
-provide clustering from userspace. dlm_controld clustering is built on
-corosync cluster/group membership and messaging.
-
-Follow these steps to manually configure and run gfs2/dlm/corosync.
-
-.B 1. create /etc/corosync/corosync.conf and copy to all nodes
-
-In this sample, replace cluster_name and IP addresses, and add nodes as
-needed. If using only two nodes, uncomment the two_node line.
-See corosync.conf(5) for more information.
-
-.nf
-totem {
- version: 2
- secauth: off
- cluster_name: abc
-}
-
-nodelist {
- node {
- ring0_addr: 10.10.10.1
- nodeid: 1
- }
- node {
- ring0_addr: 10.10.10.2
- nodeid: 2
- }
- node {
- ring0_addr: 10.10.10.3
- nodeid: 3
- }
-}
-
-quorum {
- provider: corosync_votequorum
-# two_node: 1
-}
-
-logging {
- to_syslog: yes
-}
-.fi
-
-.PP
-
-.B 2. start corosync on all nodes
-
-.nf
-systemctl start corosync
-.fi
-
-Run corosync-quorumtool to verify that all nodes are listed.
-
-.PP
-
-.B 3. create /etc/dlm/dlm.conf and copy to all nodes
-
-.B *
-To use no fencing, use this line:
+GFS2 clustering is driven by the dlm, which depends on dlm_controld to provide
+clustering from userspace. dlm_controld clustering is built on corosync
+cluster/group membership and messaging. GFS2 also requires clustered lvm which
+is provided by lvmlockd or, previously, clvmd. Refer to the documentation for
+each of these components and ensure that they are configured before setting up
+a GFS2 filesystem. Also refer to your distribution's documentation for any
+specific support requirements.
-.nf
-enable_fencing=0
-.fi
+Ensure that gfs2-utils is installed on all nodes which mount the filesystem as
+it provides scripts required for correct withdraw event response.
-.B *
-To use no fencing, but exercise fencing functions, use this line:
-
-.nf
-fence_all /bin/true
-.fi
-
-The "true" binary will be executed for all nodes and will succeed (exit 0)
-immediately.
-
-.B *
-To use manual fencing, use this line:
-
-.nf
-fence_all /bin/false
-.fi
-
-The "false" binary will be executed for all nodes and will fail (exit 1)
-immediately.
-
-When a node fails, manually run: dlm_tool fence_ack <nodeid>
-
-.B *
-To use stonith/pacemaker for fencing, use this line:
-
-.nf
-fence_all /usr/sbin/dlm_stonith
-.fi
-
-The "dlm_stonith" binary will be executed for all nodes. If
-stonith/pacemaker systems are not available, dlm_stonith will fail and
-this config becomes the equivalent of the previous /bin/false config.
-
-.B *
-To use an APC power switch, use these lines:
-
-.nf
-device apc /usr/sbin/fence_apc ipaddr=1.1.1.1 login=admin password=pw
-connect apc node=1 port=1
-connect apc node=2 port=2
-connect apc node=3 port=3
-.fi
-
-Other network switch based agents are configured similarly.
-
-.B *
-To use sanlock/watchdog fencing, use these lines:
-
-.nf
-device wd /usr/sbin/fence_sanlock path=/dev/fence/leases
-connect wd node=1 host_id=1
-connect wd node=2 host_id=2
-unfence wd
-.fi
-
-See fence_sanlock(8) for more information.
-
-.B *
-For other fencing configurations see dlm.conf(5) man page.
-
-.PP
-
-.B 4. start dlm_controld on all nodes
-
-.nf
-systemctl start dlm
-.fi
-
-Run "dlm_tool status" to verify that all nodes are listed.
-
-.PP
-
-.B 5. if using clvm, start clvmd on all nodes
-
-systemctl clvmd start
-
-.PP
-
-.B 6. make new gfs2 file systems
+.B 1. Create the gfs2 filesystem
mkfs.gfs2 -p lock_dlm -t cluster_name:fs_name -j num /path/to/storage
-The cluster_name must match the name used in step 1 above.
-The fs_name must be a unique name in the cluster.
-The -j option is the number of journals to create, there must
-be one for each node that will mount the fs.
+The cluster_name must match the name configured in corosync (and thus dlm).
+The fs_name must be a unique name for the filesystem in the cluster.
+The -j option is the number of journals to create; there must
+be one for each node that will mount the filesystem.
.PP
+.B 2. Mount the gfs2 filesystem
-.B 7. mount gfs2 file systems
+If you are using a clustered resource manager, see its documentation for
+enabling a gfs2 filesystem resource. Otherwise, run:
mount /path/to/storage /mountpoint
Run "dlm_tool ls" to verify the nodes that have each fs mounted.
.PP
+.B 3. Shut down
-.B 8. shut down
+If you are using a clustered resource manager, see its documentation for
+disabling a gfs2 filesystem resource. Otherwise, run:
-.nf
umount -a -t gfs2
-systemctl clvmd stop
-systemctl dlm stop
-systemctl corosync stop
-.fi
.PP
+.SH SEE ALSO
-.B More setup information:
-.br
-.BR dlm_controld (8),
-.br
-.BR dlm_tool (8),
-.br
-.BR dlm.conf (5),
-.br
-.BR corosync (8),
-.br
-.BR corosync.conf (5)
-.br
+\fBmount\fP(8) and \fBumount\fP(8) for general mount information,
+\fBchmod\fP(1) and \fBchmod\fP(2) for access permission flags,
+\fBacl\fP(5) for access control lists,
+\fBlvm\fP(8) for volume management,
+\fBdlm_controld\fP(8),
+\fBdlm_tool\fP(8),
+\fBdlm.conf\fP(5),
+\fBcorosync\fP(8),
+\fBcorosync.conf\fP(5),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 2 months
[gfs2-utils] branch master updated: Fix more linking errors
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
The following commit(s) were added to refs/heads/master by this push:
new 1a92a96 Fix more linking errors
1a92a96 is described below
commit 1a92a964c8ba87d95b2f43b0adc3d351a7f7ba80
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Feb 4 15:31:33 2019 +0000
Fix more linking errors
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/convert/Makefile.am | 5 +++--
gfs2/edit/Makefile.am | 4 ++--
gfs2/fsck/Makefile.am | 3 +--
gfs2/glocktop/Makefile.am | 8 +++-----
gfs2/mkfs/Makefile.am | 13 +++++++------
gfs2/tune/Makefile.am | 2 +-
tests/Makefile.am | 13 +++++++------
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/gfs2/convert/Makefile.am b/gfs2/convert/Makefile.am
index 4db643f..2d61af7 100644
--- a/gfs2/convert/Makefile.am
+++ b/gfs2/convert/Makefile.am
@@ -7,5 +7,6 @@ gfs2_convert_CPPFLAGS = \
-I$(top_srcdir)/gfs2/include \
-I$(top_srcdir)/gfs2/libgfs2
-gfs2_convert_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
-gfs2_convert_LDFLAGS = $(uuid_LIBS)
+gfs2_convert_LDADD = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
+ $(uuid_LIBS)
diff --git a/gfs2/edit/Makefile.am b/gfs2/edit/Makefile.am
index a9b177e..4a89502 100644
--- a/gfs2/edit/Makefile.am
+++ b/gfs2/edit/Makefile.am
@@ -25,9 +25,9 @@ gfs2_edit_CFLAGS = \
$(zlib_CFLAGS) \
$(uuid_CFLAGS)
-gfs2_edit_LDFLAGS = \
+gfs2_edit_LDADD = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
$(ncurses_LIBS) \
$(zlib_LIBS) \
$(uuid_LIBS)
-gfs2_edit_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
diff --git a/gfs2/fsck/Makefile.am b/gfs2/fsck/Makefile.am
index 97fcd40..1c52805 100644
--- a/gfs2/fsck/Makefile.am
+++ b/gfs2/fsck/Makefile.am
@@ -36,6 +36,5 @@ fsck_gfs2_CPPFLAGS = \
-I$(top_srcdir)/gfs2/libgfs2
fsck_gfs2_LDADD = \
- $(top_builddir)/gfs2/libgfs2/libgfs2.la
-fsck_gfs2_LDFLAGS = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
$(uuid_LIBS)
diff --git a/gfs2/glocktop/Makefile.am b/gfs2/glocktop/Makefile.am
index 1102c8e..f507655 100644
--- a/gfs2/glocktop/Makefile.am
+++ b/gfs2/glocktop/Makefile.am
@@ -9,10 +9,6 @@ glocktop_SOURCES = \
glocktop_CFLAGS = \
$(ncurses_CFLAGS)
-glocktop_LDFLAGS = \
- $(ncurses_LIBS) \
- $(uuid_LIBS)
-
glocktop_CPPFLAGS = \
-D_FILE_OFFSET_BITS=64 \
-D_LARGEFILE64_SOURCE \
@@ -21,4 +17,6 @@ glocktop_CPPFLAGS = \
-I$(top_srcdir)/gfs2/libgfs2
glocktop_LDADD = \
- $(top_builddir)/gfs2/libgfs2/libgfs2.la
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
+ $(ncurses_LIBS) \
+ $(uuid_LIBS)
diff --git a/gfs2/mkfs/Makefile.am b/gfs2/mkfs/Makefile.am
index f0dd961..fd7145b 100644
--- a/gfs2/mkfs/Makefile.am
+++ b/gfs2/mkfs/Makefile.am
@@ -25,10 +25,10 @@ mkfs_gfs2_CPPFLAGS = $(COMMON_CPPFLAGS)
mkfs_gfs2_CFLAGS = \
$(blkid_CFLAGS) \
$(uuid_CFLAGS)
-mkfs_gfs2_LDFLAGS = \
+mkfs_gfs2_LDADD = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
$(blkid_LIBS) \
$(uuid_LIBS)
-mkfs_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
gfs2_grow_SOURCES = \
main_grow.c \
@@ -36,16 +36,17 @@ gfs2_grow_SOURCES = \
gfs2_grow_CPPFLAGS = $(COMMON_CPPFLAGS)
gfs2_grow_CFLAGS = $(blkid_CFLAGS)
-gfs2_grow_LDFLAGS = \
+gfs2_grow_LDADD = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
$(blkid_LIBS) \
$(uuid_LIBS)
-gfs2_grow_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
gfs2_jadd_SOURCES = \
main_jadd.c \
metafs.c
gfs2_jadd_CPPFLAGS = $(COMMON_CPPFLAGS)
-gfs2_jadd_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
-gfs2_jadd_LDFLAGS = $(uuid_LIBS)
+gfs2_jadd_LDADD = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
+ $(uuid_LIBS)
diff --git a/gfs2/tune/Makefile.am b/gfs2/tune/Makefile.am
index 7628f42..171377d 100644
--- a/gfs2/tune/Makefile.am
+++ b/gfs2/tune/Makefile.am
@@ -13,5 +13,5 @@ tunegfs2_CPPFLAGS = \
-I$(top_srcdir)/group/include
tunegfs2_CFLAGS = \
$(uuid_CFLAGS)
-tunegfs2_LDFLAGS = \
+tunegfs2_LDADD = \
$(uuid_LIBS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 40fcfb4..40b486b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,8 +26,7 @@ nukerg_CFLAGS = \
-I$(top_srcdir)/gfs2/libgfs2 \
-I$(top_srcdir)/gfs2/include
nukerg_LDADD = \
- $(top_builddir)/gfs2/libgfs2/libgfs2.la
-nukerg_LDFLAGS = \
+ $(top_builddir)/gfs2/libgfs2/libgfs2.la \
$(uuid_LIBS)
if HAVE_CHECK
@@ -54,16 +53,18 @@ check_meta_SOURCES = \
$(UNIT_SOURCES) \
check_meta.c
check_meta_CFLAGS = $(UNIT_CFLAGS)
-check_meta_LDADD = $(UNIT_LDADD)
-check_meta_LDFLAGS = $(uuid_LIBS)
+check_meta_LDADD = \
+ $(UNIT_LDADD) \
+ $(uuid_LIBS)
check_meta_CPPFLAGS = $(UNIT_CPPFLAGS)
check_rgrp_SOURCES = \
$(UNIT_SOURCES) \
check_rgrp.c
check_rgrp_CFLAGS = $(UNIT_CFLAGS)
-check_rgrp_LDADD = $(UNIT_LDADD)
-check_rgrp_LDFLAGS = $(uuid_LIBS)
+check_rgrp_LDADD = \
+ $(UNIT_LDADD) \
+ $(uuid_LIBS)
check_rgrp_CPPFLAGS = $(UNIT_CPPFLAGS)
endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 2 months
[gfs2-utils] branch master updated: Fix libuuid linking
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
The following commit(s) were added to refs/heads/master by this push:
new 222e97c Fix libuuid linking
222e97c is described below
commit 222e97c23dd015a8fc4bcceb598720cc17337edf
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Feb 4 14:54:34 2019 +0000
Fix libuuid linking
Fixes a build failure in Rawhide.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/Makefile.am | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gfs2/libgfs2/Makefile.am b/gfs2/libgfs2/Makefile.am
index 749da85..76df920 100644
--- a/gfs2/libgfs2/Makefile.am
+++ b/gfs2/libgfs2/Makefile.am
@@ -54,8 +54,9 @@ libgfs2_la_CPPFLAGS = \
$(uuid_CFLAGS)
gfs2l_SOURCES = gfs2l.c
-gfs2l_LDADD = libgfs2.la
-gfs2l_LDFLAGS = $(uuid_LIBS)
+gfs2l_LDADD = \
+ libgfs2.la \
+ $(uuid_LIBS)
gfs2l_CPPFLAGS = \
-I$(top_srcdir)/gfs2/include \
-D_FILE_OFFSET_BITS=64
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years, 2 months