LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2014, 05:07 PM   #1
Soapm
Member
 
Registered: Dec 2012
Posts: 180

Rep: Reputation: Disabled
Growing Raid5


I am growing my RAID5 from 4 2TB drives to 4 3TB drives so I can increase the size of the RAID 5 array (theoretically 9T in size).

I think there is a hiccup in my notes since the new partitions are different from the current. Here are my instructions for preparing a new drive;

Code:
cat /sys/block/sdd/queue/logical_block_size = see the logical sector size on the disk
cat /sys/block/sdd/queue/physical_block_size = see the physical sector size on the disk
parted -a optimal /dev/sdd
mklabel gpt
yes
mkpart primary 1M 100%
p = print partition table
set 1 raid on
align-check optimal 1
q = quit

fdisk  option t then type partition as fd then w to write changes to disk
Is there any advantage to using "fdisk" and setting the partitions "fd"? I noticed my current partitions are "gpt" so from the looks of things I didn't do that last step on them?

I do not want to lose my data so I need to know if these commands look right for growing the RAID?

Code:
mdadm --grow --bitmap=none /dev/md0 
mdadm --grow --size max /dev/md0
mdadm --wait /dev/md0
mdadm --grow --bitmap=internal /dev/md0

xfs_growfs /video
Again, really hoping I don't lose my data so want to get this one right...

PS... Anyway to speed up the resync process after I add each drive. It's currently taking about 24 hours to rebuild the array after adding a drive. I don't want to get in a hurry and lose data but is there a safe way of speeding up the resync?
 
Old 10-26-2014, 10:43 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,609

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
If you are using parted then you should not use fdisk at all. fdisk is only good for older msdos labeled disks. parted understand modern disks.

Not quite sure how you are doing this. If possible, create the new raid full size then copy the data file-by-file using rsync. The most dangerous way would be to replace one drive at a time, requiring 4 resyncs + grow raid + lvextend (if req'd) + grow filesytem. All with no fallback.
 
1 members found this post helpful.
Old 10-26-2014, 01:38 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,926

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by Soapm View Post
I am growing my RAID5 from 4 2TB drives to 4 3TB drives so I can increase the size of the RAID 5 array (theoretically 9T in size).
I think there is a hiccup in my notes since the new partitions are different from the current. Here are my instructions for preparing a new drive;

Is there any advantage to using "fdisk" and setting the partitions "fd"? I noticed my current partitions are "gpt" so from the looks of things I didn't do that last step on them? I do not want to lose my data so I need to know if these commands look right for growing the RAID?

Again, really hoping I don't lose my data so want to get this one right...
PS... Anyway to speed up the resync process after I add each drive. It's currently taking about 24 hours to rebuild the array after adding a drive. I don't want to get in a hurry and lose data but is there a safe way of speeding up the resync?
I agree with smallpond, but will also add to this.

If you're concerned about your data, the very first thing you need to do is MAKE A BACKUP, then make a SECOND backup to some alternative media, be it another hard drive, USB stick, tape, or whatever will hold EVERYTHING on that RAID5 array. Do NOT skip that step. If you do that, you won't have ANY worries about your data at all, and in fact, shouldn't worry now, since you SHOULD have backups.

After that, pop out the existing RAID5 disks, label them, and sit them in a drawer, UNTOUCHED. Put in new disks, build the new array, and restore from backups. This will be much, MUCH faster than what you're doing now, and will give you a built-in THIRD 'backup', which is your original disks/array. If things go horribly wrong, your system is back up and running in the time it takes you to replace the disks, and turn the system back on.
 
Old 10-26-2014, 06:38 PM   #4
Soapm
Member
 
Registered: Dec 2012
Posts: 180

Original Poster
Rep: Reputation: Disabled
I really don't have the means to backup 5.5T worth of data. That was why I invested in RAID, it at least gave me insurance through a single drive failure.

I managed to get 3 of the new drives installed and sync'd so now I'm copying all the data to the removed 2TB drives. Sorry I couldn't put the old RAID in a drawer as suggested but I don't have spare drives or money to buy more drives. But thanks for all the advice.
 
Old 10-26-2014, 10:42 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
By FAR the best way to do this is to back up everything on the current RAID, pull all of the drives out, put all of the new drives in, build the new RAID from scratch, and then copy everything back. To do it any other way is just asking for failure, ESPECIALLY with RAID 5 which is only tolerant of a single failure.

And RAID is not a backup solution, you shouldn't treat it as such.
 
Old 10-27-2014, 01:51 AM   #6
Soapm
Member
 
Registered: Dec 2012
Posts: 180

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
By FAR the best way to do this is to back up everything on the current RAID, pull all of the drives out, put all of the new drives in, build the new RAID from scratch, and then copy everything back. To do it any other way is just asking for failure, ESPECIALLY with RAID 5 which is only tolerant of a single failure.

And RAID is not a backup solution, you shouldn't treat it as such.
Thanks for the tips and if my money were endless I wouldn't, but with limited resources then I have to do the best with what I have which in this case is a solution that allows for a single drive failure. Is it a back up solution, NO... Is it some insurance, perhaps... Is it better than nothing, YES...

I just spent a weeks pay to upgrade the RAID array and two of the old drives already have a new purpose waiting for them. I can however fill the other two "old" drives with 4TB of the most desired stuff and at least have that in a drawer.

Thanks again all...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Growing RAID5 without back up data? sumasage Fedora 2 02-16-2011 03:08 AM
Multi Layer RAID50 fail (Intel SRCS14L RAID5 + 3ware 9550SX-4LP RAID5)+Linux RAID 0 BaronVonChickenPants Linux - Server 4 09-27-2009 05:06 AM
MySQL ibdata1 growing and growing and growing and... jnojr Linux - Software 1 07-20-2009 08:11 PM
Growing a software RAID5 onto fewer, larger, drives? CCThomas Linux - Server 8 01-13-2009 01:02 AM
Growing RAID5 with mdadm not working in 2.6.17? Fredde87 Linux - Software 1 08-24-2006 04:45 AM


All times are GMT -5. The time now is 08:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration