[SGVLUG] MDADM support

Michael Proctor-Smith mproctor13 at gmail.com
Tue Oct 21 21:13:23 PDT 2014


Looking at:
https://raid.wiki.kernel.org/index.php/Growing

You may need to add then set greater number of drives so that the array
knows that they are not spare drives.

On Tue, Oct 21, 2014 at 7:18 PM, Claude Felizardo <cafelizardo at gmail.com>
wrote:

> Sorry Matthew,
>
> 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.
>
> 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?
>
> 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.
>
> 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.
>
> 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.
>
> Claude
>
>
> On Oct 20, 2014, at 11:18 AM, Matthew Campbell <dvdmatt at gmail.com> wrote:
>
> > Good morning everyone,
> >
> >
> > 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.
> >
> > 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.
> >
> > 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?
> >
> > matt at aslan:160% sudo mount /Backups
> > matt at aslan:161% sudo df -k /Backups
> > Filesystem       1K-blocks        Used Available Use% Mounted on
> > /dev/md0       17469360128 16917599856 549035664  97% /Backups
> > matt at aslan:162% sudo btrfs filesystem resize -100g /Backups
> > Resize '/Backups' of '-100g'
> > 0.000u 160.068s 1:06:09.85 4.0% 0+0k 208543776+225062784io 0pf+0w
> > matt at aslan:163% time sudo btrfs scrub start -Bd /Backups
> > scrub device /dev/md0 (id 1) done
> >         scrub started at Mon Oct 20 00:27:31 2014 and finished after
> 29330 seconds
> >         total bytes scrubbed: 15.75TiB with 0 errors
> > 0.185u 4877.358s 8:08:49.71 16.6%       0+0k 33835288864+47080io 10pf+0w
> > matt at aslan:164% df -k /Backups
> > Filesystem       1K-blocks        Used Available Use% Mounted on
> > /dev/md0       17364502528 16917585648 444184208  98% /Backups
> > matt at aslan:165% sudo umount /Backups
> > matt at aslan:166% sudo mdadm --grow /dev/md0 --size=2928268288
> > mdadm: component size of /dev/md0 unchanged at 2929036288K
> > matt at aslan:167%
> >
> > Note "unchanged" in the last line of output.
> >
> > Thanks for any thoughts...
> >
> > Matt
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sgvlug.net/pipermail/sgvlug/attachments/20141021/321a9402/attachment.html>


More information about the SGVLUG mailing list