adventures in Hard drive cloning
Adventures in hard drive cloning.
Starting point: a linux based file server with a 320GB SATA drive as a boot drive.
Overkill for sure as less than 20GB or 30GB was actually in use and needed.
In addition there was a WDGreen 3TB data drive and two WDGreen 1TB backup drives.
The issues at hand: The older drives generally take more power and we are trying to conserve; there wasn’t enough space on the two backup drives to backup the data drive; splitting the backups into two parts was a more complex system than it should be; rebooting times, while fast, could be better.
So we decided to replace the spinning boot drive with an SSD. However, there is always a problem trying to clone a larger drive to a smaller drive. Luckily, the 320GB drive was not using a lot of its space, so we rebooted into GPARTED, a safe repartitioning utility. The large root and home partitions were shrunk down to about 40GB each. Shutdown, attached the USB adapter to the 120GB SSD and used a cloning utility that came with the SSD. No luck. It aborted saying the source was bigger than the destination.
Well, that was expected.
Then we rebooted into Clonezilla, another utility, and went through the localdisk-localdisk option and it completed very quickly but with an error. Rebooting to the SSD showed a Grub error and failure.
Tried Clonezilla again and this time went with the clone partition-partition option on the three active partitions. That went well, no errors, and the resizefs part of the process worked well.
A reboot came up fast, and the login prompt was there in about 15 seconds (compared to about 60-70 with the spinning boot drive).
That went very well. Once the correct process was discovered it took maybe 15 minutes.
The old boot drive gets put into an antistatic bag and put on a shelf for awhile.
The next step in the project was to remove the two 1TB backup data drives, install the new 3TB 7200rpm drive and rsync everything from the current 3TB data drive to the new one. That took about 40 hours. When completed we ran the rsync again, to catch up on the last 40 hours of updated files.
Once reasonably sure all of the data was across, we edited the /etc/fstab file and swapped the mounting points of the two drives, saved and rebooted.
15 seconds later the main data drive was up and running on the newer, faster data drive.
The old data drive is now the new data backup drive (runs a little slower, buts that’s ok), with an uptodate copy of everything.
A couple more minutes to reenable the backup bash scripts and all is operational again.
End point:
The new system should be faster to start, faster to respond, faster to read and write data to, enough space for the data backup and use less power to boot.
Two 1TB drives average 3.3W each = 6.6W – 3TB W 4.1W = 2.5 Watts saved plus 320GB @ 2.5W = 5 watts total less 120GB SSD @2W = 3 watt savings. Hmm.. not as much as I thought.
One minor task left is to reboot into GPARTED and reexpand the root and home partitions to completely fill up the SSD.