Zhilong Liu [Tue, 16 Jan 2018 09:45:08 +0000 (17:45 +0800)]
mdadm/clustermd_tests: add test case to test creating cluster-raid10
00r10_Create: It contains 4 scenarios of creating clustered raid10.
1. General creating, master node does resync and slave node does
Pending.
2. Creating clustered raid10 with --assume-clean.
3. Creating clustered raid10 with spare disk.
4. Creating clustered raid10 with --name.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Tue, 16 Jan 2018 09:45:06 +0000 (17:45 +0800)]
mdadm/clustermd_tests: add test case to test creating cluster-raid1
00r1_Create: It contains 4 scenarios of creating clustered raid1.
1. General creating, master node does resync and slave node does
Pending.
2. Creating clustered raid1 with --assume-clean parameter.
3. Creating clustered raid1 with spare disk.
4. Creating clustered raid1 with --name.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Tue, 16 Jan 2018 09:45:05 +0000 (17:45 +0800)]
mdadm/test: add '--testdir=' to switch choosing test suite
By now, mdadm has two test suites to cover traditional sofr-raid
testing and clustermd testing, the '--testdir=' option supports
to switch which suite to test, tests/ or clustermd_tests/.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Tue, 16 Jan 2018 09:45:04 +0000 (17:45 +0800)]
mdadm/test: enable clustermd testing under clustermd_tests/
For clustermd testing, it needs user deploys the basic cluster
manually, test scripts don't cover auto-deploy cluster due to
different linux distributions have lots of difference.
Then complete the configuration in cluster_conf, please refer to
the detail comments in 'cluster_conf'.
1. 'func.sh' source file, it achieves feature functions for
clustermd testing.
2. 'cluster_conf' configure file, it contains two parts as
the input of testing.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Tue, 16 Jan 2018 09:45:02 +0000 (17:45 +0800)]
mdadm/test: correct the logic operation in save_log
1. delete the mdadm -As, keep the original testing scene intact.
2. move some actions into 'array' test, 'mdadm -D $array' would
complain errors if $array is null.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Mariusz Tkaczyk [Thu, 11 Jan 2018 11:39:49 +0000 (12:39 +0100)]
policy.c: Avoid to take spare without defined domain by imsm
Only Imsm get_disk_controller_domain returns disk controller domain for
each disk. It causes that mdadm automatically creates disk controller
domain policy for imsm metadata, and imsm containers in the same disk
controller domain can take spare for recovery.
managemon: Don't add disk to the array after it has started
If disk has disappeared from the system and appears again, it is added to the
corresponding container as long the metadata matches and disk number is set.
This code had no effect on imsm until commit 20dc76d15b40 ("imsm: Set disk slot
number"). Now the disk is added to container but not to the array - it is
correct as the disk is out-of-sync. Rebuild should start for the disk but it
doesn't. There is the same behaviour for both imsm and ddf metadata.
There is no point to handle out-of-sync disk as "good member of array" so
remove that part of code. There are no scenarios when monitor is already
running and disk can be safely added to the array. Just write initial metadata
to the disk so it's taken for rebuild.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Thu, 23 Nov 2017 03:10:44 +0000 (11:10 +0800)]
mdadm/grow: correct the s->size > 1 to make 'max' work
s->size > 1 : s->size is '1' when '--grow --size max'
parameter is specified, so correct this test here.
Fixes: 1b21c449e6f2 ("mdadm/grow: adding a test to ensure resize was required") Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Maksymilian Kunt [Mon, 13 Nov 2017 11:30:49 +0000 (12:30 +0100)]
imsm: continue resync on 3-disk RAID10
If RAID10 gets degraded during resync and is stopped, it doesn't continue
resync after automatic assemble and it is reported to be in sync. Resync
is blocked because the disk is missing. It should not happen for RAID10 as
it can still continue with 3 disks.
Count missing disks. Block resync only if number of missing disks exceeds
limit for given RAID level (only different for RAID10). Check if the
disk under recovery is present. If not, resync should be allowed to run.
Mariusz Tkaczyk [Tue, 21 Nov 2017 10:30:20 +0000 (11:30 +0100)]
Monitor/msg: Don't print error message if mdmon doesn't run
Commit 4515fb28a53a ("Add detail information when can not connect
monitor") was added to warn about failed connection to monitor in
WaitClean function (see link below).
Mdmon runs for IMSM containers when they have array with redundancy so
if mdmon doesn't run, mdadm prints this error. This is misleading and
unnecessary. Just print it in WaitClean function.
The sock in WaitClean is deprecated so it is removed.
Mariusz Tkaczyk [Tue, 7 Nov 2017 15:49:56 +0000 (16:49 +0100)]
sysfs: include faulty drive in disk count
When the disk fails, it goes into faulty state first and it is removed
from the array in a while. It gives mdadm monitor a chance to see the disk
has failed and notify an event (e.g. FailSpare). It doesn't work when
sysfs is used to get a number of disks in the array as it skips faulty
disk. ioctl implementation doesn't differentiate between active and
faulty disk. Do the same for sysfs then. It should not matter that number
of disks reported is greater than list of disk structures returned by the
call because the same approach already takes place for offline disks.
Michal Zylowski [Wed, 8 Nov 2017 14:43:41 +0000 (15:43 +0100)]
imsm: More precise message when spanned raid is created
When RAID is created between VMD and SATA disks, printed message is
"Mixing devices attached to different VMD domains is not allowed". This message
is unclear and misleading because creating spanned containers between different
VMD domains is allowed. Set error message to more precise text.
Signed-off-by: Michal Zylowski <michal.zylowski@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Guoqing Jiang [Mon, 30 Oct 2017 09:09:51 +0000 (17:09 +0800)]
To support clustered raid10
We are now considering to extend clustered raid to
support raid10. But only near layout is supported,
so make the check when create the array or switch
the bitmap from internal to clustered.
Improve error detection after SG_IO ioctl. Checking only the return
value and response length is insufficient and leads to anomalies if a
drive does not have a serial number.
NeilBrown [Mon, 30 Oct 2017 04:43:41 +0000 (15:43 +1100)]
Incremental: Use ->validate_geometry instead of ->avail_size
Since mdadm 3.3 is has not been correct to call ->avail_size if
metadata hasn't been read from the device. ->validate_geometry
should be used instead.
Unfortunately array_try_spare() didn't get the memo, and it can crash
when adding a spare with no metdata.
So change it to use ->validate_geometry().
Only one place remains that uses ->avail_size(), and that is safe.
Also fix a comment with a typo.
Reported-and-tested-by: Bjørnar Ness <bjornar.ness@gmail.com> Fixes: 641da7459192 ("super1: separate to version of _avail_space1().") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Mon, 16 Oct 2017 07:54:18 +0000 (15:54 +0800)]
mdadm/mdopen: create new function create_named_array for writing to new_array
Split 'write to new_array' out into a function named create_named_array.
And fixed a trivial compiling warning 'warn_unused_result' against commit: fdbf7aaa1956 (mdopen: call "modprobe md_mod" if it might be needed.)
Zhilong Liu [Wed, 11 Oct 2017 08:53:12 +0000 (16:53 +0800)]
mdadm/grow: adding a test to ensure resize was required
To fix the commit: 4b74a905a67e
(mdadm/grow: Component size must be larger than chunk size)
array.level > 1 : against the raids which chunk_size is meaningful.
s->size > 0 : ensure that changing component size has required.
array.chunk_size / 1024 > s->size : ensure component size should
be always >= current chunk_size when requires resize, otherwise,
mddev->pers->resize would be set mddev->dev_sectors as '0'.
Reported-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Suggested-by: NeilBrown <neilb@suse.com> Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
NeilBrown [Thu, 5 Oct 2017 06:13:17 +0000 (17:13 +1100)]
Move mdadm_env.sh out of /usr/lib/systemd
The systemd developers like to keep control of the
lib/systemd namespace, and haven't approved of the use
of lib/systemd/scripts. So we should stop using it.
Move the mdadm_env.sh script, optionally sourced by
mdmonitor.service, to a new directory /usr/lib/mdadm.
After switch root new mdmon is started. It sends initrd mdmon a signal
to terminate. initrd mdmon receives it and switches the safe mode delay
to 1 ms in order to get array to clean state and flush last version of
metadata. The problem is sysfs filesystem is not available to initrd mdmon
after switch root so the original safe mode delay is unchanged. The delay
is set to few seconds - if there is a lot of traffic on the filesystem,
initrd mdmon doesn't terminate for a long time (no clean state). There
are 2 instances of mdmon. initrd mdmon flushes metadata when array goes
to clean state but this metadata might be already outdated.
Use file descriptor obtained on mdmon start to change safe mode delay.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Mariusz Tkaczyk [Tue, 3 Oct 2017 12:49:49 +0000 (14:49 +0200)]
imsm: Set disk slot number
If first disk of IMSM RAID1 is failed but still present in the system,
the array is not auto-assembled. Auto-assemble uses raid disk slot from
metadata to index disks. As it's not set, the valid disk is seen as a
replacement disk and its metadata is ignored. The problem is not
observed for other RAID levels as they have more than 2 disks -
replacement disks are only stored under uneven indexes so third disk
metadata is used in such scenario.
imsm: write initial ppl on a disk added for rebuild
When rebuild is initiated by the UEFI driver it is possible that the new
disk will not contain a valid ppl header. Just write the initial ppl
and don't abort assembly.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
imsm: Write empty PPL header if assembling regular clean array.
If array was initially assembled with kernel without PPL support -
initial header was never written to the drive.
If initial resync was completed and system is rebooted to kernel with
PPL support - mdadm prevents from assembling normal clean array
due to lack of valid PPL.
Write empty header when assemble normal clean array, so the
its assamble is no longer blocked.
imsm: don't skip resync when an invalid ppl header is found
If validate_ppl_imsm() detects an invalid ppl header it will be
overwritten with a valid, empty ppl header. But if we are assembling an
array after unclean shutdown this will cause the kernel to skip resync
after ppl recovery. We don't want that because if there was an invalid
ppl it's best to assume that the ppl recovery is not enough to make the
array consistent and a full resync should be performed. So when
overwriting the invalid ppl add one ppl_header_entry with a wrong
checksum. This will prevent the kernel from skipping resync after ppl
recovery.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
If raid memeber is not in sync - it is skipped during
enablement of PPL. This is not correct, since the drive that
we are currently recovering to does not have ppl_size and ppl_sector
properly set in sysfs.
Remove this skipping, so all drives are updated during turning on the PPL.
Zeroout whole ppl space during creation/force assemble
PPL area should be cleared before creation/force assemble.
If the drive was used in other RAID array, it might contains PPL from it.
There is a risk that mdadm recognizes those PPLs and
refuses to assemble the RAID due to PPL conflict with created
array.
Change validation algorithm to check validity of multiple ppls that
are stored in PPL area.
If read error occurs during - treat the all PPLs as invalid -
there is no guarantee that this one was not latest. If the header CRC is
incorrect - assume that there are no further PPLs in PPL area.
If whole PPL area was written at least once - there is a possibility that
old PPL (with lower generation number) will follow the recent one
(with higest generation number). Compare those generation numbers to check
which PPL is latest.
Add support for super1 with multiple ppls. Extend ppl area size to 1MB.
Use 1MB as default during creation. Always start array as single ppl -
if kernel is capable of multiple ppls and there is enough space reserved -
it will switch the policy during first metadata update.
Don't abort starting the array if kernel does not support ppl
Change the behavior of assemble and create for consistency-policy=ppl
for external metadata arrays. If the kernel does not support ppl, don't
abort but print a warning and start the array without ppl
(consistency-policy=resync). No change for native md arrays because the
kernel will not allow starting the array if it finds an unsupported
feature bit in the superblock.
In sysfs_add_disk() check consistency_policy in the mdinfo structure
that represents the array, not the disk and read the current consistency
policy from sysfs in mdmon's manage_member(). This is necessary to make
sysfs_add_disk() honor the actual consistency policy and not what is in
the metadata. Also remove all the places where consistency_policy is set
for a disk's mdinfo - it is a property of the array, not the disk.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Tue, 5 Sep 2017 09:41:37 +0000 (17:41 +0800)]
mdadm/manpage: disable bitmap_resize for external file bitmap
Update the manpage in "SIZE CHANGES" against the md commit.
Commit: e8a27f836f165c26f867ece7f31eb5c811692319
(md/bitmap: disable bitmap_resize for file-backed bitmaps.)
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
GET_MISMATCH option doesn't exist for RAID arrays without redundancy
so sysfs_read fails if this information is requested. Set options
according to the device using information from /proc/mdstat.
If array is stopped during reshape and assembled again straight away,
reshape process in a background might still be running. systemd doesn't
start a new service if one already exists. If there is a race, previous
process might terminate and new one is not created. Reshape doesn't
continue after assemble.
Tell systemd to restart the service rather than just start it. It will
assure previous service is stopped first. If it's not running, stopping
has no effect and only new process is started.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
mdopen: call "modprobe md_mod" if it might be needed.
Creating an array by opening a block-device with major number of 9
will transparently load the md module if needed.
Creating an array by opening
/sys/module/md_mod/parameters/new_array
and writing to it won't, it will just fail if md_mod isn't loaded.
So when opening that file fails with ENOENT, run "modprobe md_mod" and
try again.
This fixes a bug whereby if you have "CREATE names=yes" in mdadm.conf,
and the md modules isn't loaded, then creating or assembling an
array will not honor the "names=yes" configuration.
Song Liu [Tue, 29 Aug 2017 16:53:02 +0000 (09:53 -0700)]
mdadm: set journal_clean after scanning all disks
Summary:
In Incremental.c:count_active(), max_events is tracked to show to
which devices are up to date. If a device has events==max_events+1,
getinfo_super() is called to reload the superblock from this
device. getinfo_super1() blindly set journal_clean to 0, which is
wrong.
This patch fixes this by tracking max_journal_events for all the
disks. After scanning all disks, journal_clean is set if
max_journal_events >= max_events-1.
Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Mariusz Tkaczyk [Fri, 18 Aug 2017 10:00:23 +0000 (12:00 +0200)]
Detail: differentiate between container and inactive arrays
Containers used to be handled as active arrays because GET_ARRAY_INFO
ioctl returns valid structure for them. As containers appear as inactive
in sysfs, the output for detail command has changed.
Stop relying on inactive state for containers. Make the output look the
same as in mdadm 4.0.
Mariusz Tkaczyk [Wed, 16 Aug 2017 12:59:46 +0000 (14:59 +0200)]
Monitor: Include containers in spare migration
Spare migration doesn't work for external metadata. mdadm skips
a container with spare device because it is inactive. It used to work
because GET_ARRAY_INFO ioctl returned valid structure for a container
and mdadm treated such response as active container. Current
implementation checks it in sysfs where container is shown as inactive.
Adapt sysfs implementation to work the same way as ioctl.
Mariusz Tkaczyk [Wed, 16 Aug 2017 12:22:32 +0000 (14:22 +0200)]
Monitor: containers don't have the same sysfs properties as arrays
GET_MISMATCH option doesn't exist for containers so sysfs_read fails if
this information is requested. Set options according to the device using
information from /proc/mdstat.
Tomasz Majchrzak [Thu, 10 Aug 2017 13:47:22 +0000 (15:47 +0200)]
imsm: rebuild from 2-disk RAID10
When RAID10 loses 2 disks and it is still operational, it cannot be
rebuilt. The rebuild process starts for the first disk and completes,
however completion is not recorded in metadata. There is an assumption
that rebuild completion corresponds to transition from degraded to
normal state. It's not the case for 2-disk RAID10 as it's still degraded
after rebuild to first disk completes.
Check if disk rebuild flag is set in the second map and clear it. So far it
has been checked only in the first map (where it was not set). The flag in
the second map has not been cleared but rebuild completion dropped second
map so the problem was not visible.
If rebuild completion is notified and array still has failed disks and is in
degraded state, check first if rebuild position is really unset (the same
check as for array in normal state). If so, mark migration as done but don't
change array state (it should remain degraded). Update failed disk number.
On rebuild start don't clear the rebuild flag in the destination map for all
the drives because failed state is lost for one of them. Just do a copy of
a map and clear the flag in the destination map for the disk that goes into
rebuild. Similarily preserve the rebuild flag in the map during disk removal.
If the disk is missing on array start and migration has been in progress,
don't just cancel it. Check first if maybe one of the disks was not under
rebuild (rebuild flag present both in source and destination map). If so,
rebuild was running despite of failed disk so there is no need to cancel
migration.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Mariusz Tkaczyk [Thu, 10 Aug 2017 09:43:48 +0000 (11:43 +0200)]
Detail: correct output for active arrays
The check for inactive array is incorrect as it compares it against
active array. Introduce a new function md_is_array_active so the check
is consistent across the code.
As the output contains list of disks in the array include this
information in sysfs read.
Guoqing Jiang [Wed, 2 Aug 2017 02:05:41 +0000 (10:05 +0800)]
udev rules: introduce rules for cluster-md to confirm device
For cluster scenario, add device is different with native raid.
When a node issues adds a device, then the node will broadcast
a message with UUID to other nodes in the cluster. If receiving
node can find the device with the specific UUID, it must confirm
the device, otherwise reports it is missing.
Song Liu [Tue, 28 Mar 2017 18:04:44 +0000 (11:04 -0700)]
mdadm/r5cache: allow adding journal to array without journal
Currently, --add-journal can be only used to recreate broken journal
for arrays with journal since creation. As the kernel code getting
more mature, this constraint is no longer necessary.
This patch allows --add-journal to add journal to array without
journal.
Signed-off-by: Song Liu <songliubraving@fb.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Currently if metadata requires more then 1M,
data offset will be rounded down to closest MB.
This is not correct, since less then required space is reserved.
Always round data offset up to multiple of 1M.
Tomasz Majchrzak [Mon, 19 Jun 2017 09:19:53 +0000 (11:19 +0200)]
Monitor: don't assume mdadm parameter is a block device
If symlink (e.g. /dev/md/raid) is passed as a parameter to mdadm --wait,
it fails as it's not able to find a corresponding entry in /proc/mdstat
output. Get parameter file major:minor and look for block device name in
sysfs. This commit is partial revert of commit 9e04ac1c43e6
("mdadm/util: unify stat checking blkdev into function").
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Wed, 14 Jun 2017 13:02:53 +0000 (21:02 +0800)]
mdadm/test: Add '--disks=' to support testing phsical devices
If test mode has set as '--dev=disk', then users can specify
the argument of "--disks" to test a bunch of physical devices.
For example: ./test --dev=disk --disks=/dev/sda{2..15}
could execute all test cases on physical devices.
Currently, the --dev=disk mode would confilct with testdev()
in current test cases, thus ignore testing testdev() if has
set --dev=disk mode.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Wed, 14 Jun 2017 13:02:52 +0000 (21:02 +0800)]
mdadm/test: Add '--raidtype=' to run different raidlevel cases
It supports to specify the argument of "--raidtype"
to run the different raid level cases. Details refer
to the do_help() usage.
For example: ./test --raidtype=raid1
could execute all the raid1 test cases under tests/.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Wed, 14 Jun 2017 13:02:51 +0000 (21:02 +0800)]
mdadm/test: Refactor and revamp 'test' script
Adding functions:
die()
uniform the abnormal situations that have to abort.
check_env()
do various basic checking before running test suite.
save_log()
collect array infos, include of dmesg, superblock,
bitmap and /proc/mdstat.
main()
the core function of this script.
Improve functions:
cleanup()
clear dmesg and remove the /var/tmp/mdtest* files.
mdadm()
clear superblock once creating or building arrays
every time, because it's always creating arrays
many times in a test case.
check()
just tidy up with die(), didn't change code meanings.
testdev()
add checking $1 must be a block device, add 'return 0'
in final because this function exists in last line of
test case, such as tests/05r6tor0.
do_test()
add checking abnormal dmesg and changing log management.
do_help()
just recommend a better way to print Usage.
parse_args()
revamp and improve.
Delete function:
fast_sync()
It's no longer used, so get rid of it.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Grow: don't allow array geometry change with ppl enabled
Don't allow array geometry change (size expand, disk adding) when PPL
consistency policy is enabled. Current PPL implementation doesn't work when
reshape is taking place.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Tomasz Majchrzak [Wed, 31 May 2017 10:46:57 +0000 (12:46 +0200)]
Get failed disk count from array state
Recent commit has changed the way failed disks are counted. It breaks
recovery for external metadata arrays as failed disks are not part of
the array and have no corresponding entries is sysfs (they are only
reported for containers) so degraded arrays show no failed disks.
Recent commit overwrites GET_DEGRADED result prior to GET_STATE and it
is not set again if GET_STATE has not been requested. As GET_STATE
provides the same information as GET_DEGRADED, the latter is not needed
anymore. Remove GET_DEGRADED option and replace it with GET_STATE
option.
Don't count number of failed disks looking at sysfs entries but
calculate it at the end. Do it only for arrays as containers report
no disks, just spares.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
It is a partial revert of commit 758b327cf5a7 ("Grow: Remove unnecessary
optimization"). For native metadata component size is set in kernel for
entire disk space. As external metadata supports multiple arrays within
one disk, the component size is set to array size. If component size is
not updated prior to array size update, the grow operation fails.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Zhilong Liu [Wed, 31 May 2017 11:38:36 +0000 (19:38 +0800)]
md_u: Remove unused ioctl declaration of START_ARRAY
START_ARRAY is no longer used in the code, so get rid of it.
MD commit: fbedac04fa11 ("[PATCH] md: the scheduled removal
of the START_ARRAY ioctl for md") merged in the year 2006.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Lidong Zhong [Thu, 25 May 2017 09:28:11 +0000 (17:28 +0800)]
super1: fix sb->max_dev when adding a new disk in linear array
The value of sb->max_dev will always be increased by 1 when adding
a new disk in linear array. It causes an inconsistence between each
disk in the array and the "Array State" value of "mdadm --examine DISK"
is wrong. For example, when adding the first new disk into linear array
it will be:
Zhilong Liu [Thu, 11 May 2017 08:52:41 +0000 (16:52 +0800)]
retire the APIs that driver no longer supports
refer to commit: e6e5f8f1267d ("Build: Stop
bothering about supporting md driver ...")
continue to retire the APIs that md driver
wasn't supported for very long period of time.
Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>