Re: raid-one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Les Mikesell wrote:
Tim wrote:
On Thu, 2007-08-16 at 08:11 -0600, Karl Larsen wrote:
    Hi Tim, I think you suffer from a fear of "fisk" :-)      Yes you
do need to be careful. Look at it this way:

No, I don't.  Whatever "fisk" means...  ;-)

    If your going to make a software raid-1 on Linux you must use a
root Terminal. A root Terminal is capable of deleting your entire
Linux! :-(

    This paper is not for a person who has no knowledge of root and
what it can do. You need to know the basics. I will add a place where
they must show this basic knowledge or not try to do raid-1.

Now you're going off on a tangent.  The only disclaimer needed, as
already mentioned by us, is to point out changing drive structures is
potentially destructive.  Make backups before altering a pre-existing
system.

With his approach he doesn't change the existing drive until the new one is known to work. The potential failure mode is that you get the wrong device name for the fdisk or mke2fs steps. There's not much sense in trying to describe Linux device names for anything but hd? devices since they are essentially randomized, so the user will be on his own there regardless of what you write anyway.

What I see you doing, and everything you've said leads to this
conclusion:  You're making the classic mistake of over-simplifying
something to the point that you completely ignore necessary aspects.

It really will boil down to a very simple set of steps:
 fdisk the new target partition
 mdadm create a raid device with a missing mirror
 mkfs a filesystem on the md device
 mkdir a temporary mount point
 mount the md device on the tmp mount point
 copy the files from the old filesystem to the new.
repeat for all filesystems
 either label the new filesystem to match the old or fix fstab/grub.conf
 install grub on the new disk
 swap disks
 reboot

Once it all works with the new disk, fdisk the old one to match if it didn't already and mdamd --add the mirror partitions.

The tricky parts are dealing with what happens if you make duplicate filesystem labels and making the new drive bootable. But those can be fixed with a rescue-mode boot.

Well guys I just set up my first raid-1 system. Here is what it said:

[root@k5di etc]# cat /proc/mdstat
Personalities : [raid1]
md5 : active raid1 sda5[0]
     5124608 blocks [2/1] [U_]
unused devices: <none>
[root@k5di etc]#

I did this over lunch and it took several fdisk efforts lots of root terminal things like mkfs and cp -a and such but now on this computer is all of f7 /dev/sdb5 and on the other hard drive I have /home at /dev/sda5 through the raid 1 system. It appears to be working fine and to do the whole thing requires more repeated things and another step to get grub happy :-)



--

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux