Skip to contentSkip to conversation

Local GFS on lvm

linux-lvm Klaus Strebel 3 participants 4 messages May 10, 1999 – May 12, 1999 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi all,

has anybody got a working local gfs (without dlocks) on an lvm-volume. After hacking passemble i could manage to activate the pool device, but when i dd from it, all i get is a lvm oops (should never happen ;-)) and my dd hangs :-(. I tried the latest GFS from 08/05/1999.

Any ideas?

Ciao
Klaus

Signature · 6 lines
Klaus Strebel
[email protected]
EIGNER + PARTNER AG   - The Engineering Warehouse Company -
<http://www.ep-ag.com>
-----------------------------------------------------------------------
In Heaven there will be no DOS, no Intel, and above all, no Bill Gates.
#1 lore raw
Quoted 11 lines · Klaus Strebel

Hi all,

has anybody got a working local gfs (without dlocks) on an lvm-volume. After hacking passemble i could manage to activate the pool device, but when i dd from it, all i get is a lvm oops (should never happen ;-)) and my dd hangs :-(. I tried the latest GFS from 08/05/1999.

Any ideas?

Ciao
Klaus

The problem comes from using both pool (a very minimal volume manager) and LVM at the same time. Both pool and LVM need to call their own mapping functions in ll_rw_block(). The mdmod.patch distributed with GFS allows pool to do this, assuming pool is the only volume layer above the actual devices. (LVM also assumes this last I saw.) It is conceivable to enhance the patch to allow a more arbitrary layering of multiple volumes. This would also require changes to LVM to follow the generic mapping suggested by the patch.

However, GFS no longer requires pool if you're not using Dlocks. You can make a GFS filesystem on a logical volume directly by using the nolock locking module and the -l option with mkfs_gfs.

Hope this helps,

Dave Teigland
gfs.lcse.umn.edu

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi Sven,

Quoted 1 line · Sven Rudolph

Sorry: What�s gfs?

GFS (Global File System) is a filesystem for shared disks (ex. Disk-Pool on a Fire-Channel or a shared SCSI-Bus -> one step to storage area networking on linux !).
See <http://gfs.lcse.umn.edu> for details.

Ciao
Klaus

P.S.: Thanks Dave for your quick response. I�ve some trubble with the locking module, it doesn�t find register_lock_proto, unregister_lock_proto, though gfs.o is loaded ? But i think i can work it out ;-).

Signature · 6 lines
Klaus Strebel
[email protected]
EIGNER + PARTNER AG   - The Engineering Warehouse Company -
<http://www.ep-ag.com>
-----------------------------------------------------------------------
In Heaven there will be no DOS, no Intel, and above all, no Bill Gates.
#4 lore raw
Quoted 4 lines

P.S.: Thanks Dave for your quick response. I�ve some trubble with the locking module, it doesn�t find register_lock_proto, unregister_lock_proto, though gfs.o is loaded ? But i think i can work it out ;-).

This problem happens when you enable the "Set version information on all symbols for modules" option under "Loadable module support" when configuring the kernel.

If you enable the option, you need to apply the attached patch and compile GFS with the MODVERSIONS=y switch. (i.e. cd GFS2/bin;make MODVERSIONS=y)

Ken

src/fs/Makefile +8 -0
diff -urN GFS2/src/fs/Makefile GFS2-modversions/src/fs/Makefile
@@ -15,6 +15,10 @@
 
 DEBUG = y
 
+#    If module versions are turned on in the kernel, set this to y
+
+MODVERSIONS = n
+
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
 
@@ -45,6 +49,10 @@
 CFLAGS += -O -g -DDEBUG
 else
 CFLAGS += -O2
+endif
+
+ifeq ($(MODVERSIONS),y)
+CFLAGS += -DMODVERSIONS
 endif
 
 ifeq ($(ARCH),alpha)
src/locking/dlock-0.6/Makefile +9 -0
diff -urN GFS2/src/locking/dlock-0.6/Makefile GFS2-modversions/src/locking/dlock-0.6/Makefile
@@ -16,6 +16,11 @@
 
 DEBUG = y
 
+#    If module versions are turned on in the kernel, set this to y
+
+MODVERSIONS = n
+
+
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
 
@@ -33,6 +38,10 @@
 CFLAGS += -O -g -DDEBUG
 else
 CFLAGS += -O2
+endif
+
+ifeq ($(MODVERSIONS),y)
+CFLAGS += -DMODVERSIONS
 endif
 
 ifeq ($(ARCH),alpha)
src/locking/dlock-0.9.4/Makefile +9 -0
diff -urN GFS2/src/locking/dlock-0.9.4/Makefile GFS2-modversions/src/locking/dlock-0.9.4/Makefile
@@ -16,6 +16,11 @@
 
 DEBUG = y
 
+#    If module versions are turned on in the kernel, set this to y
+
+MODVERSIONS = n
+
+
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
 
@@ -35,6 +40,10 @@
 CFLAGS += -O -g -DDEBUG
 else
 CFLAGS += -O2
+endif
+
+ifeq ($(MODVERSIONS),y)
+CFLAGS += -DMODVERSIONS
 endif
 
 ifeq ($(ARCH),alpha)
src/locking/nolock/Makefile +9 -0
diff -urN GFS2/src/locking/nolock/Makefile GFS2-modversions/src/locking/nolock/Makefile
@@ -16,6 +16,11 @@
 
 DEBUG = y
 
+#    If module versions are turned on in the kernel, set this to y
+
+MODVERSIONS = n
+
+
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
 
@@ -33,6 +38,10 @@
 CFLAGS += -O -g -DDEBUG
 else
 CFLAGS += -O2
+endif
+
+ifeq ($(MODVERSIONS),y)
+CFLAGS += -DMODVERSIONS
 endif
 
 ifeq ($(ARCH),alpha)
src/locking/stupid/Makefile +9 -0
diff -urN GFS2/src/locking/stupid/Makefile GFS2-modversions/src/locking/stupid/Makefile
@@ -16,6 +16,11 @@
 
 DEBUG = y
 
+#    If module versions are turned on in the kernel, set this to y
+
+MODVERSIONS = n
+
+
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
 
@@ -33,6 +38,10 @@
 CFLAGS += -O -g -DDEBUG
 else
 CFLAGS += -O2
+endif
+
+ifeq ($(MODVERSIONS),y)
+CFLAGS += -DMODVERSIONS
 endif
 
 ifeq ($(ARCH),alpha)
src/pool/Makefile +9 -1
diff -urN GFS2/src/pool/Makefile GFS2-modversions/src/pool/Makefile
@@ -20,6 +20,10 @@
 
 DLOCK_VERSION = 3
 
+#    If module versions are turned on in the kernel, set this to y
+
+MODVERSIONS = n
+
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
@@ -37,10 +41,14 @@
   DLOCKVER += -DDLOCK_VERSION=2
 endif
 
+ifeq ($(MODVERSIONS),y)
+  MOD += -DMODVERSIONS
+endif
+
 
 INCLUDE = -I../include -I../../config -I/usr/src/linux/drivers/scsi
 
-CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS) $(DLOCKVER) $(INCLUDE)
+CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS) $(DLOCKVER) $(MOD) $(INCLUDE)
 
 #  These should be changed to the correct flags for your Alpha
 
src/pool/pool_linux.c +4 -0
diff -urN GFS2/src/pool/pool_linux.c GFS2-modversions/src/pool/pool_linux.c
@@ -20,8 +20,12 @@
 *******************************************************************************
 ******************************************************************************/
 
+#define __NO_VERSION__ 
 #define EXPORT_SYMTAB
 #include <linux/module.h>
+#include <linux/version.h>
+char kernel_version [] = UTS_RELEASE;
+
 #include <linux/fs.h>
 #include <linux/types.h>
 #include <linux/malloc.h>