Skip to content

Mdadm 3.2.x #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b7e05d2
udev-rules: prevent systemd from mount devices before they are ready.
neilbrown May 24, 2012
0d478e2
mdadm: Fix Segmentation fault.
majianpeng May 28, 2012
42f0ca1
imsm: fix: correct checking volume's degradation
ldorau May 25, 2012
fcf2195
Monitor: fix inconsistencies in values for ->percent
neilbrown Jun 4, 2012
5f862fb
Monitor: Report NewArray when an array the disappeared, reappears.
neilbrown Jun 4, 2012
6f51b1c
Monitor: fix reporting for Fail vs FailSpare etc.
neilbrown Jun 4, 2012
68ad53b
mdmon: fix arg parsing.
neilbrown Jul 9, 2012
517f135
Assemble: don't leak memory with fdlist.
neilbrown Jul 9, 2012
090900c
udev-rules: prevent systemd from mount devices before they are ready.
haraldh Aug 12, 2012
446e000
sha1.h: remove ansidecl.h header inclusion
ldorau Aug 13, 2012
ec894f5
Manage: zero metadata before adding to 'external' array.
neilbrown Sep 27, 2012
3a84db5
ddf: allow a non-spare to be used to recovery a missing device.
neilbrown Sep 27, 2012
c5d61ca
ddf: hack to fix container recognition.
neilbrown Sep 27, 2012
23084aa
mdmon: fix arg processing for -a
neilbrown Aug 20, 2012
c4e96a3
mdmon: allow --takeover when original was started with --offroot
neilbrown Aug 20, 2012
80841df
find_free_devnum: avoid auto-using names in /etc/mdadm.conf
neilbrown Aug 20, 2012
c5c56d6
mapfile: fix mapfile rebuild for containers
neilbrown Sep 27, 2012
aec89f6
fix segfaults in Detail()
ldorau Sep 27, 2012
2117ad1
Fix 'enough' function for RAID10.
neilbrown Sep 27, 2012
0bc300d
Use --offroot flag when assembling md arrays via --incrmental
neilbrown Sep 27, 2012
ac78f24
Grow: make warning about old metadata more explicit.
neilbrown Oct 18, 2012
14026ab
Replace sha1.h with slightly older version.
neilbrown Oct 18, 2012
6f6809f
Add zlib license to crc32.c
Oct 18, 2012
5267ba0
Handles spaces in array names better.
neilbrown Oct 4, 2012
c51f288
imsm: allow --assume-clean to work.
neilbrown Oct 4, 2012
acf7076
Grow: allow --grow --continue to work for native metadata.
neilbrown Oct 9, 2012
335d2a6
Grow: fix a couple of typos with --assume-clean usage
neilbrown Oct 11, 2012
9ff1427
Fix open_container
neilbrown Oct 11, 2012
3713633
mdadm: super0: do not override uuid with homehost
Oct 20, 2012
31bff58
Trivial bugfix and spelling fixes.
Oct 20, 2012
e1e539f
Detail: don't report a faulty device as 'spare' or 'rebuilding'.
neilbrown Oct 21, 2012
22a6461
super0: allow creation of array on 2TB+ devices.
neilbrown Oct 22, 2012
a5d47a2
Create new md devices consistently
jmaggard10 Oct 23, 2012
eb48676
Monitor: don't complain about non-monitorable arrays in mdadm.conf
neilbrown Oct 24, 2012
ecdf2d7
Query: don't be confused by partition tables.
neilbrown Oct 25, 2012
f7b75c1
Query: allow member of non-0.90 arrays to be better reported.
neilbrown Oct 25, 2012
c8f20a8
Release 3.2.6 - stability release
neilbrown Oct 25, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions ANNOUNCE-3.2.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Subject: ANNOUNCE: mdadm 3.2.6 - A tool for managing Soft RAID under Linux

I am pleased to announce the availability of
mdadm version 3.2.6

It is available at the usual places, now including github:
countrycode=xx.
http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
and via git at
git://github.com/neilbrown/mdadm
git://neil.brown.name/mdadm
http://neil.brown.name/git/mdadm

This is a stablity release which adds a number of bugfixs to 3.2.5.
There are no real stand-out fixes, just lots of little bits and pieces.

Below is the "git log --oneline --reverse" list of changes since
3.2.5.

NeilBrown 25th October 2012

b7e05d2 udev-rules: prevent systemd from mount devices before they are ready.
0d478e2 mdadm: Fix Segmentation fault.
42f0ca1 imsm: fix: correct checking volume's degradation
fcf2195 Monitor: fix inconsistencies in values for ->percent
5f862fb Monitor: Report NewArray when an array the disappeared, reappears.
6f51b1c Monitor: fix reporting for Fail vs FailSpare etc.
68ad53b mdmon: fix arg parsing.
517f135 Assemble: don't leak memory with fdlist.
090900c udev-rules: prevent systemd from mount devices before they are ready.
446e000 sha1.h: remove ansidecl.h header inclusion
ec894f5 Manage: zero metadata before adding to 'external' array.
3a84db5 ddf: allow a non-spare to be used to recovery a missing device.
c5d61ca ddf: hack to fix container recognition.
23084aa mdmon: fix arg processing for -a
c4e96a3 mdmon: allow --takeover when original was started with --offroot
80841df find_free_devnum: avoid auto-using names in /etc/mdadm.conf
c5c56d6 mapfile: fix mapfile rebuild for containers
aec89f6 fix segfaults in Detail()
2117ad1 Fix 'enough' function for RAID10.
0bc300d Use --offroot flag when assembling md arrays via --incrmental
ac78f24 Grow: make warning about old metadata more explicit.
14026ab Replace sha1.h with slightly older version.
6f6809f Add zlib license to crc32.c
5267ba0 Handles spaces in array names better.
c51f288 imsm: allow --assume-clean to work.
acf7076 Grow: allow --grow --continue to work for native metadata.
335d2a6 Grow: fix a couple of typos with --assume-clean usage
9ff1427 Fix open_container
3713633 mdadm: super0: do not override uuid with homehost
31bff58 Trivial bugfix and spelling fixes.
e1e539f Detail: don't report a faulty device as 'spare' or 'rebuilding'.
22a6461 super0: allow creation of array on 2TB+ devices.
a5d47a2 Create new md devices consistently
eb48676 Monitor: don't complain about non-monitorable arrays in mdadm.conf
ecdf2d7 Query: don't be confused by partition tables.
f7b75c1 Query: allow member of non-0.90 arrays to be better reported.
1 change: 1 addition & 0 deletions Assemble.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,7 @@ int Assemble(struct supertype *st, char *mddev,
i--;
if (fdlist[i]>=0) close(fdlist[i]);
}
free(fdlist);
if (err) {
fprintf(stderr, Name ": Failed to restore critical section for reshape, sorry.\n");
if (backup_file == NULL)
Expand Down
2 changes: 1 addition & 1 deletion Build.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int Build(char *mddev, int chunk, int level, int layout,
goto abort;
}
if ((stb.st_mode & S_IFMT)!= S_IFBLK) {
fprintf(stderr, Name ": Wierd: %s is no longer a block device.\n",
fprintf(stderr, Name ": Weird: %s is no longer a block device.\n",
dv->devname);
goto abort;
}
Expand Down
30 changes: 19 additions & 11 deletions Detail.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre
printf("MD_UUID=%s\n", nbuf+5);
mp = map_by_uuid(&map, info->uuid);
if (mp && mp->path &&
strncmp(mp->path, "/dev/md/", 8) == 0)
printf("MD_DEVNAME=%s\n", mp->path+8);
strncmp(mp->path, "/dev/md/", 8) == 0) {
printf("MD_DEVNAME=");
print_escape(mp->path+8);
putchar('\n');
}

if (st->ss->export_detail_super)
st->ss->export_detail_super(st);
Expand All @@ -220,8 +223,11 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre
printf("MD_UUID=%s\n", nbuf+5);
}
if (mp && mp->path &&
strncmp(mp->path, "/dev/md/", 8) == 0)
printf("MD_DEVNAME=%s\n", mp->path+8);
strncmp(mp->path, "/dev/md/", 8) == 0) {
printf("MD_DEVNAME=");
print_escape(mp->path+8);
putchar('\n');
}
}
goto out;
}
Expand Down Expand Up @@ -374,11 +380,11 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre

printf(" State : %s%s%s%s%s%s \n",
(array.state&(1<<MD_SB_CLEAN))?"clean":"active", st,
(!e || (e->percent < 0 && e->percent != PROCESS_PENDING &&
e->percent != PROCESS_DELAYED)) ? "" : sync_action[e->resync],
(!e || (e->percent < 0 && e->percent != RESYNC_PENDING &&
e->percent != RESYNC_DELAYED)) ? "" : sync_action[e->resync],
larray_size ? "": ", Not Started",
e->percent == PROCESS_DELAYED ? " (DELAYED)": "",
e->percent == PROCESS_PENDING ? " (PENDING)": "");
e->percent == RESYNC_DELAYED ? " (DELAYED)": "",
e->percent == RESYNC_PENDING ? " (PENDING)": "");
}
if (array.raid_disks)
printf(" Active Devices : %d\n", array.active_disks);
Expand Down Expand Up @@ -424,7 +430,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre
}
free_mdstat(ms);

if (st->sb && info->reshape_active) {
if ((st && st->sb) && (info && info->reshape_active)) {
#if 0
This is pretty boring
printf(" Reshape pos'n : %llu%s\n", (unsigned long long) info->reshape_progress<<9,
Expand Down Expand Up @@ -537,7 +543,8 @@ This is pretty boring
if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed");
if (disk.state & (1<<MD_DISK_WRITEMOSTLY)) printf(" writemostly");
if ((disk.state &
((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)|(1<<MD_DISK_REMOVED)))
((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)
|(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)))
== 0) {
printf(" spare");
if (is_26) {
Expand Down Expand Up @@ -575,7 +582,8 @@ This is pretty boring
if (spares && brief && array.raid_disks) printf(" spares=%d", spares);
if (brief && st && st->sb)
st->ss->brief_detail_super(st);
st->ss->free_super(st);
if (st)
st->ss->free_super(st);

if (brief > 1 && devices) printf("\n devices=%s", devices);
if (brief) printf("\n");
Expand Down
50 changes: 41 additions & 9 deletions Grow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,12 +1775,12 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
goto release;
}
if (assume_clean) {
/* This will fail on kernels newer than 3.0 unless
/* This will fail on kernels older than 3.0 unless
* a backport has been arranged.
*/
if (sra == NULL ||
sysfs_set_str(sra, NULL, "resync_start", "none") < 0)
fprintf(stderr, Name ": --assume-clean not support with --grow on this kernel\n");
fprintf(stderr, Name ": --assume-clean not supported with --grow on this kernel\n");
}
ioctl(fd, GET_ARRAY_INFO, &array);
size = get_component_size(fd)/2;
Expand Down Expand Up @@ -3755,9 +3755,8 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
(unsigned long)__le64_to_cpu(bsb.mtime),
(unsigned long)info->array.utime);
} else {
if (verbose)
fprintf(stderr, Name ": too-old timestamp on "
"backup-metadata on %s\n", devname);
fprintf(stderr, Name ": too-old timestamp on backup-metadata on %s\n", devname);
fprintf(stderr, Name ": If you think it is should be safe, try 'export MDADM_GROW_ALLOW_OLD=1'\n");
continue; /* time stamp is too bad */
}
}
Expand Down Expand Up @@ -3994,15 +3993,49 @@ int Grow_continue_command(char *devname, int fd,
}
dprintf("Grow continue is run for ");
if (st->ss->external == 0) {
int d;
dprintf("native array (%s)\n", devname);
if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) {
if (ioctl(fd, GET_ARRAY_INFO, &array.array) < 0) {
fprintf(stderr, Name ": %s is not an active md array -"
" aborting\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
content = &array;
sysfs_init(content, fd, st->devnum);
/* Need to load a superblock.
* FIXME we should really get what we need from
* sysfs
*/
for (d = 0; d < MAX_DISKS; d++) {
mdu_disk_info_t disk;
char *dv;
int err;
disk.number = d;
if (ioctl(fd, GET_DISK_INFO, &disk) < 0)
continue;
if (disk.major == 0 && disk.minor == 0)
continue;
if ((disk.state & (1 << MD_DISK_ACTIVE)) == 0)
continue;
dv = map_dev(disk.major, disk.minor, 1);
if (!dv)
continue;
fd2 = dev_open(dv, O_RDONLY);
if (fd2 < 0)
continue;
err = st->ss->load_super(st, fd2, NULL);
close(fd2);
if (err)
continue;
break;
}
if (d == MAX_DISKS) {
fprintf(stderr, Name ": Unable to load metadata for %s\n",
devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
st->ss->getinfo_super(st, content, NULL);
} else {
int container_dev;

Expand Down Expand Up @@ -4115,8 +4148,7 @@ int Grow_continue_command(char *devname, int fd,
/* verify that array under reshape is started from
* correct position
*/
if (verify_reshape_position(content,
map_name(pers, mdstat->level)) < 0) {
if (verify_reshape_position(content, content->array.level) < 0) {
ret_val = 1;
goto Grow_continue_command_exit;
}
Expand Down
1 change: 1 addition & 0 deletions Manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ int Manage_subdevs(char *devname, int fd,
goto abort;
}

Kill(dv->devname, NULL, 0, -1, 0);
dfd = dev_open(dv->devname, O_RDWR | O_EXCL|O_DIRECT);
if (mdmon_running(tst->container_dev))
tst->update_tail = &tst->updates;
Expand Down
Loading