3

I have a Debian Linux machine with a 3Ware 9650SE RAID controller with a RAID6 array. tw_cli show this:

Unit     UnitType  Status         %RCmpl  %V/I/M  Port  Stripe  Size(GB)
------------------------------------------------------------------------
u0       RAID-6    VERIFYING      -       8%(P)   -     256K    5587.9    
u0-0     DISK      OK             -       -       p0    -       1862.63   
u0-1     DISK      OK             -       -       p1    -       1862.63   
u0-2     DISK      OK             -       -       p2    -       1862.63   
u0-3     DISK      OK             -       -       p3    -       1862.63   
u0-4     DISK      OK             -       -       p4    -       1862.63   
u0/v0    Volume    -              -       -       -     -       50        
u0/v1    Volume    -              -       -       -     -       5537.9 

I was wondering, is it possible with the tw_cli tool to hot-add a new disk to the machine, add it to the array and extend the file system? I know I can resize the ext3 file system, I'm just not sure about the array.

I'm asking because once this machine is deployed, I don't want to turn it off when I want to add storage capacity.

Halfgaar
  • 7,921
  • 5
  • 42
  • 81

1 Answers1

4

I may have figured it out. I had the opportunity to test it on a spare machine:

I first had this:

# tw_cli /c0 show
Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache  AVrfy
------------------------------------------------------------------------------
u0    RAID-5    OK             -       -       256K    5587.9    RiW    ON

VPort Status         Unit Size      Type  Phy Encl-Slot    Model
------------------------------------------------------------------------------
p0    OK             u0   1.82 TB   SATA  0   -            ST32000542AS
p1    OK             u0   1.82 TB   SATA  1   -            ST32000542AS
p2    OK             u0   1.82 TB   SATA  2   -            ST32000542AS
p3    OK             u0   1.82 TB   SATA  3   -            ST32000542AS
p4    OK             -    1.82 TB   SATA  4   -            ST32000542AS

Name  OnlineState  BBUReady  Status    Volt     Temp     Hours  LastCapTest
---------------------------------------------------------------------------
bbu   On           Yes       OK        OK       OK       0      xx-xxx-xxxx

A 4 disk raid 5 and one extra disk.

Then I did this:

# tw_cli /c0/u0 migrate type=raid5 disk=4
Sending migration message to /c0/u0 ... Done.

Then I had this:

# tw_cli /c0/u0 show

Unit     UnitType  Status         %RCmpl  %V/I/M  Port  Stripe  Size(GB)
------------------------------------------------------------------------
u0       Migrator  MIGRATING      -       0%      -     -       -

su0      RAID-5    OK             -       -       -     256K    5587.9
su0-0    DISK      OK             -       -       p0    -       1862.63
su0-1    DISK      OK             -       -       p1    -       1862.63
su0-2    DISK      OK             -       -       p2    -       1862.63
su0-3    DISK      OK             -       -       p3    -       1862.63
su0/v0   Volume    -              -       -       -     -       50
su0/v1   Volume    -              -       -       -     -       5537.9

du0      RAID-5    OK             -       -       -     256K    7450.54
du0-0    DISK      OK             -       -       p0    -       1862.63
du0-1    DISK      OK             -       -       p1    -       1862.63
du0-2    DISK      OK             -       -       p2    -       1862.63
du0-3    DISK      OK             -       -       p3    -       1862.63
du0-4    DISK      OK             -       -       p4    -       1862.63
du0/v0   Volume    -              -       -       -     -       N/A
du0/v1   Volume    -              -       -       -     -       N/A

su0 and du0 are probably source and destination, giving me a new and bigger u0 at the end. I would think that du0/v0 and du0/v1 will become active when the migrating is done. But this is going to take a week to migrate and I don't know if I have the patience for that...

Halfgaar
  • 7,921
  • 5
  • 42
  • 81
  • I contacted 3Ware support and they said the capacity change will show after a reboot or driver reload. – Halfgaar Feb 23 '11 at 09:26
  • 1
    according to a comment on [blog.pdark.de](http://blog.pdark.de/2007/10/25/resizing-a-3ware-raid-5-array-with-linux/#comment-5823), you can "Find the right array under `/sys/bus/scsi/drivers/sd/`, then do `echo 1 > resize` in the device’s directory (which is **0:0:0:0** or similar)". Linux will refresh the block count of the device and notify via a kernel message (dmesg) – Kl4m Jun 12 '13 at 18:49