LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-28-2008, 02:02 AM   #1
darknight1726
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
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

* Export gnbd filesystem.
[root@gnbdsrvr ~]# gnbd_export -c -e gnbd1 -d /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

Thank you very much,

darknight1726
 
Old 04-28-2008, 06:21 AM   #2
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 40
Mounting GFS requires that you have setup a working /etc/cluster/cluster.conf (try system-config-cluster for a minimum configuration).

Also you need some sort of fencing (switch off the node on errors to avoid data corruption) besides manual fencing if you want to use it productively.

The lock_nolock option is not suitable if you want to mount GFS on more than one node.

You may load modules with modprobe.

GFS can be mounted and controlled via ressource group manager (rgmanager) or fstab entry.
 
Old 04-29-2008, 02:34 AM   #3
darknight1726
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Ok. Thanks for the reply.

Is it normal to failed 'service cman failed' if doesn't have a cluster.conf configuration on gnbdsrvr?

After I've created cluster.conf and restarted cman, this error occur.

[root@station3 ~]# service cman restart
Stopping cluster:
Stopping fencing... done
Stopping cman... done
Stopping ccsd... done
Unmounting configfs... done
[ OK ]
Starting cluster:
Enabling workaround for Xend bridged networking... done
Loading modules... done
Mounting configfs... done
Starting ccsd... done
Starting cman... failed
cman not started: Can't find local node name in cluster.conf /usr/sbin/cman_tool: aisexec daemon didn't start
[FAILED]

Are there any packages needed or not installed for this setup?


- knight1726
 
Old 06-27-2008, 01:33 PM   #4
s0nspark
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by darknight1726 View Post
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.

Last edited by s0nspark; 06-27-2008 at 01:41 PM.
 
Old 08-05-2008, 08:29 AM   #5
psteele555
LQ Newbie
 
Registered: Jun 2008
Distribution: RHEL 5.0
Posts: 24

Rep: Reputation: 15
Quote:
Originally Posted by s0nspark View Post
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 )
 
Old 08-06-2008, 12:58 AM   #6
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 40
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.

[1] http://www.open-sharedroot.org/comoonics-anaconda
 
Old 08-07-2008, 07:45 AM   #7
psteele555
LQ Newbie
 
Registered: Jun 2008
Distribution: RHEL 5.0
Posts: 24

Rep: Reputation: 15
Thanks brianmcgee, looks good. Now I just have to wait for IT to unblock the website...should take like...4 days...

 
Old 08-12-2008, 09:57 PM   #8
darknight1726
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Original Poster
Rep: Reputation: 0
nice...

Thanks for the tips. I have able to setup GFS with cluster as you have said.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount root File system C-Sniper Slackware 19 12-10-2007 02:37 PM
Pick: GFS or GNBD or NFS To make a single FS Roboam León López Linux - Enterprise 5 10-26-2007 01:52 AM
unable to mount (large) NAS windows file system reitsma Linux - Software 2 11-13-2006 03:22 PM
Kernel Panic - Not Syncing VFS: unable to mount root file system push Slackware 8 08-28-2006 07:17 AM
can't mount file system when trying to set up disk quotas rob_xx17 Linux - General 2 04-13-2006 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration