LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2012, 01:33 AM   #1
gardar
LQ Newbie
 
Registered: Apr 2005
Location: Reykjavik, Iceland
Distribution: ArchLinux, Debian, CentOs, RHEL, Ubuntu
Posts: 22

Rep: Reputation: 3
size of backup-file for changing mdadm raid level?


First a little backstory of what I'm doing, scroll down to the bottom of this post to see my question.

My raid5 array has gotten a bit big, it's containing total 10 drives right now (I started out with 3 drives). So I am going to convert it to raid6 before it gets any bigger.

I am doing a test-run on a virtual machine with virtual drives to see that everything works flawlessly.


I created a raid5 array and then added a drive to it

Code:
mdadm --add /dev/md0 /dev/sdf1
Then I went ahead and tried to convert the array from raid5 to raid6 with this:

Code:
mdadm --grow /dev/md0 --raid-devices=5 --level=6
Then I got this error message:

Code:
mdadm level of /dev/md0 changed to raid6
mdadm: /dev/md0: Cannot grow - need backup-file
mdadm: aborting level change
So I went ahead and looked it up in the manpage.

Quote:
When relocating the first few stripes on a RAID5 or RAID6, it is not possible to keep the data on disk completely consistent and crash-proof. To provide the required safety, mdadm disables writes to the array while this "critical section" is reshaped, and takes a backup of the data that is in that section. For grows, this backup may be stored in any spare devices that the array has, however it can also be stored in a separate file specified with the --backup-file option, and is required to be specified for shrinks, RAID level changes and layout changes. If this option is used, and the system does crash during the critical period, the same file must be passed to --assemble to restore the backup and reassemble the array. When shrinking rather than growing the array, the reshape is done from the end towards the beginning, so the "critical section" is at the end of the reshape.
I went ahead and added another spare but got faced with the same error message about the missing backup file.

Went ahead and added a backup file flag

Code:
mdadm --grow /dev/md0 --raid-devices=5 --level=6 --backup-file=~/backupfile
And that worked fine, I've now got a fully working raid6 setup on my virtual machine.

My question is, how big is this backup file going to be? My real raid array consists of 2tb drives, will the backup file be as big as one drive in the array, or will it just be few megabytes or gigabytes?
I'm asking because I'm wondering if I need to buy an extra hdd for the backup file or if the backup file can just be on my OS hdd that has around 100gb free.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-06-2012, 11:57 PM   #2
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 547

Rep: Reputation: 72
Quote:
Originally Posted by gardar View Post
I'm asking because I'm wondering if I need to buy an extra hdd for the backup file or if the backup file can just be on my OS hdd that has around 100gb free.
Storage is cheap. It's temporary anyway.
 
Old 05-07-2012, 12:16 AM   #3
gardar
LQ Newbie
 
Registered: Apr 2005
Location: Reykjavik, Iceland
Distribution: ArchLinux, Debian, CentOs, RHEL, Ubuntu
Posts: 22

Original Poster
Rep: Reputation: 3
I asked on the linux-raid mailinglist and apparently the backup file is only few megabytes, around 16mb or so I also got some good advice so I won't be using a backup file after all.

The conversation on the mailing list can be seen here in case someone stumbles on this thread in the future: http://marc.info/?l=linux-raid&m=133629962721972&w=2
 
3 members found this post helpful.
Old 05-07-2012, 09:59 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,569

Rep: Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426
Very sneaky: I like

That thread is bookmarked!
 
  


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
Changing the metadata format of a RAID-0 mdadm drive towheedm Linux - Desktop 0 10-31-2011 02:08 PM
mdadm --grow --size=max does nothing (growing RAID-5) SteveMack Linux - Software 6 02-28-2011 04:01 PM
Creating backup disk image of RAID 1 array (MDADM) Caligari2k Linux - Server 1 10-29-2010 06:30 AM
[SOLVED] Backup Daemons or mdadm RAID Across Internal and External HDDs? PehJota Linux - General 6 08-18-2010 08:44 AM
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-14-2009 06:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:13 PM.

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