Need HHD Upgrade advice

Greeting Forum!

So my FreePBX is up and running smoothly, or so we thought. It seems the machine i used had a really, REALLY old HDD in it (250GB 7200K SATA with over 23000 hrs running time), YIKES! Now I get HDD Access errors 2x daily forcing me to hard boot the system…

I have 2 brand new 15K 500GB drives in there too, that were not intialized yet. I am tasked with finding the most secure/reliable way to transfer the whole contents of sda1 to sdb1, avoiding lengthy downtime…

One person I spoke to suggested running “sudo dd if=/dev/sda1 of=/dev/sdb1” and someone else says to do a full backup in FreePBX, export the backup to USB, blow out the machine and redo the distro from scratch ending with a restore from the USB…

My fear for either method is time… We are a call center running 9am to 11pm, so downtime is extremely costly ($10/hr per person * 75 people). It also needs a fix ASAP as when it dies, I have the same issue with people just sitting there and waiting.

Which option is more appropriate given my situation and is there possibly a 3rd method I may be missing?


With almost no downtime look at mondorescue for backing-up a live file system, you can do it in situ, or to another machine and then move the disk back into the first machine, pretty well everything else will take significant downtime, with a little more bravery and you could follow one of the many recipes out there to move into a raid system (which is what you should have started off with :slight_smile: )

The 15k drives are not a good idea, great for performance but they run hot and have lower MTBF failure than 7200’s or even 10k

I assume these are SAS? You have SAS and IDE in same box?

Mondo works good but I can never get the damn boot sector to restore right. Dicko sez I just can’t follow directions.

Anyway…DD would be my choice. That will grab all three partitions. Don’t copy the swap. Turn the swap service off and recreate a new swap on the new drive.

If you go the dd route, to have any chance of success you should do it on an unmounted partition, or at least in “single” mode, you will need to choose a bs=n that works best for your disks and the underlying controller as by default it will be VERY slow (several hours minimum for a 250GB drive) if there is the remotest chance that there is a problem with read/writes to/from your disks then add conv=noerror or it will probably just fail miserably at some point and you will need to start over again. If you only dd the partitions individually (/dev/sda1 for example) then the MBR will not be copied and the disk won’t boot, you can work around that by dd’ing the first 446 bytes (the boot sector, the next 68 bytes is the partition table and might or might not be useful on your new hardware) from original to new, if you do the individual partitions, you will need to manually partition the new prior to that drive appropriately and the partitions should be the same size or larger. you will need to mkswap manaually any partition used as swap also.

mondorestore with only the nuke option against the same machine with a replacement harddrive will just work and resize the new drive proportionally, complete with the mbr and without you needing to adjust fstab or the various grub needs, If you are a call center you might have huge monitor and/or voicemail structures, do that bit outside of mondo with rsync for convenience.

I might add that from experience, I always use hard partitions in fstab and grub in preference to UUID (which is great for Desktops, but not much use for raiding/drbding and cloning) as a first step in any server installation. easy to do and makes disaster recovery so much easier :wink:

Hi Dicko, I read you named Mondorescue.

I opened a new Thread about which is the best practice to follow in deploying Mondorescue to making a live image of a running FreePBX Distro (I’m a complete newbie with Mondorescue): could you then help me on that new Thread?

I don’t want to go OT here. Thanks.