GFS unable (incomplete set-up) to mount automatically GNBD file system
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
GFS unable (incomplete set-up) to mount automatically GNBD file system
HI ALL!
I'm Dan, and a Linux newbie and trying to set up GFS using 1 machine and 1 virtual host. Obviously, my host machine will be the GNBD server (named gnbdsrvr.domain.com) and the virtual guest will be GNBD client (named node1.domain.com)
I have some problems with regards to mounting automatically the gfs file system on a gnbd server (host OS) to node1 (virtual guest).
NOTE: I don't have a configured cluster manager or clustering environment.
These is my setup and as of now, gfs filesystem works fine in a matter that is mounted on the GNBD server and not on it's client:
* Install gfs and clustering packages on both gnbdsrvr and node1 using yum:
GFS Installed Packages:
gfs-utils-0.1.12-1.el5
kmod-gfs2-xen-1.52-1.16.el5
gfs2-utils-0.1.38-1.el5
kmod-gfs-xen-0.1.19-7.el5_1.3
Cluster Packages:
cman-2.0.73-1.el5
* Load modules on both gnbdsrvr and node1:
modprobe -a gfs gfs2
Start cman, openais (dependency package of cman) on both gndbsvr and node1: Enabling workaround for Xend bridged networking... done
[root@gnbdsrvr ~]# service cman start
Loading modules... done
Mounting configfs... done
Starting ccsd... done
Starting cman... failed
/usr/sbin/cman_tool: ccsd is not running
[FAILED]
cman_tool failed cause cluster is not configured.
* Reboot system to see if gfs and gfs2 module loads.
* Install gnbd packages on both gnbdsrvr and node1:
kmod-gnbd-xen-0.1.4-12.el5
gnbd-1.1.5-1.el5
* Reboot both system and load gnbd modules.
modprobe -a gnbd
* Create initrd with gnbd module on both gnbdsrvr and node1:
mkinitrd -v --with=gnbd /boot/initrd-2.6.18-53.el5xen_gnbd.img $(uname -r)
* Insert gnbd module on /boot/grub/grub.conf and reboot both system.
* Run gnbd service on both gnbdsrvr and node1
gnbd_serv -n
(12) Create a partition (1GB) and use it for logical volume on gnbdsrvr.
[root@gnbdsrvr ~]# pvcreate /dev/sda8
[root@gnbdsrvr ~]# vgcreate vg_gfs /dev/sda8
[root@gnbdsrvr ~]# lvcreate -L 500M -n lv_gfs vg_gfs
* Format it as a gfs filesystem.
[root@gnbdsrvr ~]# gfs_mkfs -t cluster_GFS:gfs01 -p lock_dlm -j 2\ /dev/vg_gfs/lv_gfs
* Import gnbd filesystem
[root@gnbdsrvr ~]# gnbd_import i gnbdsrvr -n
* Mount gfs filesystem on both gnbdsrvr and node1.
[root@gnbdsrvr ~]# mount /dev/vg_gfs/lv_gfs /GFS -o lockproto=lock_nolock
[root@node1 ~]# mount /dev/gnbd/gnbd1 -o lockproto=lock_nolock
* Set gfs filesystem to be automatically mount at reboot.
on gnbdsrvr:
/dev/mapper/vg_gfs-lv_gfs on /GFS type gfs (rw,lockproto=lock_nolock,localflocks,localcaching,oopses_ok)
on node:
/dev/mapper/gnbd/gnbd1 on /GFS type gfs (rw,lockproto=lock_nolock,localflocks,localcaching,oopses_ok)
My question are listed below:
(1) Is this setup is accurate? Any positive and negative comments pls. Thanks.
(2) Is it fine if I use mkinitrd just to create or load gnbd module on my system although its working or is there any way to mount gnbd module without creating a new initrd image?
(3) How can I set GFS filesystem using GNBD device to be automatically mounted at boot up? Can I create a script that will run before gnbd filesystem will load or is there any configuration I've failed to set up?
Or it's needed to have a cluster configuration (/etc/cluster/cluster.conf in order to set a mount automatically GFS filesystem at boot up on node1.domain.com?
In these setup, I've failed to run gnbd_export and gnbd_import to gndbsvr and node respectively that's why gnbd file system doesn't automatic mount on node1 . It is fine if I inserted gnbd_export, gnbd_import and gnbd_serv on /etc/rc.local ?
I'm hoping that somebody could help me on this thing
Is it normal to failed 'service cman failed' if doesn't have a cluster.conf configuration on gnbdsrvr?
Yes, cman requires a cluster.conf...
I got a similar error when setting up gnbd ... in my case it was because I hadn't run 'ccs_tool addnodeids' on the server. After doing that (and making sure I had a correct entry in my hosts file for the server that did NOT point to the loopback address) then I was able to start cman.
Here's one thing I wasn't aware of, though. You don't need a cluster setup if you are only exporting storage from one server to another (as your example suggests) ... that can be accomplished by passing gnbd_serv and gnbd_import the '-n' option which tells them no cluster manager is in use.
Of course this would only be useful if you are mounting the exported device on one and only one server ... in which case GFS is not needed either.
In any case, I am working through setting up a cluster with GFS on CentOS 5.1 to make our file server + RAID act like a SAN. I'll be happy to share any tips I pick up along the way.
In any case, I am working through setting up a cluster with GFS on CentOS 5.1 to make our file server + RAID act like a SAN. I'll be happy to share any tips I pick up along the way.
Have you achieved this setup? I am trying to do the same thing except on RHEL 5 (only different from CentOS because of the RHN, it won't let me yum )
If you want to construct a cluster out of the box, there is also a modified CentOS (respectively RHEL) installation media available [1]. During the setup a wizard guides through all parameters needed for constructing a cluster and afterwards you have a GFS single node cluster running where even the root filesystem is shared amongst the nodes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.