Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Software RAID-5 Array Nearly Full
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2155

PostPosted: Tue Sep 06, 2016 2:51 pm    Post subject: Software RAID-5 Array Nearly Full Reply with quote

So, I have a 3 drive array with 1.5 TB drives (originally). As time went on, it became harder to find replacement 1.5 TB drives, and eventually, 2 TB drives became cheaper. One of the drives has been replaced with a 2 TB already. All that said, this weekend, the array became only a few GB from being completely full.

I am looking to upgrade the array using 2 TB drives, and the replacements are being shipped now. All that said, a backup is running as this post is being typed, and I'm looking for some instruction for upgrading.

Here is some technical info:

Code:
 ~ $ cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md127 : active raid5 sdb1[4] sda1[0] sdc1[3]
      2930269184 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]


Code:
~ $ cat /proc/partitions
   8        0 1465138584 sda
   8        1 1465136001 sda1
   8       32 1465138584 sdc
   8       33 1465136001 sdc1
   8       16 1953514584 sdb
   8       17 1465136001 sdb1



As you can see, sdb is the 2 TB drive, and only 1.5 TB has been partitioned.

So, after backup has ran, what comes next?
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Tue Sep 06, 2016 5:39 pm    Post subject: Reply with quote

Do you have a free port to attach those new harddisks w/o removing the old ones?

Create a full size partition and use `mdadm --replace` to sync it in.

Code:

mdadm /dev/md127 --add /dev/newsdx1 /dev/newsdy1
mdadm /dev/md127 --replace /dev/oldsda1 /dev/oldsdc1
cat /proc/mdstat
mdadm --wait /dev/md127


Afterwards you can disconnect your old sda sdc 1.5T discs [or use them for something else...]

Your existing 1.5T partition you need to resize to max also.

Code:

parted -- /dev/oldsdb resizepart 1 -1


This partition change might not be visible instantly if the partition is still in use (because the RAID is still running). If in doubt, reboot.

Finally make sure your RAID actually uses the 2T partition size and grow the filesystem accordingly.

Code:

mdadm /dev/md127 --size=max
resize2fs /dev/md127
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2155

PostPosted: Tue Sep 06, 2016 6:03 pm    Post subject: Reply with quote

I have no extra ports, all of them are used. Also, I'm using the XFS filesystem.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Tue Sep 06, 2016 6:06 pm    Post subject: Reply with quote

Bigun wrote:
I have no extra ports, all of them are used. Also, I'm using the XFS filesystem.


Then you have to use the riskier fail/remove/add, or temporarily via USB enclosure.

XFS you do xfs_growfs instead of resize2fs.
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2155

PostPosted: Tue Sep 06, 2016 7:09 pm    Post subject: Reply with quote

frostschutz wrote:
Bigun wrote:
I have no extra ports, all of them are used. Also, I'm using the XFS filesystem.


Then you have to use the riskier fail/remove/add, or temporarily via USB enclosure.

XFS you do xfs_growfs instead of resize2fs.


I'm fine with that, I have backups.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum