Thread (10 messages) 10 messages, 4 authors, 2010-03-15

Re: Growing after replacing with larger discs

From: Majed B. <hidden>
Date: 2010-03-13 18:22:14

What I meant was: If you use dd to clone an old disk to a new one of a
larger size, metadata isn't where it should be and the new disk won't
be recognized as part of an array.

So if you do that to all disks, then attempt to create a new array on
the new disks, it will cause a resync. And even if it didn't resync,
data mapping may be incorrect.

For argument's sake, let's assume that cloning the disks would work.
It means cloning 3 disks.

The other option that you presented, which I hope you avoid, is
degrading the array and presenting the new disks. This would also
require 3 resyncs.

The option where you copy the data off the old array then back to the
new one consist of 2 copy operations only. May not be as fast as a dd
operation, but still should consume less time than 3 resyncs.

Also, while copying the original data, if the filesystem has problems,
you'll see them right away and probably identify which files are
affected. I hope everything goes smooth for you, but in case such
problems occur, do NOT run fsck!
Clone the filesystem first for best assurance of data safety.

Good luck!

On Sat, Mar 13, 2010 at 9:13 PM, John Robinson
[off-list ref] wrote:
On 13/03/2010 15:21, Majed B. wrote:
quoted
You should never degrade the array to copy its contents. Its very
risky. There might be bad sectors on one or more disks and if you
don't have all disks at hand, you may not be able to rebuild the array
on the new disk.
OK that's fair, you're right I don't want to risk losing data because I was
using a degraded array.
quoted
As for using dd, as others have pointed, the metadata won't be in
place and if you create a new array after using dd, it'll still
require a resync and the data will be destroyed.
I don't see whay either it'd require a resync - although I didn't say it, I
was planning to zero the rest of the larger drives and recreate with
--assume-clean - nor why data would be destroyed if I didn't create with
--assume-clean, after all the data will all be in the right place.

But I think on balance I'm going to save the contents of the original array
to an extra drive, create a new array on the big discs, and copy the data
back. It shouldn't take too much more time than copying the discs
individually with dd, even though I'm copying the data twice rather than
once, and it's both safer and gives me a free defrag.

Cheers,

John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help