Hello all,
I have a machine with 2 SATA 250GB disks which I want to upgrade to 1TB SATAs
This is the partition structure on both disks:
Disk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 fd Linux raid autodetect /dev/sda2 26 1971 15631245 fd Linux raid autodetect /dev/sda3 1972 30401 228363975 fd Linux raid autodetect
there are 3x RAID1 arrays. First is for /boot Second if for swap Third is for LVM (contains / and other filesystems)
What is the easiest way to get this upgraded?
I thought that I could maybe dd all the LVM volumes and /boot into files, setup the new RAID1 arrays on the 1TB disks, and dd everything back? or is there an easier way?
Regards, Coert
On Mon, Jul 13, 2009 at 12:13 PM, Coert Waagmeesterlgroups@waagmeester.co.za wrote:
I have a machine with 2 SATA 250GB disks which I want to upgrade to 1TB SATAs
This is the partition structure on both disks:
Disk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 fd Linux raid autodetect /dev/sda2 26 1971 15631245 fd Linux raid autodetect /dev/sda3 1972 30401 228363975 fd Linux raid autodetect
there are 3x RAID1 arrays. First is for /boot Second if for swap Third is for LVM (contains / and other filesystems)
What is the easiest way to get this upgraded?
I thought that I could maybe dd all the LVM volumes and /boot into files, setup the new RAID1 arrays on the 1TB disks, and dd everything back? or is there an easier way?
The software RAID 1 implementation of the kernel allows the array to be extended. First you replace each old disk with the new 1TB disks and each time rebuild the array. After this the array is still only 250GB but the partitions are already 1TB in size. Then use the --grow option of mdadm to increase the array to 1TB. Then it starts rebuilded the new space. When this is ready you can use the pvextend command to tell LVM that the PV has grown. Then the new space should be available in the volume group and you can increase the LV's and the filesystems inside them.
Regards, Tim
On Mon, 2009-07-13 at 12:20 +0200, Tim Verhoeven wrote:
On Mon, Jul 13, 2009 at 12:13 PM, Coert Waagmeesterlgroups@waagmeester.co.za wrote:
I have a machine with 2 SATA 250GB disks which I want to upgrade to 1TB SATAs
This is the partition structure on both disks:
Disk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 fd Linux raid autodetect /dev/sda2 26 1971 15631245 fd Linux raid autodetect /dev/sda3 1972 30401 228363975 fd Linux raid autodetect
there are 3x RAID1 arrays. First is for /boot Second if for swap Third is for LVM (contains / and other filesystems)
What is the easiest way to get this upgraded?
I thought that I could maybe dd all the LVM volumes and /boot into files, setup the new RAID1 arrays on the 1TB disks, and dd everything back? or is there an easier way?
The software RAID 1 implementation of the kernel allows the array to be extended. First you replace each old disk with the new 1TB disks and each time rebuild the array. After this the array is still only 250GB but the partitions are already 1TB in size. Then use the --grow option of mdadm to increase the array to 1TB. Then it starts rebuilded the new space. When this is ready you can use the pvextend command to tell LVM that the PV has grown. Then the new space should be available in the volume group and you can increase the LV's and the filesystems inside them.
Regards, Tim
Great, I will give that a try.
Thanks. I will ofcourse still make backups to be on the safe side.
Regards, Coert
Just my two pence;
So just to confirm do you have 3 physical raid 1 arrays you want to merge into 1? Or are these 3 partitions on a single physical raid 1array;
If its the later I find the easiest way (providing your hardware supports this) is to set one drive as off line (so you are now in running in a degraded raid mode) and replace that 250 with a 1TB drive, then change the mode to online again and it will rebuild the raid on the 1TB drive from the remaining 250GB drive. Now take the remaining 250GB disk off line so you are running from the 1TB disk, replace the 250GB drive with the other 1TB disk and rebuild onto that one and now you have 2x1TB disks in raid 1?
James ;)
-----BEGIN GEEK CODE BLOCK----- Version: 3.1 GIT/MU/U dpu s: a--> C++>$ U+> L++> B-> P+> E?> W+++>$ N K W++ O M++>$ V- PS+++ PE++ Y+ PGP t 5 X+ R- tv+ b+> DI D+++ G+ e(+++++) h--(++) r++ z++ ------END GEEK CODE BLOCK------