Bug 150914 - Add ocfs2 support to RHEL4 mount
Add ocfs2 support to RHEL4 mount
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: util-linux (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
: FutureFeature
Depends On:
Blocks: 156322
  Show dependency treegraph
Reported: 2005-03-11 17:58 EST by Manish Singh
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2005-669
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-05 12:51:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch against RHEL4's mount (3.53 KB, patch)
2005-03-11 17:58 EST, Manish Singh
no flags Details | Diff
Patch to use special mount program for guessed fs types (4.70 KB, patch)
2005-03-17 03:27 EST, Manish Singh
no flags Details | Diff
This is a new version of the guessed fs types patch (4.76 KB, patch)
2005-05-05 19:38 EDT, Manish Singh
no flags Details | Diff

  None (edit)
Description Manish Singh 2005-03-11 17:58:54 EST
The attached patch adds mount by label/uuid for ocfs2 to mount, and
guess fs type support for ocfs/ocfs2. This has been accepted upstream quite a
while ago.

This is effectively bug #132700, but I'm filing a separate bug so it can be
tracked for RHEL4 specifically. We'd like this included soon, for the upcoming
ocfs2 release.
Comment 1 Manish Singh 2005-03-11 17:58:54 EST
Created attachment 111909 [details]
Patch against RHEL4's mount
Comment 2 Van Okamura 2005-03-11 18:26:39 EST
Issue tracker 68424 filed for this.
Comment 3 Manish Singh 2005-03-17 03:26:33 EST
I've made another patch which calls a special mount program for guessed fs types
too. I've also submitted this upstream.
Comment 4 Manish Singh 2005-03-17 03:27:30 EST
Created attachment 112080 [details]
Patch to use special mount program for guessed fs types
Comment 5 Karel Zak 2005-03-29 02:53:59 EST
I don't see your second patch (id=112080, "Patch to use special mount program
for guessed fs types") in upstream code. There is your first patch only. 

Please, can you explain which patch is required add to mount? Thanks.
Comment 6 Manish Singh 2005-03-29 03:13:01 EST
Both are needed for util-linux 2.12a. The second patch I only submitted
recently, so I haven't received a response from the maintainer yet.
Comment 7 Karel Zak 2005-03-30 04:35:34 EST
I would like to see it in upstream and our devel (FC4) branch first. Don't
forget it's new feature and RHEL3|4 is already stable and we prefer bugfixes there.
Comment 8 Manish Singh 2005-05-05 19:38:20 EDT
Created attachment 114070 [details]
This is a new version of the guessed fs types patch
Comment 9 Manish Singh 2005-05-05 19:39:42 EDT
I just resubmitted the new patch to upstream. The maintainer seems AWOL.

Has any of this gone into FC4?
Comment 10 Karel Zak 2005-05-06 07:11:52 EDT
You're right, util-linux upstream seems pretty inactive... It seems that we will
have to add it to the code without upstream. 

Now, in FC4 is your first patch (comment #1) only.

BTW, in your second patch should be:

  mnt5_res = guess_fstype_and_mount(....);

  if (special) {
       block_signals (SIG_UNBLOCK);            <-----
       return status;       

The rest of your patch looks good.
Comment 11 Karel Zak 2005-05-24 03:25:03 EDT
My plan: after FC4 GA release I will add the second patch to separate util-linux
FC4 "testing" update. If I won't found any problem we can add it directly to FC4
and RHEL3/4. It's probably good way how we can test it. 
Comment 12 Marty Wesley 2005-05-26 02:51:19 EDT
PM ACK for U2.
Comment 16 Karel Zak 2005-07-12 08:30:19 EDT
Released FC3 (testing) update with OCFS2 support: util-linux-2.12a-24.4. The
package contains both patches. The code in FC3 is almost same like in RHEL4 so
it's better for tests that FC4.

In FC4 the mount uses libblkid (from e2fsprogs package) instead
mount_guess_fstype.c -- it means the patch from comment #1 is useless in FC4 and
also very probably in the future RHEL releases. 

Manish, can you check e2fsprogs-1.37/lib/blkid/probe.c where is ocfs2 detection
code for FC4? Thanks.
Comment 17 Karel Zak 2005-07-14 09:21:31 EDT
The patch added to util-linux-2.12p-9.7 FC4 testing update.
Comment 18 Karel Zak 2005-07-15 05:13:26 EDT
Note: I'm going to fix old OCFS support in mount too. It doesn't work with UUID


   struct ocfs_volume_label {
        u_char  disk_lock[48];
        u_char  label[64];
        u_char  label_len[2];

should be:

   struct ocfs_volume_label {
        unsigned char   disk_lock[48];
        unsigned char   label[64];
        unsigned char   label_len[2];
        unsigned char   vol_id[16];
        unsigned char   vol_id_len[2];
Comment 20 Karel Zak 2005-08-31 03:25:36 EDT
Testers wanted:

     version:   util-linux-2.12a-16.EL4.11
     test pkgs: http://people.redhat.com/kzak/util-linux/ocfs2/RHEL4-U2/

     version:   util-linux-2.11y-31.10
     test pkgs: http://people.redhat.com/kzak/util-linux/ocfs2/RHEL3-U6/

Thanks for arbitrary feedback :-)
Comment 21 Karel Zak 2005-08-31 09:02:22 EDT
I can confirm that the mount command with the patch correctly detects OCFS2
filesystem and found device by filesystem label:

  # mkfs.ocfs2 -q -L ORATEST /dev/loop0
  # mount -L ORATEST mnt
  ocfs2_hb_ctl: Unable to access cluster service while starting heartbeat

  (note that I don't have running cluster service)

Old version:
  # mount -L ORATEST mnt
  mount: no such partition found

Comment 22 Manish Singh 2005-08-31 20:52:01 EDT
The new packages work for me properly.
Comment 25 Red Hat Bugzilla 2005-10-05 12:51:11 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.