Neil Brown
3da92f272d
Drop the superblock arg from all metadata methods.
...
It is now in the 'supertype'
2007-12-14 20:14:33 +11:00
Neil Brown
68c7d6d790
Add 'supertype' arg to almost all metadata methods.
...
The 'superblock' will be moved into this structure soon.
2007-12-14 20:14:16 +11:00
Neil Brown
df37ffc039
Allow metadata handlers to free their own superblock.
...
As the metadata handler allocates the superblock, it should free it
too. DDF will have a more complex 'superblock' which needs more complex
freeing.
2007-12-14 20:14:00 +11:00
Neil Brown
aba69144fd
Remove spaces/tabs from ends of lines.
2007-12-14 20:13:43 +11:00
Neil Brown
08e43379e5
A recent patch broke --create --level=faulty - fix it.
...
Thanks to Martin Bene.
2007-11-29 14:40:01 +11:00
Neil Brown
570510ba32
Add some extra consistency checks based on level.
...
Also use LEVEL_LINEAR, LEVEL_MULTIPATH in place of -1 or -4 in a few places.
2007-10-17 13:08:12 +10:00
maximilian attems
943eafefca
Create.c s/major/major_num/
...
don't shadow the major() function by int major.
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
2007-09-24 13:21:38 +10:00
Doug Ledford
66f8bbbe90
Enhance raid4 support: --assemble and --monitor wasn't quite happy with it.
...
From: Doug Ledford <dledford@redhat.com>
This one actually does a couple things. Mainly related to raid4, but
kinda touches other raid levels some.
When creating a raid4 array, treat it like a raid5 array in that we
create it in degraded mode by default and add the last disk as a spare.
Besides speeding things up, this has a second effect that it makes mdadm
more consistent. In order to create a degraded raid5 array, you need
only passing missing as one of the devices. For a degraded raid4 array,
prior to this patch, you must pass assume-clean or else it refuses to
create the array. Even force won't make it work without assume-clean.
With the patch, raid4 behaves identical to raid5.
Separate from that, the monitor functionality completely ignores raid4
arrays. That seems to stem from the code that checks to see if the
array is part of a long list of types. It seems easier to check which
array types *aren't* redundant instead of listing the ones that are
redundant and missing some of them. This makes the monitor service
actually watch raid4 arrays.
2007-07-09 10:00:02 +10:00
Doug Ledford
32e5a4ee4c
Improve error message when trying to create an array that already exists.
...
From: Doug Ledford <dledford@redhat.com>
Simple bugfix. If an array already exists and we are asked to create
this array, error out with an error message that makes sense to people
instead of an error that the SET_ARRAY_INFO ioctl had an invalid
argument. Plus a typo correction.
2007-07-09 09:59:50 +10:00
Neil Brown
5b28bd5672
Improve error message for adding bitmap to a level that cannot support it.
...
Also give error on --build if no devices given.
2007-05-21 14:25:47 +10:00
Neil Brown
3d3dd91e38
Support --uuid= with --create to choose your own UUID.
2006-12-14 17:33:10 +11:00
Neil Brown
beae1dfe2e
Central calls to ioctl BLKGETSIZE
...
Instead of opencoding the same thing everywhere.
2006-12-14 17:32:57 +11:00
Neil Brown
199171a297
Improve allocation and use of space for bitmaps in version1 metadata
...
Depending on the size of the array we reserve space for up to 128K
of bitmap, and we use it where possible.
When hot-adding to a version 1.0 we can still only use the 3K at the
end though - need a sysfs interface to improve that.
If a small chunksize is requested on Create, we don't auto-enlarge
the reserved space - this still needs to be fixed.
2006-12-14 17:31:00 +11: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
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
d1e80164a2
Minor improvement in name auto-chosen for version-1 superblocks.
...
/dev/md_d0 should have name 'd0' by default to
make /dev/md/d0.
2006-08-11 17:59:57 +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
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
058574b1da
Allow default metadata to be specified in mdadm.conf
...
CREATE metadata=1
in mdadm.conf will cause version-1 superblocks to be the default.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 05:33:40 +00:00
Neil Brown
b3b33eb5cd
Set default name for v1 array based on device name.
...
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-26 03:24:02 +00:00
Neil Brown
05697ec1e2
Make homehost information appear in superblock.
...
When an array is created, if the homehost is know,
the superblock gets it, either in the uuid, (via sha1)
or in the name field.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-19 06:56:06 +00:00
Neil Brown
4f589ad0c5
Just updaqte copyright dates and email address
...
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-19 05:25:11 +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
6409687b55
Kill old superblocks on create.
...
Make sure old-version superblocks are not around to confuse anything
when a new array is created.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-03-28 23:22:58 +00:00
Neil Brown
576d6d83af
Prefer version-1 superblocks for v.large devices.
...
Signed-off-by: Neil Brown <neilb@suse.de>
2006-01-31 00:01:48 +00:00
Neil Brown
5dd497eecb
Enable support for v.large raid1.
...
clean up 'long long' usage for size of array, so that
with v-1 superblocks a raid1 larger than 2TB is possible.
Signed-off-by: Neil Brown <neilb@suse.de>
2006-01-27 06:21:06 +00:00
Neil Brown
29e766a5f4
Minor fixes
...
Signed-off-by: Neil Brown <neilb@suse.de>
2006-01-27 04:48:28 +00:00
Neil Brown
838acbc272
Assorted fixes...
...
Signed-off-by: Neil Brown <neilb@suse.de>
2006-01-27 01:44:47 +00:00
Neil Brown
d2cd3ffc02
uhm.. assort fixes, particularly for recovery offset...
...
Signed-off-by: Neil Brown <neilb@suse.de>
2005-12-16 01:34:49 +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
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
dcec9ee547
Create version-4 bitmaps if kernel supports it.
...
Version-3 bitmaps are host-endian. Version-4 are little-endian
and so more portable.
Signed-off-by: Neil Brown <neilb@suse.de>
2005-10-11 04:44:44 +00:00
Neil Brown
1bf4e2d962
Passes all tests, nearly ready for release.
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-26 06:08:28 +00:00
Neil Brown
34163fc7cf
Support internal bitmaps with format-1 superblocks.
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-25 04:31:44 +00:00
Neil Brown
c13c45e913
Add test for multipath and make it work.
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-16 07:00:22 +00:00
Neil Brown
dab6685f3d
Add 'quite' option and tidy up some tests.
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-08-15 06:14:27 +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
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
96395475fc
Make --zero-superblock work for version 1 superblocks.
...
This requires passing the supertype to store_super
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:03:45 +00:00
Neil Brown
55935d5180
Add support for internal bitmaps
...
For version 0.90 superblocks, an internal bitmap can be specified at create.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:03:47 +00:00
Neil Brown
eaac7dde09
Fix create bug which initialised superblocks wrongly.
...
Description...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:16:35 +00:00
Neil Brown
c82f047cfc
Initial bitmap support
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:16:35 +00:00
Neil Brown
570c054247
Release 1.8.1 after some man page updates and other fixes.
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-06-07 23:16:36 +00:00
Neil Brown
82d9eba687
super1
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Fix raid5 creation with new code.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-05-03 23:44:40 +00:00
Neil Brown
f9ce90ba50
Add a 'super-switch' so that different format superblocks can be used.
...
This includes:
adding --metadata= option to choose metadata format
adding metadata= word to config file.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-05-03 23:44:32 +00:00
Neil Brown
4b1ac34b51
Separate sueprblock handling into separate file
...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-05-03 23:44:18 +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
0df46c2ad8
Change MAJOR() etc to major() etc
...
This allows for larger device number if glibc supports
it (requires 2.3.3).
Also fail before creating larger device number if glibc
support isn't present.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
2005-04-04 05:16:13 +00:00
Neil Brown
b5e6464503
mdadm-1.8.0
2004-11-01 04:49:34 +00:00
Neil Brown
e5329c3747
mdadm-1.7.0
2004-08-11 02:16:01 +00:00
Neil Brown
dd0781e505
mdadm-1.6.0
2004-06-04 12:03:19 +00:00
Neil Brown
98c6faba80
mdadm-1.5.0
2004-01-22 02:10:29 +00:00
Neil Brown
aa88f531b4
mdadm-1.3.0
2003-07-28 23:59:00 +00:00
Neil Brown
2d46552003
mdadm-1.0.0
2002-05-10 04:06:19 +00:00
Neil Brown
b83d95f362
mdadm-0.8.2
2002-04-11 01:36:14 +00:00
Neil Brown
c913b90e6d
mdadm-0.8.1
2002-04-05 22:00:28 +00:00
Neil Brown
e0d1903663
mdadm-0.8
2002-04-04 01:58:32 +00:00
Neil Brown
56eb10c0b6
mdadm-0.7.1
2002-03-15 05:21:36 +00:00
Neil Brown
9a9dab3670
mdadm-0.7
2002-03-08 00:03:52 +00:00
Neil Brown
cd29a5c835
mdctl-0.6
2002-03-06 23:17:40 +00:00
Neil Brown
5282684628
mdctl-0.5
2001-08-23 02:33:20 +00:00
Neil Brown
5e52ae9ed0
mdctl-v0.4.1
2001-07-26 09:39:46 +00:00
Neil Brown
82b27616de
mdctl-v0.4
2001-07-26 07:00:09 +00:00
Neil Brown
682c705194
mdctl-v0.3
2001-06-14 05:33:53 +00:00
Neil Brown
64c4757e27
mdctl-v0.2
2001-06-08 02:36:23 +00:00