Thread (4 messages) 4 messages, 2 authors, 2017-05-26

Re: Reducing the number of devices in a degraded RAID-5

From: NeilBrown <hidden>
Date: 2017-05-26 05:13:11

On Thu, May 25 2017, Andreas Klauer wrote:
On Wed, May 24, 2017 at 12:12:32PM +1000, NeilBrown wrote:
quoted
What does work is:
 # start with a degraded array, device 0 missing
 mdadm --grow /dev/md42 --array-size=.....
 echo frozen > /sys/block/md42/md/sync_action
 mdadm /dev/md42 --add /dev/loop0
 echo 0 > /sys/block/md42/md/dev-loop0/slot
 mdadm --grow /dev/md42 --backup-file=... --raid-devices=4
Wow. Thanks.

This should merge Step 1+2, but not Step 3, right?
Right.  Doing step 3 at the same time is not possible.

NeilBrown

I really need to take a closer look at the things in /sys/.../md/...

Seems like you can do great things with it... terrible, yes, but great.

(
  Step 3 would be turning slot 4 to-be-spare into slot 0, 
  without --add ing another device at all.

  That's what would happen if /dev/loop0 was actually backed 
  by and thus identical with the slot4 device.

  But that's playing dirty.
)

Regards
Andreas Klauer

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help