summaryrefslogtreecommitdiffstats
path: root/Detail.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into devel-3.0NeilBrown2009-02-021-2/+2
|\
| * Fix the used device size in mdadm -D output.NeilBrown2009-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | As get_component_size() returns the number of used sectors of a device we need halve before pringing as K, and shift the value by 9, not 10, before passing to human_size. Thanks to Andre Noll <maan@systemlinux.org> for identifying problem (and a slightly different version of this patch) Signed-off-by: NeilBrown <neilb@suse.de>
* | Create: warn when a metadata format's platform components are missingDan Williams2009-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the metadata handler can not find its platform support components then there is no way for it to verify that the raid configuration will be supported by the option-rom. Provide a generic method for metadata handlers to warn the user that the array they are about to create may not work as intended with a given platform. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | introduce --detail-platform to display platform raid capabilitiesDan Williams2008-12-081-0/+41
| | | | | | | | | | | | | | Metadata formats like imsm work in concert with platform firmware and hardware, so provide a way for mdadm to display this info to the user. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Detail: support MD_DEVNAME in --export for metadata-less devices.NeilBrown2008-11-041-0/+6
| | | | | | | | | | | | | | If there is no metadata (--build was used) then we need to lookup by devnum, not by uuid, to get the map entry. Signed-off-by: NeilBrown <neilb@suse.de>
* | detail: --export also provided MD_DEVNAMENeilBrown2008-11-041-0/+5
| | | | | | | | | | | | | | | | | | | | MD_NAME is the name of the array extracted directly from the metadata. MD_DEVNAME is the current working name of the array. It should appear in /dev/md. It is possibly what the user gave when creating the array. We extract it from /var/run/mdadm/map. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.0NeilBrown2008-10-301-1/+1
|\|
| * Adjust major number testing to allow for extended minor number in 2.6.28NeilBrown2008-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | From 2.6.28, normal md device will be able to have partitions. These partitions will have a different major number. Sometimes mdadm tests the major number and so can get confused. Change these tests to test against get_mdp_major(). mdp does not use extended minor number and so this test will always be accurate. Also use /sys/dev links to map major/minor to devnum in sysfs. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.0NeilBrown2008-10-301-3/+3
|\| | | | | | | | | | | | | | | Conflicts: Incremental.c super0.c super1.c
| * Fix bad metadata formattingDoug Ledford2008-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | Certain operations (Detail.c mainly) would print out the metadata of an array in a format that the scan operation in super0.c and super1.c would later reject as unknown when it was found in the mdadm.conf file. Use a consistent format, but also modify the super0 and super1 match methods to accept the other format without complaint. Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.0NeilBrown2008-10-171-3/+3
|\| | | | | | | | | | | Conflicts: Manage.c
| * Improve reporting of layout for raid10.NeilBrown2008-10-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Showing e.g. near=1, far=2 for the 'far2' layout of raid10 is confusing even though there is a sense in which is it correct. Make it less confusing by only printing whichever number is not 1. If both are 1, make that clear too (i.e. no redundancy).
* | Use common code to report MD_UUID for --detail --exportNeilBrown2008-09-181-2/+10
| | | | | | | | | | | | As we need to be able to extract a UUID from any superblock for matching, use that as the MD_UUID as it will probably be used for array matching too.
* | Report uuid in --detail --brief for ddf and intelNeilBrown2008-09-181-3/+5
| | | | | | | | The uuid is slightly fictitious but needed for array matching.
* | Teach --detail about containers and members there-of.NeilBrown2008-09-181-31/+123
|/ | | | | | | | | | Make --detail on a container more useful by suppressing irrelevant detail and adding useful detail like a list of member arrays. Ditto for members of a container: report the name of the container array. Signed-off-by: NeilBrown <neilb@suse.de>
* Clean up usage of open()Doug Ledford2008-07-241-1/+1
| | | | | | | | Fix on call that passed an invalid mode to open Don't pass a third arg unless we also pass O_CREAT Use symbolic args for 2nd and 3rd args Signed-off-by: Doug Ledford <dledford@redhat.com>
* Add "bitmap=" to "--detail --brief" output when relevant.Neil Brown2008-06-261-0/+8
| | | | | | Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net> for the suggestion. Signed-off-by: Neil Brown <neilb@suse.de>
* add --export option to --examineKay Sievers2008-05-061-1/+1
| | | | | | | From: Kay Sievers <kay.sievers@vrfy.org> Cc: David Zeuthen <david@fubar.dk> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* Fix problems with array.size overflowing on large arrays.Neil Brown2008-04-281-1/+1
| | | | | | | | | | | array.size is 32bits and counts K. So for arrays with more than 4Terrabytes, it can overflow. The correct number can be read from sysfs, but there are still a few places that use array.size and risk truncation. What is worse. they compare a number of kilobytes with a number of sectors !! So use get_component_size() to read the sysfs information, and be more consistent about units.
* Use sysfs info for metadata version info in Detail and elsewhere.Neil Brown2007-12-141-11/+30
|
* Find super from fd on an array.Neil Brown2007-12-141-1/+1
| | | | | We used to use the major/minor numbers, but that isn't sufficient any more, so pass the fd, and possibly check 'text' version.
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-141-18/+16
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-6/+6
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-141-1/+3
| | | | | | As the metadata handler allocates the superblock, it should free it too. DDF will have a more complex 'superblock' which needs more complex freeing.
* Remove spaces/tabs from ends of lines.Neil Brown2007-12-141-6/+6
|
* Add metadata version information to "--detail --brief" output.Neil Brown2007-11-131-1/+4
|
* "--export" segfaults with non-persistent super blocksTim Woods2007-07-231-1/+2
| | | | | | | From: Tim Woods <timwoods@uklinux.net> This patch fixes a NULL pointer dereference in Detail.c when running 'mdadm --detail --export' on a device with non-persistent super blocks.
* Fix compile error in Detail.cNeil Brown2007-05-221-1/+1
| | | | | 'avail' is undefined if '--export', so make sure we don't try to use it.
* Make return code for "--detail --test" more reliable.Neil Brown2007-05-211-4/+14
| | | | Missing devices as well as failed devices cause an error.
* Add --export option to --detail to use key=value pairs.Kay Sievers2007-05-081-2/+14
| | | | | | | | udev likes to get information about a device as key=value pairs so it can create disk/by-id links etc. So add --export flag which causes the output of --detail to easily parsable. From: Kay Sievers <kay.sievers@novell.com>
* Central calls to ioctl BLKGETSIZENeil Brown2006-12-141-12/+2
| | | | Instead of opencoding the same thing everywhere.
* Change 'Device Size' to 'Used Dev Size'Neil Brown2006-12-141-3/+6
| | | | | because it only shows how much of each device is actually used, not how big they are.
* Include homehost information in --detail where appropriate.Neil Brown2006-05-191-2/+2
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Just updaqte copyright dates and email addressNeil Brown2006-05-191-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Detail checks if array has been started or not and includes that in report.Neil Brown2006-05-151-2/+3
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support new offset layout for raid10Neil Brown2006-05-151-3/+5
| | | | | | Requires 2.6.18. Signed-off-by: Neil Brown <neilb@suse.de>
* Reduce dependance on MD_SB_DISKSNeil Brown2006-03-281-1/+1
| | | | | | --monitor should now work with arrays larger than 28 devices. Signed-off-by: Neil Brown <neilb@suse.de>
* Add information about reshape to --detailNeil Brown2006-03-281-2/+38
| | | | | | Also fix problems with dev names and symlinks Signed-off-by: Neil Brown <neilb@suse.de>
* Don't try to get bitmap info on old kernels.Neil Brown2006-03-281-2/+4
| | | | | | | | .. this causes silly warnings. Unfortuantely there are 2.6 kernels which will still produce warnings. We cannot reliable detect those. Signed-off-by: Neil Brown <neilb@suse.de>
* Create missing /dev files where needed.Neil Brown2006-03-281-3/+3
| | | | | | | Whenever we need a device file to open, if one cannot be found in /dev, create a temporary one. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix messy --detail output when there is a failed device.Neil Brown2006-03-281-0/+1
| | | | | | The missing devices show as garbage. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove ident arg from getinfo_super;Neil Brown2006-03-271-2/+1
| | | | | | Add a 'name' field to 'info' to compensate. Signed-off-by: Neil Brown <neilb@suse.de>
* Sort mdstat entries so that composites are well-ordered.Neil Brown2006-01-311-1/+1
| | | | | | | This means that "-Ds" lists arrays in an approprate order for assembly. Signed-off-by: Neil Brown <neilb@suse.de>
* Report device size correctly in --detail for Large devices.Neil Brown2006-01-301-3/+7
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Stuff like..Neil Brown2006-01-301-0/+7
| | | | | | | | | - report Intent Bitmap in --detail - report internal bitmap in --examine - pass' --force through to --grow --bitmap - support v.large arrays in --grow --bitmap Signed-off-by: Neil Brown <neilb@suse.de>
* Support --help --assemble etc.Neil Brown2006-01-301-2/+7
| | | | | | | | | i.e. allow '--help' to be first and still give context sensitive help. Also don't print truncated device-size of very large arrays. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix bug on new --detail codeNeil Brown2005-08-161-0/+2
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Fix --detail output for version 1 superblocks.Neil Brown2005-08-151-8/+26
| | | | | | As raid_disk no longer matches number, we do things differently. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support nameing of version-1 arrays.Neil Brown2005-08-091-1/+2
| | | | | | | --name is recognised in --create and --assemble name= is recognised in config file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add write-behind supportNeil Brown2005-08-091-0/+3
| | | | | | | | Currently this includes --write-behind to set level of write-behind supported --write-mostly to flag devices as write-mostly. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>