Commit Graph

11 Commits

Author SHA1 Message Date
Brian Behlendorf e7b3766a69 Remove udev dependency when running in-tree
After much contemplation I can't see a clean way to use udev entirely
in-tree for testing.  This patch removed a horrible horrible hack which
would copy the needed udev bits in to place on your system to make it
work.  That however is simply not acceptable, nothing you in in-tree
should ever ever ever install something on your system.

Since I could not come up with a clean way to use udev in-tree.  The
fix is to simply parse the zdev config file and create the needed
symlinks in a sub-diretory or your working tree.  This is not as clean
as using udev but it does work perfectly well for in-tree testing.
2010-03-11 13:56:20 -08:00
Ricardo M. Correia 4853ac3d53 Fix scripts to work when invoked from other directories. 2010-03-09 14:50:15 -08:00
Brian Behlendorf 7df02c0f57 Split the udev rule from a specific configuration
While I completely agree the udev is the lesser of many possibles
evils when solving the device issue... it is still evil.  After
attempting to craft a single rule which will work for various
versions of udev in various distros.  I've come to the conclusion
the only maintainable way to solve this issue is to split the rule
from any particular configuration.

This commit provides a generic 60-zpool.rules file which use a
small helper util 'zpool_id' to parse a configuration file by
default located in /etc/zfs/zdev.conf.  The helper script maps
a by-path udev name to a more friendly name of <channel><rank>
for large configurations.

As part of this change all of the support scripts why rely on
this udev naming convention have been updated as needed.  Example
zdev.conf files have also been added for 3 different systems by
you will always need to add one for your exact hardware.

Finally, included in these changes are the proper tweaks to the
build system to ensure everything still get's packaged properly
in the rpms and can run in or out of tree.
2010-03-01 16:51:21 -08:00
Brian Behlendorf e0aff96a14 Use udevadm if available otherwise use udevtrigger/udevsettle
Moving forward udevadm {trigger/settle} replaced udevtrigger/udevsettle
as the correct interface to use.  However, since we need to work in
both environments for testing check and see if udevadm is available.
If it is then use it.  If it is not fall back to the legacy interface.
2010-01-08 10:20:03 -08:00
Brian Behlendorf 5bf14d3400 Update zpool-configs to be udev aware.
To simplify creation and management of test configurations the
dragon and x4550 configureis have been integrated with udev.  Our
current best guess as to how we'll actually manage the disks in
these systems is with a udev mapping scheme.  The current leading
scheme is to map each drive to a simpe <CHANNEL><RANK> id.  In
this mapping each CHANNEL is represented by the letters a-z, and
the RANK is represented by the numbers 1-n.  A CHANNEL should
identify a group of RANKS which are all attached to a single
controller, each RANK represents a disk.  This provides a nice
mechanism to locate a specific drive given a known hardware
configuration.  Various hardware vendors use a similar scheme.

A nice side effect of these changes is it allowed me to make
the raid0/raid10/raidz/raidz2 setup functions generic.  This
makes adding new test configs easy, you just need to create
a udev rules file for your test config which conforms to the
naming scheme.
2009-10-21 11:38:51 -07:00
Brian Behlendorf 0efea24e73 Add zconfig.sg test script.
This is an initial script for validation of zfs/zpool configuration.
For now there is only one test here to ensure that /etc/zfs/zpool.cache
is being updated properly from the kernel module.  Additional tests
should be added, I believe Richardo said there was an existing test
suite out there which validated the behavior of many zpool/zfs commands.
It would be nice to add that as appropriate.
2009-10-01 16:55:34 -07:00
Brian Behlendorf 4f555da51d Add zfs-test package which includes test infrastructure.
This change extends the existing in-tree test infrastructure such
that it can also be run as part of a the installed package.  This
simplifies testing on multiple systems and is generally all around
useful.  The scripts may still be run in-tree and will use the
in-tree build products as long as .script-config exists.
2009-08-17 21:35:06 -07:00
Brian Behlendorf 710c21f2e9 Use LOSETUP variable for all calls to /sbin/losetup 2009-07-24 10:25:01 -07:00
Brian Behlendorf b9c3c7a2f4 The losetup -f option is unavailable for SLES10 use unused_loop_device()
SLES10 ships util-linux-2.12r-35.30 which does not support the -f option
to losetup.  To avoid this problem the unused_loop_device() function was
added which attempts to find an unused loop device by checking each
/dev/loop* device with losetup to see if it is configured.
2009-07-21 16:17:54 -07:00
Brian Behlendorf 89ed048230 Minor script updates almost ready to test 2009-01-16 13:25:47 -08:00
Brian Behlendorf b38eb997f4 Update helper scripts to me more helpful 2009-01-16 12:06:25 -08:00