Commit Graph

174 Commits

Author SHA1 Message Date
Neil Brown b7a708af6f Fixed UUID printing in "--detail --brief" for version1 metadata. 2006-11-09 16:28:27 +11:00
Neil Brown 60e1bc1a33 Fixed problems that could cause infinitel loop with auto assemble.
If an auto-assembly attempt failes because the array cannot be
opened or because the array has already been created, then we
get into an infinite loop.

Reported-by: Dan Pascu <dan@ag-projects.com>
Fixes-debian-bug: 396582
2006-11-09 09:38:50 +11:00
Goswin Brederlow 2790ffe38a Document that the default metadata version can be overridden in config file.
From: Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>

This is already mentioned in the config documentation, but not in the
place when the normal default is mentioned.

Fixes-debian-bug: 396914
2006-11-09 09:37:45 +11:00
Neil Brown d87d0978e2 Strdup the bitmap file name found in the config file
Otherwise we quickly lose it...
2006-11-09 09:37:10 +11:00
Neil Brown 209b742f4d Release 2-5-5 2006-11-03 14:52:28 +11:00
Neil Brown cbfbcb0b50 Improve error message when wrong --update option is given. 2006-10-23 08:56:27 +10:00
Neil Brown 702b557b1c Fix bugs related to raid10 and the new offset layout.
Need to mask of bits above the bottom 16 when calculating number of
copies.
2006-10-19 16:38:29 +10:00
Luca Berra 1cac4c1b55 Don't trigger and error on -As if all arrays are already started.
From: Luca Berra <bluca@comedia.it>

Put another way, if we find any active arrays, then assume things are
going as planned.
2006-10-16 15:27:48 +10:00
Luca Berra e60c27d04e Don't fail md_open if array already active.
From: Luca Berra <bluca@comedia.it>

There is no need and it causes occasional problems.
2006-10-16 15:27:16 +10:00
Luca Berra 435d4ebb2e Mdassemble improvements
From: Luca Berra <bluca@comedia.it>

- Fix a bug where mdassemble didn't close a filedescriptor and so couldn't assembele
  stacked arrays.
- Allow mdassemble, when run a second time, to mark all arrays as writable.
  This is useful if they are started read-only as is best at boot-time.
2006-10-16 15:26:53 +10:00
Neil Brown b39827de21 Reduce max bitmap size when bitmap is in a file.
To ensure kernel never needs to allocate more than 1 page contiguously.
2006-10-16 15:26:43 +10:00
Neil Brown 0a816ef9fb Don't #include blkpg.h
Just include the content directly.  It is safer.
2006-10-16 14:38:13 +10:00
Neil Brown 8e64e04456 Release 2-5-4 2006-10-13 10:12:47 +10:00
Neil Brown 0430ed4868 Remove partitions from components of an md array
They do nothing but cause confusion.
2006-10-13 09:02:35 +10:00
Neil Brown 6ba83b5f5e Allow a number after --auto=yes
So if the device name is /dev/md/d0, then the number of
partitions is as given.  This is useful in 'CREATE' in
mdadm.conf
2006-10-13 08:23:16 +10:00
Paul Clements 10ae45c12c Fixed endian problem with bitmap metdata
From: Paul Clements <paul.clements@steeleye.com>
2006-10-09 11:17:22 +10:00
Neil Brown 83205b6419 Fix some endian-ness issues with v1 superblocks. 2006-10-09 11:17:12 +10:00
Neil Brown 38098016ca Allow symlink creation to be disabled from command line or mdadm.conf 2006-08-11 18:00:05 +10:00
Neil Brown 60248f7433 Tidyup automatic name choice for v-1 arrays
/dev/md_d0 now becomes '0', not '_d0'.
2006-08-07 11:30:02 +10:00
Neil Brown 43f2372a03 Fix starting of degraded arrays.
Recent change broke assembling of degraded arrays, making
it require --run.  This fixes that.
2006-08-07 11:13:01 +10:00
Neil Brown 90fc992e4e Explicitly state GPL license in man pages. 2006-08-07 11:12:25 +10:00
Neil Brown 2a940e3619 Document usage of version0.91 superblock. 2006-08-07 11:11:42 +10:00
Neil Brown 2a91e1491e Release 2.5.2
Description...
2006-06-27 21:31:58 +10:00
Neil Brown 8aec876d2e More consistent honoring of --configfile
Never use /etc/mdadm.conf if --config file is given (previously
some code used one, some used the other).
2006-06-26 15:11:01 +10:00
Neil Brown 45e878bba6 Improve ftw handling.
If not 'ftw' is available, still allow openning of devices by dev number.

More recent version of uclibc support nftw, so add support to check
for that.
2006-06-26 15:10:48 +10:00
Neil Brown 08110d41bc Fix a recently introduced bug, and make --assemble more resilient to it.
Make -assemble a bit more resilient to finding strange
 information in superblocks.
Don't claim newly added spares are InSync!! (don't know why that
 code was ever in there)
2006-06-26 12:26:12 +10:00
Neil Brown 7eae7080e2 Work around bug in --add handling for version-1 superblocks
In 2.6.17 (and prior), the dev_number is ignored when a device
is added to an active array.  Rather the first free number is used.
So we work around this by making sure we use the first free
number for dev_number.

Description...
2006-06-26 12:26:09 +10:00
Neil Brown c3684618b7 Add 'Array Slot' line to --examine for version-1 superblocks
to make it a bit easier to see what is happening.
2006-06-26 12:26:01 +10:00
Neil Brown ae184b4927 Get the changelog uptodate for recent changes. 2006-06-26 12:06:01 +10:00
Neil Brown 82d8a04691 Update Changelog for 2.5.1 2006-06-16 10:53:55 +10:00
Neil Brown 41a3b72a9c Release 2.5
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-26 07:12:48 +00:00
Neil Brown b8a8ccf945 New flag --no-degraded
Use to avoid starting arrays if there are
fewer devices available than last time the array was started.
This is only needed with --scan, as with --scan, that behaviour
is the default.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-19 04:53:22 +00:00
Neil Brown 008e1100b8 Add a copy of /proc/mdstat to the mail message send by mdadm --monitor.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-19 03:58:45 +00:00
Neil Brown 8131b493df When updating uuid, update the bitmap as well - external bitmaps
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-16 06:05:27 +00:00
Neil Brown 120230a4fc Detail checks if array has been started or not and includes that in report.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 06:03:05 +00:00
Neil Brown 5bbb48424b Allow default creation info to to be stored in mdadm.conf
Default owner, group, mode and 'auto' flag can be given in a 'CREATE' line.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 06:02:41 +00:00
Neil Brown 1bfdbe01ff Limit size of bitmap to 2million chunks.
When creating a file bitmap, choose a default size that
results in fewer than 2^21 chunks.  Without this kmalloc
failure in the kernel becomes likely.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 04:21:33 +00:00
Neil Brown b578481ca3 Support new offset layout for raid10
Requires 2.6.18.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 02:46:54 +00:00
Neil Brown a99d6b669c Assume "DEVICE partitions" if no DEVICE line present.
This means the output of "mdadm -Es" can be used as a complete
mdadm.conf file .... if you really want to do that.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 01:58:47 +00:00
Neil Brown d1732eebac Arrange that SparesMissing events generate an email too.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 01:35:47 +00:00
Neil Brown 4948b8f72e Support 'mailfrom' line in mdadm.conf so the From: line in alert emails can be explicitly set.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-15 01:27:04 +00:00
Neil Brown ac957baa97 Fix alignment problem in version-1 superblocks.
NOTE: This is an incompatable change affecting raid5 reshape.
If you want to reshape a raid5 using version-1 superblocks,
use 2.6.17-rc2 or later, and mdadm-2.4.1 or later.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-04-07 04:34:45 +00:00
Neil Brown addc80c467 Updates to md.4
Particularly restiping and sysfs, but a few other bits too.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-30 04:17:51 +00:00
Neil Brown 7ef02d0143 Support 'bitmap=' in mdadm.conf for auto-assembling arrays with write-intent bitmaps in separate files.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-29 02:57:48 +00:00
Neil Brown 2ae555c3d9 Man page tidyup.
mdadm.8 improved (I hope).
Rearrange some option documentation and add --backup-file, and other
general improvements.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-29 02:45:06 +00:00
Neil Brown d7514c5884 Changelog Updates
Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-28 23:27:05 +00:00
Neil Brown 06b0d78675 Allow resize to backup to a file.
To support resizing an array without a spare, mdadm now understands
  --backup-file=
which should point to a file for storing a backup of critical data.
This can be given to --grow which will create the file, or
--assemble which will restore from the file if needed.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-27 06:38:46 +00:00
Neil Brown 313176636e Remove ident arg from getinfo_super;
Add a 'name' field to 'info' to compensate.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-27 04:34:38 +00:00
Neil Brown 2efedc7bd2 Put a 'canary' block in front of the backup
.. so corruptio can be detected.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-27 04:14:43 +00:00
Neil Brown 1e0d770c0f Release some compile fixes.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-02-06 04:18:12 +00:00
Neil Brown a92f6acc43 Update ChangeLog and release 2.3
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Neil Brown <neilb@suse.de>
2006-02-02 05:17:24 +00:00
Neil Brown ce4fafd637 Allow /etc/mdadm/mdadm.conf as an alternate to /etc/mdadm.conf
This provide compatability with Debian.

Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-09 05:01:22 +00:00
Neil Brown f3c7fda661 Release 2.2
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-09 04:55:02 +00:00
Neil Brown 0ff1a18562 Guides on how to use mdadm with initramfs
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:56:42 +00:00
Neil Brown 7d99579f6a Support updating of uuid during --assemble.
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:56:33 +00:00
Neil Brown ee04451c56 Allow event counters to be off by one
.. even without --force

Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:56:18 +00:00
Neil Brown 773135f5bd syslog support for monitor mode
From: ross@jose.lug.udel.edu (Ross Vandegrift)

Hi Neil,

While adding the text message mode, I saw a FIXME asking for syslog
support in monitor mode.

This patch adds exactly that.
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:55:56 +00:00
Neil Brown fe394e5e42 Report which device failed in a Fail message.
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:54:59 +00:00
Neil Brown 47d79ef8e5 Support --assume-clean for --create
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:54:48 +00:00
Neil Brown c06487ce20 Improve option parsing
stuff

====Do Not Remove====
Status: ok
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:54:33 +00:00
Neil Brown 8b0dabea07 Allow scanning of devices listed in /proc/partitions independant of /dev
If a device found in /proc/partitions isn't listed in /dev, then
mknod a temporary name and open that.

Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-05 05:52:50 +00:00
Neil Brown d9d4e4698f Remvoe blank line from '--examine --brief' output.
Signed-off-by: Neil Brown <neilb@suse.de>
2005-11-22 03:38:44 +00:00
Neil Brown f9c25f1d2a Support bitmaps with raid10
And a couple of other little things

Signed-off-by: Neil Brown <neilb@suse.de>
2005-11-22 03:37:14 +00:00
Neil Brown f6d75de8e0 Fix remaining problems with hot-add bitmap to version-1 superblock
Also some more tests - r5 and r6 bitmaps

Signed-off-by: Neil Brown <neilb@suse.de>
2005-09-12 05:24:10 +00:00
Neil Brown 308e1801ba Fix assembling of array with spares when verion-1 superblock is used.
As spared don't have a position in the raid array with verion-1 superblocks,
we need to handle them a bit differently.

Signed-off-by: Neil Brown <neilb@suse.de>
2005-09-12 05:23:11 +00:00
Neil Brown 265e0f1731 Fix assembling of raid10 in the face of missing devices.
We now check if enough devices are present properly, so
--force can be used to good effect.

Signed-off-by: Neil Brown <neilb@suse.de>
2005-09-12 04:57:52 +00:00
Neil Brown a9d69660a3 Lots of little manpage updates.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-25 05:11:29 +00:00
Neil Brown 947fd4ddb5 Support nameing of version-1 arrays.
--name is recognised in --create and --assemble
name= is recognised in config file.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-09 05:23:20 +00:00
Neil Brown dfd4d8ee42 Add write-behind support
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>
2005-08-09 04:25:47 +00:00
Neil Brown 586ed40547 Support fixing of byte-swapped superblocks.
Good for moving between little-endian and big-endian.
Still needs documentation.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-09 04:25:27 +00:00
Neil Brown 5e7519fa84 Add test suite and release
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-04 04:56:22 +00:00
Neil Brown f277ce3671 Assorted Fixes for multiple bugs.
Assemble would crash, or just not work.
A few other problem found by a new test-suite.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-04 04:41:12 +00:00
Neil Brown fe6729fa8c Fix compilation with tinyc
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:43:00 +00:00
Neil Brown ccf44f3272 Add man page for mdassemble
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:42:25 +00:00
Neil Brown 8f23b0b3fa Replace sprintf calls with snprintf
To quiet diet-libc

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:42:13 +00:00
Neil Brown bd72c2b2b8 Allow --force flag with --grow
.. so that you can 'grow' a raid1 to only one device.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:34:29 +00:00
Neil Brown 22892d5632 Don't list device= in --examine --scan output.
As the device list isn't stable, recording it should be avoided.
The device= list is still available if --verbose is given (once).

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:34:23 +00:00
Neil Brown b79713f8c1 When finding a /dev name for a device, prefer shorter names
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:33:56 +00:00
Neil Brown 60f9166418 Fix silly example
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:33:45 +00:00
Neil Brown d5d3721ef4 Fix some rounding errors in human_size and generally clean up the code
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:33:30 +00:00
Neil Brown 5a6d1148cc Fix parsing of /dev/md/N in is_standard
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:33:24 +00:00
Neil Brown a46f4061d3 Fix a few typecasts
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:33:16 +00:00
Neil Brown 1337546dc1 Allow --auto to still be meaningful when --scan is given
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:33:02 +00:00
Neil Brown 891d299451 Fix typo in --grow --help - don't claim '-F'
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:32:42 +00:00
Neil Brown 3fa06e9d37 Make type of uuid always int[], rather than sometimes __u32[]
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:32:34 +00:00
Neil Brown 91f068bf5c Retry --stop --scan until all stoppable devices have been stopped
This is needed to reliably stop stacked arrays

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:32:18 +00:00
Neil Brown b8f72a621b Document SparesMissing and DeviceDisappeared/WrongLevel
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:31:34 +00:00
Neil Brown 779043efce Document --size=max option for --grow
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:31:19 +00:00
Neil Brown 0bbc98b563 Avoid using lstat, it isn't right.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-14 06:30:03 +00:00
Neil Brown e793c2e583 2.0-devel-1 release
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:03:47 +00:00
Neil Brown a3fd117c7a Change "dirty" status to "active"
Description...

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:16:36 +00:00
Neil Brown e5811618d1 Release 1.11.0
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-05-03 23:42:53 +00:00
Neil Brown 0fbf459d0d Fix embarassing bug in 1.10.0 which broke --add
Use a different variable to old result of open

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-11 00:20:03 +00:00
Neil Brown b2b46bfc89 Call 'flush' after writing a superblock to disk.
Just in case...

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 06:05:07 +00:00
Neil Brown d7eaf49f65 Use O_EXCL when opening component devices to be assembled into an array
In 2.6, this will fail if the device is already in use, so we can detect this error
more easily.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 06:02:49 +00:00
Neil Brown 0320ea4565 Change handling of devices names in args
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 05:18:57 +00:00
Neil Brown e6b64cd05c Improve error message when mode is set twice.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 05:16:29 +00:00
Neil Brown 6f7e85bd16 Correct error message printed when the 'chosen_drive' cannot be added.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 05:16:26 +00:00
Neil Brown d17c1f8cbd Reverse order of arrays when --stop --scan
so that stacked arrays are stopped properly.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 05:16:24 +00:00
Neil Brown 057bd352c2 Reread partitions file for each array being assembled.
This makes assembling arrays from other arrays work better.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 05:16:22 +00:00