Cruz
Votes: 0Posted On: Nov 18, 2019 12:37:52
Practically, it is impossible to restore a machine (after cloning the drive) without taking it offline for a few minutes. But it can be achieved with minimum downtime using some basic tricks. The downtime is inevitable because you need to switch the server configurations from using the initial drive to the upgraded one.
There are several ways to clone a Linux system drive using internal as well as third-party tools. But it wouldn’t be incorrect of you to think of using CAT command over other available options including the DD command. DD comes with a lot more options when it comes to copying the files however, CAT is much faster than DD when it comes to speed and performance. DD comes with a large number of options and is very useful in dealing with bigger backups such as Tape drives. But anyone with good experience with Linux environment would recommend CAT because it gets the job done quite successfully in copying the content of a partition to a new unformatted partition.
Let us now take a look at the steps involved in cloning and migrate a Linux drive to another server using CAT command
Step 1
Install a secondary drive of 2 TB size as the primary (one that will take over the previous one) drive in the machine. Once you have inserted the drive you may need to boot the machine just to verify if the drive has been successfully accepted by the system. If the server allows hot-swap of drive, you do not need to boot the machine.
Run the following command to check the newly added disc
# df
You can notice the label of the newly added disc "sdb1"
Step 2
We will now initiate the cloning process using the 'cat' command
# cat /dev/sda1 > /dev/sdb1
where, /dev/sda1 is the input drive, and, /dev/sdb1 is the output drive.
Step 3
Remove the old drive now and boot the new server and configure the network via IPMI. This may take a few minutes and that's only time you will need to take your server offline.
You are now good to go with your server with more storage space but the same old configuration.