Commit Graph

127 Commits

Author SHA1 Message Date
Neil Brown 047d2e49f5 Correct unit conversion for component_size and dev/size in sysfs.
These are both Kilobytes, so do the conversion to sectors properly.
2008-07-12 20:28:38 +10:00
Neil Brown f94d52f43e Handle device removal from container
This really should be done in mdadm, not mdmon.
We ensure the device won't be suddenly commited as a hot-spare
using O_EXCL, then check the 'holders' sysfs directory
to make sure it is only in use once.
2008-07-12 20:27:40 +10:00
Neil Brown b8ac196795 Remove 'major' from superswitch.
It isn't generally meaningful.
2008-07-12 20:27:37 +10:00
Dan Williams f1665f7200 sysfs: helper routine to retrieve the scsi id
imsm records this information in its metadata

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-06-13 17:27:30 -07:00
Dan Williams 90c8b70714 sysfs: provide a helper function for locating scsi_generic interfaces
imsm records and validates this data in its metadata

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-06-13 17:27:30 -07:00
Neil Brown 7e1432fb14 Add DDF code for activate_spare
Plus various bug fixes etc.
2008-06-12 10:13:32 +10:00
Neil Brown 3cb07116bb Don't ignore errors in sysfs_add_disk.
i.e. if the add fails, don't add the device to the internal data
structures.
2008-06-12 10:13:19 +10:00
Neil Brown ea6d09b063 'errno' is a positive number, not negative.
I've been living in the kernel too long ;-)
2008-05-27 09:18:35 +10:00
Neil Brown 355726fa01 Remember to close directories when we are finished with them. 2008-05-27 09:18:34 +10:00
Neil Brown 2318b9f0dc Remove 'fd' arg from sysfs_add_disk
It it never used, and removing means there are several 'open's that can
go.
2008-05-27 09:18:32 +10:00
Neil Brown 549e9569c6 Merge mdmon 2008-05-15 16:48:37 +10:00
Dan Williams 0fd5c350e5 set resync_start in Incremental_container
From: Dan Williams <dan.j.williams@intel.com>

Metadata handlers set mdinfo.resync_start depending on the state of the
array.  By default mdadm assumes the array is dirty and needs a full
resync.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-05-15 16:48:33 +10:00
Neil Brown 2f6079dc96 Create a container member
From: Neil Brown <neilb@suse.de>
2008-05-15 16:48:21 +10:00
Neil Brown 2503d23b5a More ddf stuff 2008-05-15 16:48:17 +10:00
Neil Brown ea24acd073 Compiple fixes for mdassemble and diet-libc 2008-05-15 15:50:56 +10:00
Neil Brown 294d6f450f Recent change broken handling of metadata-less arrays.
In particular, failing a device would give a silly
error message.
2008-05-15 15:50:47 +10:00
Neil Brown 142cb9e181 Use sysfs info for metadata version info in Detail and elsewhere. 2007-12-14 20:15:21 +11:00
Neil Brown 7e0f69790c Replace sysarray with mdinfo
Sure, mdinfo is bigger, but having a uniform structure for lots of things
will make life easier.
2007-12-14 20:14:59 +11:00
Neil Brown 06c7f68e40 Use 'mdinfo' instead of special 'sysdev' structure.
there is needless duplicatiion between mdinfo and sysdev, so discard
the latter.
2007-12-14 20:14:57 +11:00
Neil Brown 2faf1f5f63 Make sure sysfs_read never succeeds for a non-MD device.
... just in case.
2007-12-14 20:13:51 +11:00
Neil Brown 8382f19bdc Add new mode: --incremental
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
2006-12-21 17:10:52 +11:00
Neil Brown 37dfc3d638 When resync finished, report the mismatch count if there is one.
This doesn't get mailed out, but will appear in syslog...
Maybe it should be mailed if it was a 'check' or 'repair' pass...
2006-12-14 17:31:25 +11:00
Neil Brown 758d3a8e7d Increase raid456 stripe cache size if needed to --grow the array.
The setting used unfortunately requires intimate knowledge of the
kernel, and it not reset when the reshape finishes.
2006-12-14 17:31:16 +11:00
Neil Brown 8686f3ed06 Fix problem with sector/KB size confuision for bitmap sizing.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 03:57:53 +00:00
Neil Brown 7fa42a0b5e [PATCH] Get the name for partitioned devices in sysfs correct.
There are 64 partitions per device, not 16.

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./sysfs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff ./sysfs.c~current~ ./sysfs.c
2006-04-28 14:09:24 +10:00
Neil Brown 353632d927 Support restarting of a reshape on --assemble
Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-20 03:17:31 +00:00
Neil Brown e86c9dd6d8 Initial reshape support
Needs work for other levels etc.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-13 05:51:32 +00:00