Manish Kathuria
2012-Oct-18 15:29 UTC
[CentOS] Linux Software RAID 1 - Unequal Sized Hard Disks
Has anyone created or rebuilt a Linux Software RAID having mirrored partitions on unequal sized hard disks ? There is a CentOS 5 server having two 400 GB hard disks with five mirrored partitions (software RAID 1) and one of the hard disks is dying. Since new 400 GB HDDs are not available here, we are exploring the possibility of replacing the faulty hard disk with one of a higher capacity (500 GB or more). And once it is fully replicated, we plan to replace the other 400 GB HDD also with another hard disk of the same higher capacity. Just want to know if anyone has done something similar and what are the chances of success (or data loss) ? Thanks, -- Manish
Antonio da Silva Martins Junior
2012-Oct-18 15:47 UTC
[CentOS] Linux Software RAID 1 - Unequal Sized Hard Disks
----- "Manish Kathuria" <mkathuria at tuxtechnologies.co.in> escreveu:> De: "Manish Kathuria" <mkathuria at tuxtechnologies.co.in> > Para: centos at centos.org > Enviadas: Quinta-feira, 18 de Outubro de 2012 12:29:02 (GMT-0300) Auto-Detected > Assunto: [CentOS] Linux Software RAID 1 - Unequal Sized Hard Disks > > Has anyone created or rebuilt a Linux Software RAID having mirrored > partitions on unequal sized hard disks ? There is a CentOS 5 server > having two 400 GB hard disks with five mirrored partitions (software > RAID 1) and one of the hard disks is dying. Since new 400 GB HDDs are > not available here, we are exploring the possibility of replacing the > faulty hard disk with one of a higher capacity (500 GB or more). And > once it is fully replicated, we plan to replace the other 400 GB HDD > also with another hard disk of the same higher capacity. > > Just want to know if anyone has done something similar and what are > the chances of success (or data loss) ? >Hi Manish, Well this did work. Remember Linux Soft RAID is for partitions not disks, then, you need to create the new partitions on the bigger drive at the same size of the old ones. Then replicate. When you had changed the two drives you can create a new soft RAID partition on the space leaved. But, if you are already planning on change the two disks. You can mount a new RAID1 schema using the new drives and then copy the data to the new disks. As for guarentee the safest of the data, first backup :D Antonio. -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - Support Analyst | "Only The Shadow Knows | | Universidade Estadual de Maring? - Brasil| what evil lurks in the | | NPD - N?cleo de Processamento de Dados | Heart of Men!" | | E-Mail: asmartins at uem.br / shadow at uem.br | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ "Real Programmers don?t need comments ? the code is obvious." -- Esta mensagem foi verificada pelo sistema de antivirus e acredita-se estar livre de perigo.
Bowie Bailey
2012-Oct-18 15:55 UTC
[CentOS] Linux Software RAID 1 - Unequal Sized Hard Disks
On 10/18/2012 11:29 AM, Manish Kathuria wrote:> Has anyone created or rebuilt a Linux Software RAID having mirrored > partitions on unequal sized hard disks ? There is a CentOS 5 server > having two 400 GB hard disks with five mirrored partitions (software > RAID 1) and one of the hard disks is dying. Since new 400 GB HDDs are > not available here, we are exploring the possibility of replacing the > faulty hard disk with one of a higher capacity (500 GB or more). And > once it is fully replicated, we plan to replace the other 400 GB HDD > also with another hard disk of the same higher capacity. > > Just want to know if anyone has done something similar and what are > the chances of success (or data loss) ?I've done this with a 3-drive software raid 1. It originally had 750GB drives which I replaced with 1TB drives. Swapped them out one by one configuring them with the exact same partition structure as the others and allowing each one to resync before continuing. Once they were all in, I resized the filesystem (ext3) to take advantage of the extra space. -- Bowie
Manish Kathuria
2012-Oct-18 16:53 UTC
[CentOS] Linux Software RAID 1 - Unequal Sized Hard Disks
On Thu, Oct 18, 2012 at 9:02 PM, Reindl Harald <h.reindl at thelounge.net> wrote:> > > Am 18.10.2012 17:29, schrieb Manish Kathuria: >> Has anyone created or rebuilt a Linux Software RAID having mirrored >> partitions on unequal sized hard disks ? There is a CentOS 5 server >> having two 400 GB hard disks with five mirrored partitions (software >> RAID 1) and one of the hard disks is dying. Since new 400 GB HDDs are >> not available here, we are exploring the possibility of replacing the >> faulty hard disk with one of a higher capacity (500 GB or more). And >> once it is fully replicated, we plan to replace the other 400 GB HDD >> also with another hard disk of the same higher capacity. >> >> Just want to know if anyone has done something similar and what are >> the chances of success (or data loss) ? > > no problem at all > > * remove the disk > * dd if=/dev/one-of-the-living/ of=/dev/new-disk/ bs=512 count=1 > * reboot or bring the kernel to re-read the partition table > * rebuild the raid > > the dd-trick is intented to clone the complete partition table and > MBR to the new disk and the additional space is untouched > > linux-software raid has no problem with different disk-sizes > only the used partitions must be equal > >Thanks Reindl, copying the first sector using is the simplest and foolproof way of ensuring that the exact partition table is cloned but would it also include the logical partitions ? In our case we have 5 partitions, two of which are logical ones. -- Manish