[Linux-cluster] gfs mounted but not working
Robert Peterson
rpeterso at redhat.com
Sat Nov 4 15:48:05 UTC 2006
romero.cl at gmail.com wrote:
> Hello.
>
> 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?
Hi,
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.
Regards,
Bob Peterson
Red Hat Cluster Suite
More information about the Linux-cluster
mailing list