Bug 150914

Summary: Add ocfs2 support to RHEL4 mount
Product: Red Hat Enterprise Linux 4 Reporter: Manish Singh <manish.singh>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: tao, van.okamura
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-669 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 16:51:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 156322    
Attachments:
Description Flags
Patch against RHEL4's mount
none
Patch to use special mount program for guessed fs types
none
This is a new version of the guessed fs types patch none

Description Manish Singh 2005-03-11 22:58:54 UTC
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 22:58:54 UTC
Created attachment 111909 [details]
Patch against RHEL4's mount

Comment 2 Van Okamura 2005-03-11 23:26:39 UTC
Issue tracker 68424 filed for this.

Comment 3 Manish Singh 2005-03-17 08:26:33 UTC
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 08:27:30 UTC
Created attachment 112080 [details]
Patch to use special mount program for guessed fs types

Comment 5 Karel Zak 2005-03-29 07:53:59 UTC
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 08:13:01 UTC
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 09:35:34 UTC
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 23:38:20 UTC
Created attachment 114070 [details]
This is a new version of the guessed fs types patch

Comment 9 Manish Singh 2005-05-05 23:39:42 UTC
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 11:11:52 UTC
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 07:25:03 UTC
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 06:51:19 UTC
PM ACK for U2.

Comment 16 Karel Zak 2005-07-12 12:30:19 UTC
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 13:21:31 UTC
The patch added to util-linux-2.12p-9.7 FC4 testing update.

Comment 18 Karel Zak 2005-07-15 09:13:26 UTC
Note: I'm going to fix old OCFS support in mount too. It doesn't work with UUID
now. 

there's:

   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 07:25:36 UTC
Testers wanted:

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

  RHEL3-U6:
     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 13:02:22 UTC
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-09-01 00:52:01 UTC
The new packages work for me properly.

Comment 25 Red Hat Bugzilla 2005-10-05 16:51:11 UTC
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.

http://rhn.redhat.com/errata/RHBA-2005-669.html