#331 Issue closed: ERROR: FindStorageDrivers called but STORAGE_DRIVERS is empty

Labels: bug

teissler opened issue at 2013-11-18 05:53:

# rear -d -v mkrescue
Relax-and-Recover 1.15 / Git
Using log file: /var/log/rear/rear-audit.log
Creating disk layout
Creating root filesystem layout
ERROR: FindStorageDrivers called but STORAGE_DRIVERS is empty
Aborting due to an error, check /var/log/rear/rear-audit.log for details
You should also rm -Rf /tmp/rear.bie9bgjaPC8bf9H
Terminated

In the logs i found:

2013-11-18 06:46:14.858019540 Including rescue/GNU/Linux/23_storage_and_network_modules.sh
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/block': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/firewire': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/ide': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/ata': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/md': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/message': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/scsi': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/usb/storage': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/crypto': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/virtio': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/xen': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/extra': No such file or directory
find: `/lib/modules/3.8.13-gentoo_20130706-1/weak-updates': No such file or directory
2013-11-18 06:46:14.865580507 Including rescue/GNU/Linux/24_kernel_modules.sh
2013-11-18 06:46:14.868402743 Including rescue/GNU/Linux/25_udev.sh
2013-11-18 06:46:14.870257429 Including rescue/GNU/Linux/26_collect_initrd_modules.sh
2013-11-18 06:46:14.873667609 Including rescue/GNU/Linux/26_storage_drivers.sh
2013-11-18 06:46:14.874871365 ERROR: FindStorageDrivers called but STORAGE_DRIVERS is empty
=== Stack trace ===
Trace 0: /usr/sbin/rear:249 main
Trace 1: /usr/share/rear/lib/mkrescue-workflow.sh:35 WORKFLOW_mkrescue
Trace 2: /usr/share/rear/lib/framework-functions.sh:79 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:40 Source
Trace 4: /usr/share/rear/rescue/GNU/Linux/26_storage_drivers.sh:4 source
Trace 5: /usr/share/rear/lib/linux-functions.sh:106 FindStorageDrivers
Trace 6: /usr/share/rear/lib/_input-output-functions.sh:131 StopIfError
Message: FindStorageDrivers called but STORAGE_DRIVERS is empty

I have a kernel with all storage modules builtin:

# ls -la /lib/modules/3.8.13-gentoo_20130706-1/kernel/drivers/
total 32
drwxr-xr-x 8 root root 4096 Jul  7 00:46 .
drwxr-xr-x 5 root root 4096 Jul  7 00:46 ..
drwxr-xr-x 4 root root 4096 Jul  7 00:46 char
drwxr-xr-x 2 root root 4096 Jul  7 00:46 hwmon
drwxr-xr-x 5 root root 4096 Jul  7 00:46 i2c
drwxr-xr-x 3 root root 4096 Jul  7 00:46 input
drwxr-xr-x 2 root root 4096 Jul  7 00:46 mfd
drwxr-xr-x 2 root root 4096 Jul  7 00:46 net

So the the question is if i have to have storage modules or if there is another way to get rear to work correctly.

gdha commented at 2013-11-18 15:37:

the following page http://thelastmaimou.wordpress.com/2013/07/11/listing-built-in-modules/ gives some useful info to use as a basis for corrective actions.

gdha commented at 2013-11-18 15:48:

The /usr/share/rear/lib/linux-functions.sh contains the code:

FindStorageDrivers() {
        [ "$STORAGE_DRIVERS" ]
        StopIfError "FindStorageDrivers called but STORAGE_DRIVERS is empty"
        {
                while read module junk; do
                        IsInArray "$module" "${STORAGE_DRIVERS[@]}" && echo $module
                done < <(lsmod)
                find ${1:-$VAR_DIR/recovery} -name storage_drivers -exec cat '{}' \;
        } | grep -v -E '(loop)' | sort -u
        # blacklist some more stuff here that came in the way on some systems
        return 0
        # always return 0 as the grep return code is meaningless
}

perhaps we need to do first a built-in check before bailing out?

teissler commented at 2013-11-18 19:42:

One way could be to check if required (storage) modules are builtin and then to ignore the error that there are no storage modules found.

Do you already work on it or should i prepare a patch?
I think i can make it possible within the next 3-4 days if i find spare time :-)

gdha commented at 2013-11-19 07:41:

@morlix Ok go ahead - plenty of other work waiting on my attention ;-)

teissler commented at 2013-11-26 17:43:

Please take a look at pull request #338 which fixes this bug on my systems.

teissler commented at 2013-11-27 12:47:

fixed and closed


[Export of Github issue for rear/rear.]