[ovirt-devel] GFS2 mount via symlink problem

Enrico Tagliavini enrico.tagliavini at gmail.com
Thu May 8 11:15:15 UTC 2014


Hi,

this issues i described on Red Hat bugzilla entry #888711 [1], but
I'll recap here since there is come confusion (mostly my fault,
sorry!) in the bug.

System setup:
 CentOS 6.5 fully up to date
 SGI IS5000 SAS storage with 2 servers connected
 oVirt is 3.4.0
 The Storage configured in oVirt is PosixFS, vfs type is gfs2
 gfs2 is on top of CLVM
 Red Hat Cluster Manager (cman) is used to manage CLVM

The issue is summarized by:
[root at fionn-virt1 ~]# grep virtstorage /etc/fstab
/dev/mapper/vg_is5000-lv_virtstorage    /gfs2/virtstorage       gfs2
 noatime,nodiratime,nobarrier    0 0
[root at fionn-virt1 ~]# grep virtstorage /proc/mounts
/dev/dm-13 /gfs2/virtstorage gfs2
rw,seclabel,noatime,nodiratime,hostdata=jid=0,nobarrier 0 0
/dev/dm-13 /rhev/data-center/mnt/_dev_mapper_vg__is5000-lv__virtstorage
gfs2 rw,seclabel,noatime,nodiratime,hostdata=jid=0,nobarrier 0 0
[root at fionn-virt1 ~]# grep virtstorage /etc/mtab
/dev/mapper/vg_is5000-lv_virtstorage /gfs2/virtstorage gfs2
rw,seclabel,noatime,nodiratime,hostdata=jid=0,nobarrier 0 0
/dev/mapper/vg_is5000-lv_virtstorage
/rhev/data-center/mnt/_dev_mapper_vg__is5000-lv__virtstorage gfs2
rw,seclabel,noatime,nodiratime,hostdata=jid=0,nobarrier 0 0

The storage is mounted twice, first by the gfs2 init script and then
by ovirt. As you can see even if both ovirt and gfs2 init script used
the /dev/mapper/name symlink, in proc mounts there is the real device
specified, the one the symlink is pointing to.

I have no clue why only GFS2 does that (at least ext* FS are not,
didn't checked anything else TBO, I have only ext* FS on other LVM
volumes on the same system).

In this case oVirt fails to check if the FS is mounted, since there is
no entry in /proc/mounts matching the device name specified (the
/dev/mapper/name one). I my example above I already applied a fix for
that, so it is actually working.

I've submitted a fix to ovirt gerrit, see [2], [3] and [4] (the latter
is a unit test for checking gfs2). Note that [2] alone is not correct,
it needs [3] as well to not break some other setup.

Dan Kenigsberg of Red Hat suggested to move the discussion here, since
this is a weird issue (why just GFS2 resolves the symlink?). I'm
looking for advise, comments to the fix I proposed, but also about if
this is actually the better fix? Like fixing GFS2 in the first place.

That said I still think this should be handled by ovirt. It doesn't
really matter if in /proc/mounts you have the symlink or the real
device, it is the same mount

Kind regards
Enrico

[1] https://bugzilla.redhat.com/show_bug.cgi?id=888711
[2] http://gerrit.ovirt.org/27321
[3] http://gerrit.ovirt.org/27425
[4] http://gerrit.ovirt.org/27514



More information about the Devel mailing list