From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Brown Subject: Re: reducing the number of disks a RAID1 expects Date: Tue, 11 Sep 2007 16:04:08 +0200 Message-ID: <18150.41048.240735.467994@notabene.brown> References: <46E49991.9000000@getsu.com> <46E4AC1A.3010509@sauce.co.nz> <46E4F2EA.3020901@getsu.com> <20070910095557.GA22549@teal.hq.k1024.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: message from Iustin Pop on Monday September 10 Sender: linux-raid-owner@vger.kernel.org To: Iustin Pop Cc: "J. David Beutel" , Richard Scobie , Linux RAID Mailing List List-Id: linux-raid.ids On Monday September 10, iusty@k1024.org wrote: > On Sun, Sep 09, 2007 at 09:31:54PM -1000, J. David Beutel wrote: > > [root@samue ~]# mdadm --grow /dev/md5 -n2 > > mdadm: Cannot set device size/shape for /dev/md5: Device or resource busy > > > > mdadm - v1.6.0 - 4 June 2004 > > Linux 2.6.12-1.1381_FC3 #1 Fri Oct 21 03:46:55 EDT 2005 i686 athlon i386 > > GNU/Linux > > I'm not sure that such an old kernel supports reshaping an array. The > mdadm version should not be a problem, as that message is probably > generated by the kernel. 2.6.12 does support reducing the number of drives in a raid1, but it will only remove drives from the end of the list. e.g. if the state was 58604992 blocks [3/2] [UU_] then it would work. But as it is 58604992 blocks [3/2] [_UU] it won't. You could fail the last drive (hdc8) and then add it back in again. This would move it to the first slot, but it would cause a full resync which is a bit of a waste. Since commit 6ea9c07c6c6d1c14d9757dd8470dc4c85bbe9f28 (about 2.6.13-rc4) raid1 will repack the devices to the start of the list when trying to change the number of devices. > > I'd recommend trying to boot with a newer kernel, even if only for the > duration of the reshape. > Yes, a kernel upgrade would do the trick. NeilBrown