[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] gfs mounted but not working

Robert Peterson wrote:
romero cl gmail com wrote:
I have a two node cluster runing. Each one have /dev/sdb2 mounted as gfs on /users/home, but when I create one file y node1 not appear on node2. I use the following commands to create the file systems: on node1: gfs_mkfs -p lock_dlm -t node1_cluster:node1_gfs -j 8 /dev/sdb2
on node2: gfs_mkfs -p lock_dlm -t node1_cluster:node1_gfs -j 8 /dev/sdb2
What I'm doing wrong?

When using GFS in a clustered environment, I strongly recommend you use LVM
rather than using the raw device for your GFS partition. Without a clustered
LVM of some sort, there is no locking coordination between the nodes.
I'm assuming, of course, that device sdb is some kind of shared storage, like a SAN.

For example, assuming that your /dev/sdb2 has no valuable data yet, I recommend
doing something like this:

pvcreate /dev/sdb2
vgcreate your_vg /dev/sdb2 (where "your_vg" is the name you choose for your new vg)
vgchange -cy your_vg (turn on the clustered bit)
lvcreate -n your_lv -L 500G your_vg (where 500G is the size of your file system,
               and your_lv is the name you choose for your lv)
gfs_mkfs -p lock_dlm -t node1_cluster:node1_gfs -j 8 /dev/your_vg/your_lv
(on only one node)
At this point you've got to bring up the cluster infrastructure, if it isn't already up.
Next, mount the logical volume from both nodes:
mount -tgfs /dev/your_vg/your_lv /users/home

Now when you touch a file on one node, the other node should see it.

I hope this helps.


Bob Peterson
Red Hat Cluster Suite

Romero - you should only gfs_mkfs from one node, and the other should pick it up. Also (some may feel it goes without saying) you need shared storage between these nodes - GFS does not replicate data between nodes)

Bob - as far as I understand, LVM has certain advantages over native devices (dont have to worry about device names, easy expandability of LVs vs partitions). however there are people who are running GFS without clvmd, which is technically not wrong. (they do so to keep things simple - one less thing that can break).

just switching from GFS on top of partitions to GFS on top of a LVM should not solve such a problem as described by Romero (assuming everything else is working and properly configured)

fn:Riaan van Niekerk
n:van Niekerk;Riaan
org:Obsidian Systems;Obsidian Red Hat Consulting
email;internet:riaan obsidian co za
title:Systems Architect
tel;work:+27 11 792 6500
tel;fax:+27 11 792 6522
tel;cell:+27 82 921 8768

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]