<div dir="ltr"><div>Looking at:</div><a href="https://raid.wiki.kernel.org/index.php/Growing">https://raid.wiki.kernel.org/index.php/Growing</a><div><br></div><div>You may need to add then set greater number of drives so that the array knows that they are not spare drives.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 21, 2014 at 7:18 PM, Claude Felizardo <span dir="ltr"><<a href="mailto:cafelizardo@gmail.com" target="_blank">cafelizardo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry Matthew,<br>
<br>
It sounds like mdadm is refusing to add the new drives because they are smaller than your existing drives. What you have run into is my greatest fear of RAID - trying to use a drive that is slightly too small. No kernel messages? I never got around to trying Btrfs, only ext2/3/4, sometimes sitting on LVM, etc. IIRC, I don't think I had much luck with the resizing and almost always had to rebuild the array and restore the data.<br>
<br>
I gave up trying to maintain my own RAID systems because upgrading to a new distro nearly always resulted in the machine not being available for days or weeks. Either a driver was missing or some other piece of software on my fileserver had to be upgraded or patched or something. By then my family had started to rely on either the shared storage or some app so I opted for the COTS solution. Seriously, how many people maintain their own firewall's with multiple ethernet cards these days?<br>
<br>
I've been using Netgear ReadyNAS boxes for several years now and they pretty much do everything automatically such as adding new devices, repartitioning, swapping drives, etc, without me having to monitor progress and issue the next set of mdadm commands each time. I had most of the options memorized for a while.<br>
<br>
With ReadyNAS it was a simple matter of adding or replacing drives. I started with two 500 GB for mirror, added a 3rd and it automatically configured for RAID-5. Replaced the 3 drives with 1 TB drives and it automatically reconfigured itself requiring a single reboot at one point. Same when I upgraded to three 2 TB drives. Finally added the 4th 2 TB drive and it just worked. I never had to copy data off to rebuild. Of course I still had a separate backup of my important data. I've had several drives start to die, the ReadyNAS sent me an email when it detected the sector remapping was increasing. Again, hot swap done right. This past summer I was starting to run out of disk space at 90+% full and since my older unit can only support 2 TB drives, I decided I did not have to keep every episode of The Big Bang Theory that TiVo had recorded so I now have a ton of space again.<br>
<br>
Just yesterday there was a power outage at home and the UPS on one of my boxes gave out before I could do an orderly shutdown -- the resync took until early this morning to complete but it came up fine automatically when it was done. I didn't have to babysit anything. It just worked.<br>
<br>
Claude<br>
<br>
<br>
On Oct 20, 2014, at 11:18 AM, Matthew Campbell <<a href="mailto:dvdmatt@gmail.com">dvdmatt@gmail.com</a>> wrote:<br>
<br>
> Good morning everyone,<br>
><br>
><br>
> Through an unfortunate event (a visit to the comic book store near Caltech) my data needs have rapidly grown. My old data array (8 drives RAID-6) needs to be expanded.<br>
><br>
> I have added 2 more drives to the server, but unfortunately they are slightly smaller than the existing drives so they won't add directly with mdadm --add.<br>
><br>
> I am trying to reduce the size of the existing drives but it does not seem to work. I am getting no log messages or other indication as to why. Do you have any suggestions?<br>
><br>
> matt@aslan:160% sudo mount /Backups<br>
> matt@aslan:161% sudo df -k /Backups<br>
> Filesystem 1K-blocks Used Available Use% Mounted on<br>
> /dev/md0 17469360128 16917599856 549035664 97% /Backups<br>
> matt@aslan:162% sudo btrfs filesystem resize -100g /Backups<br>
> Resize '/Backups' of '-100g'<br>
> 0.000u 160.068s 1:06:09.85 4.0% 0+0k 208543776+225062784io 0pf+0w<br>
> matt@aslan:163% time sudo btrfs scrub start -Bd /Backups<br>
> scrub device /dev/md0 (id 1) done<br>
> scrub started at Mon Oct 20 00:27:31 2014 and finished after 29330 seconds<br>
> total bytes scrubbed: 15.75TiB with 0 errors<br>
> 0.185u 4877.358s 8:08:49.71 16.6% 0+0k 33835288864+47080io 10pf+0w<br>
> matt@aslan:164% df -k /Backups<br>
> Filesystem 1K-blocks Used Available Use% Mounted on<br>
> /dev/md0 17364502528 16917585648 444184208 98% /Backups<br>
> matt@aslan:165% sudo umount /Backups<br>
> matt@aslan:166% sudo mdadm --grow /dev/md0 --size=2928268288<br>
> mdadm: component size of /dev/md0 unchanged at 2929036288K<br>
> matt@aslan:167%<br>
><br>
> Note "unchanged" in the last line of output.<br>
><br>
> Thanks for any thoughts...<br>
><br>
> Matt<br>
><br>
<br>
<br>
</blockquote></div><br></div>