Bug 658076 - [EMC 6.1 bug] open-fcoe with Intel mezz card, auto mount by _netdev is not working
[EMC 6.1 bug] open-fcoe with Intel mezz card, auto mount by _netdev is not wo...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: fcoe-utils (Show other bugs)
6.0
Unspecified Linux
high Severity high
: rc
: 6.1
Assigned To: Petr Šabata
Red Hat Kernel QE team
: OtherQA
Depends On:
Blocks: 635490
  Show dependency treegraph
 
Reported: 2010-11-29 04:31 EST by ling_lan
Modified: 2011-05-19 10:20 EDT (History)
23 users (show)

See Also:
Fixed In Version: fcoe-utils-1.0.14-17.el6
Doc Type: Bug Fix
Doc Text:
Cause It might take longer for FCoE partitions to be discovered by the system. Consequence Some FCoE partitions may not be mounted after boot. Fix Wait for _netdev FCoE partitions to appear during boot (with default timeout of 65 seconds) Result FCoE partitions get discovered and mounted during the boot in most cases.
Story Points: ---
Clone Of:
Environment:
open-fcoe
Last Closed: 2011-05-19 10:20:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
FCoE configuration and initscript devices scan patch (1.16 KB, patch)
2011-01-19 10:10 EST, Petr Šabata
no flags Details | Diff
fcoe-utils-1.0.14-15.el6 patch (1.17 KB, patch)
2011-02-01 11:09 EST, Petr Šabata
no flags Details | Diff
fcoe-utils-1.0.14-17.el6 patch (1.19 KB, patch)
2011-02-01 11:55 EST, Petr Šabata
no flags Details | Diff

  None (edit)
Description ling_lan 2010-11-29 04:31:18 EST
Description of problem:
open-fcoe with Intel mezz card, auto mount by _netdev is not working

Version-Release number of selected component (if applicable):
[root@sgellin133 ~]# uname -r
2.6.32-71.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1.Configure open-fcoe with intel mezz card, and attach devices to host
2.partition and make filesystem on the device, and create mount point
3.Edit /etc/fstab file to configure auto mount by _netdev option
  
Actual results:
After host reboot, the partition was not mounted

Expected results:
After host reboot, the partition should be mounted

Additional info:
[root@sgellin133 ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Nov 18 14:54:31 2010
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_sgellin133-lv_root /                       ext4    defaults                                                                                                         1 1
UUID=3717d7fc-fb48-4f0c-9915-470e05f83e9d /boot                   ext4    defaul                                                                                                 ts        1 2
/dev/mapper/vg_sgellin133-lv_home /home                   ext4    defaults                                                                                                         1 2
/dev/mapper/vg_sgellin133-lv_swap swap                    swap    defaults                                                                                                         0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/mapper/mpathwp1  /mnt/test     ext2   _netdev 0 0
Comment 2 Andrius Benokraitis 2010-11-29 10:20:46 EST
Ron/Russ - please include the right Intel folks ASAP, thanks!

Also, EMC - which Intel driver/device are you seeing this on? ixgbe?
Comment 3 Jack Morgan 2010-11-29 12:20:54 EST
This should be resolved with Bug 638291. I verified this isn't in RHEL6.0 but since this is just a documented fix, you can review the original patch at http://www.open-fcoe.org/openfc/gitweb, patch title is "fcoe-utils: adds an example script code with detail to mount fcoe disk/s at startup" with gitid 	2229ec010706e081a4f4429f69a3b6a373e6844a
Comment 4 Wayne Berthiaume 2010-11-30 10:00:46 EST
Thanks Jack.

This is all well and good, but a user should not have to edit the start script to add this simple functionality. It should already exist just like in iSCSI. 

Hello Red Hat.

Will this functionality go into RHEL 6.1?

Regards,
Wayne.
Comment 5 Neil Horman 2010-12-06 10:25:53 EST
seems like this is a user space issue, fixing component to match that of bz 638291 as suggested in comment 3
Comment 6 Petr Šabata 2010-12-16 05:20:12 EST
I believe this should be handled by the netfs initscript, CC'ing Bill.
Comment 7 Bill Nottingham 2010-12-16 12:49:19 EST
No, the fcoe script should start, and ensure the devices are available; netfs should then mount without any additional changes needed.
Comment 13 Petr Šabata 2011-01-19 10:10:08 EST
Created attachment 474293 [details]
FCoE configuration and initscript devices scan patch

This patch is based on the current recommendation for automatic FCoE LUN mounting. The initscript now waits for a configurable time during the boot for the devices to appear, giving netfs script a chance to mount FCoE LUNs.
Comment 16 Jack Morgan 2011-01-31 21:06:41 EST
This script works, but only when the entry in fstab is /dev/disk/by-path. The script should allow use of all persistent drive naming mechanisms: by-id, by-path, by-uuid.

The default /etc/fcoe/config WAIT_TIMEOUT period of 20 seconds, which is a time period that the script waits while looking for the fstab _netdev device to become available on the fcoe interface, had to be increased to 65 seconds to get a reliable mount every boot.
Comment 17 Petr Šabata 2011-02-01 05:15:29 EST
(In reply to comment #16)
> This script works, but only when the entry in fstab is /dev/disk/by-path. The
> script should allow use of all persistent drive naming mechanisms: by-id,
> by-path, by-uuid.

This is based on current FCoE automatic LUN mounting guidelines and only possible way to decide if this is an FCoE device or not in situations when the node is not yet available.

> The default /etc/fcoe/config WAIT_TIMEOUT period of 20 seconds, which is a time
> period that the script waits while looking for the fstab _netdev device to
> become available on the fcoe interface, had to be increased to 65 seconds to
> get a reliable mount every boot.

Okay, I'll increase the default timeout.
Comment 18 Petr Šabata 2011-02-01 11:09:31 EST
Created attachment 476433 [details]
fcoe-utils-1.0.14-15.el6 patch
Comment 19 Petr Pisar 2011-02-01 11:39:05 EST
The init script is interpreted by /bin/sh. I'm not sure POSIX shell offers `let' built-in.
Comment 20 Petr Šabata 2011-02-01 11:55:48 EST
Created attachment 476449 [details]
fcoe-utils-1.0.14-17.el6 patch

Petr,

thanks for looking at this. I'm not sure either; changed the patch a little to fix that.
Comment 22 Chris Ward 2011-04-06 07:05:37 EDT
~~ Partners and Customers ~~

This bug was included in RHEL 6.1 Beta. Please confirm the status of this request as soon as possible.

If you're having problems accessing 6.1 bits, are delayed in your test execution or find in testing that the request was not addressed adequately, please let us know.

Thanks!
Comment 23 ling_lan 2011-04-08 04:24:10 EDT
Hi, tested with RHEL6.1 snapshot2, issue fixed. Thanks
Comment 24 Jack Morgan 2011-04-13 15:28:50 EDT
Intel Has also verified this fix. Thanks
Comment 25 Miroslav Vadkerti 2011-04-18 06:26:29 EDT
Doing SanityOnly testing:
+ fcoe-utils-1.0.18-1.el6 available in RHEL6.1-20110413 (Snap 4)
+ All available RHTS tests pass:
/CoreOS/fcoe-utils/Regression/bz503165-running-fcoeadm-before-loading-fcoe-stack-tracebacks
/CoreOS/fcoe-utils/Regression/bz645796-not-dependent-on-vconfig
/CoreOS/fcoe-utils/Regression/bz619604-fcoe-utils-enabled-in-2345-by-default
/CoreOS/fcoe-utils/Sanity/init-scripts-LSB
/CoreOS/fcoe-utils/Sanity/long-form-options
+ Rebuild without issues
Patched code found in init script:
start()
{
    echo -n $"Starting FCoE initiator service: "

    modprobe -q libfc
    modprobe -q -a $SUPPORTED_DRIVERS

    daemon --pidfile ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS}

    echo
    touch /var/lock/subsys/fcoe

    # Wait for the _netdev devices
    if [ "$WAIT_TIMEOUT" = "" ]; then
        WAIT_TIMEOUT=65
    fi
    local donewait=1
    local devs=($(egrep 'by-path\/fc-.*_netdev' /etc/fstab | cut -d ' ' -f1))
    if [ "$devs" != "" ]; then
        echo -n "Waiting for FCoE devices . "
        while [ $WAIT_TIMEOUT -gt 0 ]; do
            for disk in ${devs[*]}; do
                if ! test -b $disk; then
                    donewait=0
                    break
                fi
            done
            test $donewait -eq 1 && break;
            sleep 1
            echo -n ". "
            donewait=1
            WAIT_TIMEOUT=$(($WAIT_TIMEOUT-1))
            done
        if [ "$WAIT_TIMEOUT" -eq 0 ]; then
            echo "timed out!"
        else
            echo "done!"
        fi
    fi

    echo
}
Comment 26 Petr Šabata 2011-05-09 10:01:38 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    It might take longer for FCoE partitions to be discovered by the system.
Consequence
    Some FCoE partitions may not be mounted after boot.
Fix
    Wait for _netdev FCoE partitions to appear during boot (with default
    timeout of 65 seconds)
Result
    FCoE partitions get discovered and mounted during the boot in most cases.
Comment 27 errata-xmlrpc 2011-05-19 10:20:16 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 therefore 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-2011-0743.html

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