"Fossies" - the Fresh Open Source Software Archive

Member "open-fcoe-3.19/fcoe-utils/README" (15 Apr 2015, 2682 Bytes) of package /linux/misc/open-fcoe-3.19.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1                   FCoE Management Tools Installation Guide
    2                   ========================================
    3 
    4 The FCoE Management Tools included in this package are
    5 
    6         fcoeadm - program to create, reset, destroy, and display FCoE interfaces
    7         fcoemon - program to monitor the events from the DCB daemon
    8 
    9 Requirements:
   10 
   11         The HBAAPI library and the HBAAPI vendor library source must be built
   12 and installed before you can build the management tools. Both the HBAAPI library,
   13 libHBAAPI, and the HBAAPI vendor library, libhbalinux, may be downloaded from
   14 www.Open-FCoE.org. The instructions in the package describe how to download and
   15 build the libraries.
   16 
   17 Best Practices :
   18 
   19 Any newly discovered disk can be mounted using udev rules, autofs and possibly by
   20 other methods as needed. However, if a fcoe disk is needed by any other system service
   21 that follows the fcoe service then the disk will need to be mounted at some point
   22 after the fcoe service, but before the service that requires the disk. That mounting
   23 could possibly be added to the fcoe service script itself, or to a new service script
   24 that would run after fcoe, but before the script that requires the fcoe disk.
   25 The following is an example of how to mount a fcoe disk formatted with an ext3 file
   26 system using /etc/fstab.
   27 
   28 	mount_fcoe_disks_from_fstab()
   29 	{
   30 	    local timeout=20
   31 	    local done=1
   32 	    local fcoe_disks=($(egrep 'by-path\/fc-.*_netdev' /etc/fstab | cut -d ' ' -f1))
   33 
   34 	    test -z $fcoe_disks && return 0
   35 
   36 	    echo -n "Waiting for fcoe disks . "
   37 	    while [ $timeout -gt 0 ]; do
   38 		for disk in ${fcoe_disks[*]}; do
   39 			if ! test -b $disk; then
   40 				done=0
   41 				break
   42 			fi
   43 		done
   44 
   45 		test $done -eq 1 && break;
   46 		sleep 1
   47 		echo -n ". "
   48 		done=1
   49 		let timeout--
   50 	    done
   51 
   52 	    if test $timeout -eq 0; then
   53 		echo "timeout!"
   54 	    else
   55 		echo "done!"
   56 	    fi
   57 
   58 	    # mount any newly discovered disk
   59 	    mount -a 2>/dev/null
   60 	}
   61 
   62 	The mount_fcoe_disks_from_fstab function should be invoked after the
   63 fcoemon daemon is started by the fcoe service script to mount any fcoe disk
   64 specified by path in /etc/fstab as:-
   65 
   66 	/dev/disk/by-path/fc-0xXX:0xXX /mnt/fcoe-disk1 ext3  defaults,_netdev    0 0
   67 	/dev/disk/by-path/fc-0xYY:0xYY /mnt/fcoe-disk2 ext3  defaults,_netdev    0 0
   68 
   69 	The /dev/disk/by-path entries with "fc-" and "_netdev" in their names
   70 enables mount_fcoe_disks_from_fstab to identify the fcoe disks so that it can
   71 wait for the fcoe disks to be discovered. If they are not added to the system
   72 within the timeout period the function will exit, the timeout is set to 20
   73 seconds but can be changed to suit the environment. See man fstab(5) for for
   74 more details on mounting filesystems.