linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID 0 -> 1 possible?
@ 2004-03-11 20:44 Jeff Hoffmann
  2004-03-11 23:03 ` Maarten van den Berg
  2004-03-12  5:53 ` Clemens Schwaighofer
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Hoffmann @ 2004-03-11 20:44 UTC (permalink / raw)
  To: linux-raid

Hello list,

Is it possible to convert from RAID 0 to 1 without data loss?

Given a system with two disks, three partitions on each: boot, /, and swap.

Convert / from RAID 0 to 1 without requiring a backup/reinstall/restore scenario

Any RAID-mojo-masters with the answer?


TIA,

Jeff Hoffmann

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RAID 0 -> 1 possible?
  2004-03-11 20:44 RAID 0 -> 1 possible? Jeff Hoffmann
@ 2004-03-11 23:03 ` Maarten van den Berg
  2004-03-12  5:53 ` Clemens Schwaighofer
  1 sibling, 0 replies; 6+ messages in thread
From: Maarten van den Berg @ 2004-03-11 23:03 UTC (permalink / raw)
  To: linux-raid

On Thursday 11 March 2004 21:44, Jeff Hoffmann wrote:
> Hello list,
>
> Is it possible to convert from RAID 0 to 1 without data loss?
 
No, obviously.  Raid 1 is mirrored, so your useable space is only half of your 
total capacity at best. Raid 0 uses the full capacity of the disks, so until 
you can solve how to put twice as many data onto the same space, one cannot 
convert from raid0 -> raid1 without 'losing data'...

> Given a system with two disks, three partitions on each: boot, /, and swap.
>
> Convert / from RAID 0 to 1 without requiring a backup/reinstall/restore
> scenario

Even without the <total data size> problems as outlined above, you cannot 
touch either disks of a raid 0 set without destroying data, that is the whole 
point of raid 0.  So, even an online-migration tool sounds implaudible. 

> Any RAID-mojo-masters with the answer?

I'm not a RAID-mojo-master, but then again I don't believe one needs to be one 
to answer this. It stems directly from the theory of operation of the levels. 

Maarten


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RAID 0 -> 1 possible?
  2004-03-11 20:44 RAID 0 -> 1 possible? Jeff Hoffmann
  2004-03-11 23:03 ` Maarten van den Berg
@ 2004-03-12  5:53 ` Clemens Schwaighofer
  2004-03-12 14:44   ` Jeff Hoffmann
  1 sibling, 1 reply; 6+ messages in thread
From: Clemens Schwaighofer @ 2004-03-12  5:53 UTC (permalink / raw)
  To: Jeff Hoffmann; +Cc: linux-raid

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Hoffmann wrote:
| Hello list,
|
| Is it possible to convert from RAID 0 to 1 without data loss?
|
| Given a system with two disks, three partitions on each: boot, /, and
swap.
|
| Convert / from RAID 0 to 1 without requiring a backup/reinstall/restore
| scenario
|
| Any RAID-mojo-masters with the answer?

I think that can't work unless you add two more disks. Raid 0 is strip
where 1 is mirroring.

- --
Clemens Schwaighofer - IT Engineer & System Administration
==========================================================
Tequila Japan, 6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN
Tel: +81-(0)3-3545-7703            Fax: +81-(0)3-3545-7343
http://www.tequila.jp
==========================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAUVA9jBz/yQjBxz8RAiSnAJ9qeBSBhpWLjlfUqZoGarM6smgw8gCgxnf+
+6ScO+vbTIu9u5XKNpqDrHw=
=Jvfs
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RAID 0 -> 1 possible?
  2004-03-12  5:53 ` Clemens Schwaighofer
@ 2004-03-12 14:44   ` Jeff Hoffmann
  2004-03-12 15:28     ` Paul Clements
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Hoffmann @ 2004-03-12 14:44 UTC (permalink / raw)
  To: Clemens Schwaighofer; +Cc: linux-raid



On 03/12/04 00:53, Clemens Schwaighofer wrote:

> | Convert / from RAID 0 to 1 without requiring a backup/reinstall/restore
> | scenario
> |
> | Any RAID-mojo-masters with the answer?
> 
> I think that can't work unless you add two more disks. Raid 0 is strip
> where 1 is mirroring.

Indeed.  In my case, the data actually on the partition is < 25%.  Perhaps 
there's a way to shrink the RAID 0 set?  That would allow a new partition (not 
striped) to be created to store the data.

Thanks for your input,

Jeff Hoffmann

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RAID 0 -> 1 possible?
  2004-03-12 14:44   ` Jeff Hoffmann
@ 2004-03-12 15:28     ` Paul Clements
  2004-03-12 19:31       ` Jeff Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Clements @ 2004-03-12 15:28 UTC (permalink / raw)
  To: Jeff Hoffmann; +Cc: linux-raid

Jeff Hoffmann wrote:

> > | Convert / from RAID 0 to 1 without requiring a backup/reinstall/restore
> > | scenario

> Indeed.  In my case, the data actually on the partition is < 25%. 

Well, in that case you just might be able to do it. You'll need to
shrink your filesystem (if you have one) ala resize2fs or similar. Then
raidreconf the raid0. Then edit the partition table (there are tools to
help with this, or just use fdisk very carefully) to shrink the
partition. Then you can create a new partition and dump the data there.
Create another similarly sized partition and raid1 them together...

It's certainly possible...but it's starting to sound like a
backup/restore might be easier than all that (you probably want to
backup before doing these types of things anyway, if you care about the
data).

--
Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RAID 0 -> 1 possible?
  2004-03-12 15:28     ` Paul Clements
@ 2004-03-12 19:31       ` Jeff Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Hoffmann @ 2004-03-12 19:31 UTC (permalink / raw)
  To: Paul Clements; +Cc: linux-raid

On 03/12/04 10:28, Paul Clements wrote:
> Well, in that case you just might be able to do it. You'll need to
> shrink your filesystem (if you have one) ala resize2fs or similar. Then
> raidreconf the raid0. Then edit the partition table (there are tools to
> help with this, or just use fdisk very carefully) to shrink the
> partition. Then you can create a new partition and dump the data there.
> Create another similarly sized partition and raid1 them together...

That seems like it would work, but I thought raidreconf was used for adding 
disks to arrays, not making them smaller.  How do you use raidreconf in this manner?

Thanks for your help,

Jeff Hoffmann


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-03-12 19:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11 20:44 RAID 0 -> 1 possible? Jeff Hoffmann
2004-03-11 23:03 ` Maarten van den Berg
2004-03-12  5:53 ` Clemens Schwaighofer
2004-03-12 14:44   ` Jeff Hoffmann
2004-03-12 15:28     ` Paul Clements
2004-03-12 19:31       ` Jeff Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).