|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Hardware Questions about drivers, peripheral cabling, configuration |
![]() |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi people.
Current Circunstances: I am currently using opensuse 11.1 in a desktop PC over a hdd of 160 Gb which is getting tiny. I am happy with opensuse and i want to move the OS to another disk. Also i will live in Germany in 2 Months and i cant ship me desktop with me, but there i will buy a good Laptop. That is why buyed a new 750 Gb disk and before i go to G. i will sell my desktop with the 160Gb disk. Now i want to copy the whole system to this bigger disk and in Germany copy all again to the laptop disk. My system is partitioned in the next way: boot ~ 200M swap ~ 2G LVM ~ 60G LVM ~ 60G root ~ 10G home rest in LVM there is only 1 lv of important data. Because i have now 2 disks that i want to keep in sync, i need the next partition table to be using raid-1 and here is the problem. I understand that raid-1 is mirroring and doesnt need or requires more than 1 disk to work, but i cant find a way to create the new disk with raid-1, and after being copyed all data, format the 160 Gb disk to be in the same raid. To create the raid all tools requires 2 partitions to be added. But i need to backup first and then add the second disk. ¿How can i make this to work without buying another disk? thanks |
|
|||
|
This seems to be a common misconception about RAID1, that you can take an existing partition with a filesystem and data, pair it with an empty partition, brand them RAID1, then mirror the existing data, and voila, RAID1!
It doesn't work that way. RAID1 has to be created from the bottom up. First you label two empty partitions RAID and then assemble them. Then you format the array with a filesystem, ext3, xfs, what have you. As far as the filesystem is concerned it sees one virtual partition. Underneath, the kernel (or the RAID controller, in the case of hardware RAID) is keeping the components synchronised. |
|
|||
|
Actually you just copy to the RAID device (md?) and the kernel does the rest. You don't mount the components separately.
|
|
||||
|
I didn't say he can "rename" a partition as RAID and voila. I said to create two partitions marked as raid and that are part of a md RAID partition and THEN copy the data to to the partition that is part of this RAID 1 stripe.
__________________
How does a linux geek make love?? - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep; |
|
|||
|
That post wasn't directed at you. But since you bring it up, RAID1 is mirroring, not striping. And you don't copy to the component partition, you just copy to the RAID1 array, as I wrote already.
|
|
|||
|
no, i may have not choose the correct words to express my self. happens to me very oft in english.
i have: sda = 160 Gb in current use, with normal partitioning sdb = 750 Gb with future raid-1 i want to do is this: - create raid1 with only sdb (no second disk) - copy sda content to raid1 in whatever partition i choose - configure grub on sdb and be able to boot with root in raid1. - now i should have my data on raid1 - i can safelly delete data in sda - Partition sda in someway that i can add it to raid1 At the end i would like to have a partition like 150 Gb of raid1 between sda and sdb, both able to boot alone. A second partition in sdb with all the rest of data. Then when i go to Germany, i can take only my 750 Gb disk and leave the computer working with only one 160 Gb disk. Since my 750 Gb is lots of time bigger than 160Gb, i was thinking on first make duplicated partitions and add both partitions temporarilly to one raid, then remove one partition, add the 160Gb disk to raid1 and delete the duplicated partition creating a second raid1 with it. I am reading some blogs about it and some says that i can do that. create md0 with sdb1 and sdb2 copy data remove sdb2 from md0 create md1 with only md2 and then rebuild md0 with sdb1 and sda1 But is this safe? Wont the "rebuild" of md0 destroy my data on sdb1? What is the normal commands to add a new device to raid? thanks |
|
||||
|
I'm not sure if removing one of the disk would work since (i may be wrong) the system would be complaining about missing disk? Wouldn't LVM be better for that?
__________________
How does a linux geek make love?? - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep; |
|
|||
|
You have to backup the data somewhere else while you create the RAID because it involves a change of partition type and loss of the data in the current filesystem, ext3 I suppose.
Also it's not recommended procedure to run a RAID1 in degraded mode, which is what you propose to do when you remove sdb. And booting is a separate issue. At boot time, GRUB knows nothing about RAID. So each disk must have its own bootloader. Lots of tricky issues there. Many people get around it by having a non-RAID /boot partition. Why not just rsync the second disk to the first at regular intervals? |
|
||||
|
I guess your best option would be to use LVM mirroring. You will still need a separate /boot partition. Have a read here, hope it helps.
Chapter*7*Mirroring Data Using LVM
__________________
How does a linux geek make love?? - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep; |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|