[WBEL-users] Resizing RAID devices

Kirby C. Bohling kbohling at birddog.com
Sun May 1 13:24:42 CDT 2005


On Sun, May 01, 2005 at 08:53:41PM +0300, Alon wrote:
> Looking at my available space on the server, I see that I'm reaching levels 
> that are somewhat troublesome.
> /usr
> has 6GB of 'leftovers' so it could be nicely be pushed to /backup  (/backup 
> holds two days back of /home and /var).
> 
> 
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/md0              981M  279M  653M  30% /
> /dev/md5               26G  9.5G   15G  40% /backup
> /dev/md4               26G   12G   13G  50% /home
> none                 1000M     0 1000M   0% /dev/shm
> /dev/md3              2.0G   69M  1.8G   4% /tmp
> /dev/md1              9.7G  1.7G  7.6G  18% /usr
> /dev/md2              9.7G  3.2G  6.0G  35% /var
> 
> 
> Is it possible to resize the partitions?

Alon,

    I believe it's possible, but I wouldn't do it.  I know it is
possible to resize partitions (even RAID partitions if you are
willing to use beta tools).  Just so you know, your much better off
just using LVM next time.  I use it on my desktop machine, and have
had it running on several production servers for nearly a year on
WBEL3.0.

    Now, in terms of just straight up resizing, it's no big deal.
First you resize the filesystem to be smaller, using resize2fs.
Then you have to dig up RAID resizing tools.

This section of the RAID HOWTO:
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-10.html#ss10.1

refers to this site:
http://unthought.net/raidreconf/

    Then you resize your RAID partitions.  Now your free space might
be fragmented (I can't tell, I don't have enough information).  I'm
not sure what tools you can use to overcome such a problem.  gparted
might deal with it, I'm not sure.  This might be a technical feat to
overcome.  If it is merely a shifting problem, you are fine.  If it
is a re-ordering problem, you've got issues.  I'm not sure what tool
set that is freely available that would do it.  I'm reasonably sure
Partition Magic would deal with it, but I haven't run that in
probably 5-6 years.  It's also a for money tool.

    Okay, so now I've strung you along, making you believe it might
be possible.  However, I wouldn't do it.  I'd just back everything
up, start over and use LVM, and restore.  Depending on your usage,
LVM snapshots would let you have backups of yesterday and today
while using considerably less disk storage (never used snapshots in
production, for whatever that is worth).

    There's no way I'd do this without a backup, so I'd just plan on
having to do the restore, use LVM as it is the proper technical
solution to this problem.  Buying two new SATA drives and just doing
the migration would be much, much easier and time efficient.
Depending on the value of your time, it's a net win.

    Thanks,
        Kirby

> I don't mind rebooting from a setup disk if needed, I just never
> resized using a diskdruid or alike.  If this is possible, I need
> to resize both HDs' partitions to match. (both HDs are of 80GB
> SATA).  the question is, do I do that as RAID devices or do I need
> to remove the RAID configuration and then do a resize on each one
> of them?
> 
> 
> - Alon
> js at wsco.com 


More information about the Whitebox-users mailing list