linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Setup a Raid while OS is running
@ 2005-08-04 15:20 Stefan Majer
  2005-08-04 16:48 ` Gil
  2005-08-04 18:52 ` Gordon Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Majer @ 2005-08-04 15:20 UTC (permalink / raw)
  To: linux-raid

Hi,

i have a server running on only one scsi disk. I got now one scsi disk
extra and i want to transform the actual installation to use both disks in
a raid1.
Therefore i want to mirror each partition with md.
The Question now is how to do that, if possible, without destroing the
installed OS.

I thought it should be possible to do it in the following way:

1. create the same partitions on the secondary drive
2. create a mirror for each partition with the actual installed partition
marked as "missing"
3. attach the missing partition (not sure how the specify sync direction)
4. edit fstab
5. reboot.

As u can see im afraid douing this becaus im not sure
a: how to specify sync direction and
b: if the creation of the now new superblock destroy my filesystem

So if someone have ideas, please

Greetings from munich

Stefan Majer


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

* Re: Setup a Raid while OS is running
  2005-08-04 15:20 Setup a Raid while OS is running Stefan Majer
@ 2005-08-04 16:48 ` Gil
  2005-08-04 18:52 ` Gordon Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Gil @ 2005-08-04 16:48 UTC (permalink / raw)
  To: Stefan Majer, linux-raid


Don't try to mirror your existing filesystems.  Your concern about
superblocks trashing your filesystems is valid.

This is the way I would do it:

1. attach secondary drive to running system
2. create partitions similar in size to existing ones
3. create md devices on new disk with missing mirrors
4. create new filesystems on the md devices.
5. copy the contents of your filesystems over with tar or dump or
similar.
6. tell grub to install a bootloader on your new disk.
7. try booting your new copy of the OS from the new disk

Note that the new filesystems created in step 4 will be slightly
smaller than your old filesystems even if you create the same sized
partitions on the new disk with fdisk.  This difference is the
superblock you were worried about.

At this point you'll have your still functional old disk and a new
copy of the OS you can work on.

Once you're satisfied that your new copy of the OS works properly,
repartition your old disk (or change the partition types if you made
the partitions on your new disk the same size).  Use mdadm to add
these partitions to the md devices you created in 3.  md will now
resync onto your original disk.

--Gil

Stefan Majer wrote:
> Hi,
> 
> i have a server running on only one scsi disk. I got now one scsi disk
> extra and i want to transform the actual installation to use both disks in
> a raid1.
> Therefore i want to mirror each partition with md.
> The Question now is how to do that, if possible, without destroing the
> installed OS.
> 
> I thought it should be possible to do it in the following way:
> 
> 1. create the same partitions on the secondary drive
> 2. create a mirror for each partition with the actual installed partition
> marked as "missing"
> 3. attach the missing partition (not sure how the specify sync direction)
> 4. edit fstab
> 5. reboot.
> 
> As u can see im afraid douing this becaus im not sure
> a: how to specify sync direction and
> b: if the creation of the now new superblock destroy my filesystem
> 
> So if someone have ideas, please
> 
> Greetings from munich
> 
> Stefan Majer
> 
> -
> 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


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

* Re: Setup a Raid while OS is running
  2005-08-04 15:20 Setup a Raid while OS is running Stefan Majer
  2005-08-04 16:48 ` Gil
@ 2005-08-04 18:52 ` Gordon Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Gordon Henderson @ 2005-08-04 18:52 UTC (permalink / raw)
  To: linux-raid

On Thu, 4 Aug 2005, Stefan Majer wrote:

> Hi,
>
> i have a server running on only one scsi disk. I got now one scsi disk
> extra and i want to transform the actual installation to use both disks in
> a raid1.
> Therefore i want to mirror each partition with md.
> The Question now is how to do that, if possible, without destroing the
> installed OS.
>
> I thought it should be possible to do it in the following way:
>
> 1. create the same partitions on the secondary drive

sfdisk -d /dev/sda > /tmp/sda.part
sfdisk /dev/sdb < /tmp/sda.part


> 2. create a mirror for each partition with the actual installed partition
> marked as "missing"

At this point, go & read the Software RAID-HowTo, and look for the
Root-RAID section.

Gordon

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

end of thread, other threads:[~2005-08-04 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04 15:20 Setup a Raid while OS is running Stefan Majer
2005-08-04 16:48 ` Gil
2005-08-04 18:52 ` Gordon Henderson

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).