Hello,

I currently have a RedHat Linux version 6.4 running on a physical server (HP). However, recently it has started to show a failing disk problem, with some failures at software level as well like the terminal not opening properly, and while waiting for a new replacement disk to be made available, I would like to be able to backup a whole image of the server, and eventually run it on VirtualBox or VMWare should the disk fail completely.

Any tool (free preferably) or manual steps which can be useful in my case?

Thanks.

Dani AI

Generated

A few focused, practical steps to supplement what and already described — aimed at getting a reliable image off a live RHEL 6.4 server with a failing disk and making a usable VM copy.

If you can take the machine briefly offline, do so. If not, prefer a read-only approach that minimizes writes to the failing device: copy files over the network to another host or to an attached spare disk. Check whether RAID is hardware (controller) or software (mdadm): cat /proc/mdstat. Get SMART data on the physical device if available to assess risk (smartctl -a /dev/sda). Dump the partition layout so you can recreate it on a VM:

sfdisk -d /dev/sda > /root/sda-partitions.txt

Save package list and important configs:

rpm -qa > /root/installed-rpms.txt
cp -a /etc/fstab /etc/ssh /etc/sysconfig/network-scripts /root/system-configs/

If the system uses LVM, a snapshot gives a consistent point-in-time copy but needs free space and still stresses the drive. Example flow (adjust names/sizes for your VG):

lvs
lvcreate --size 1G --snapshot --name root_snap /dev/vg0/root
mount /dev/vg0/root_snap /mnt/snapshot
rsync -aAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/snapshot/ backup:/backups/rhel6-live/
lvremove /dev/vg0/root_snap

If you prefer block-level imaging, use a live rescue environment and a tool that can write images to a network share or external disk (avoid heavy writes to the failing array).

To convert into a VM: create a target VM with equal-or-larger disk, partition (or create LVM) to match, rsync the filesystem, bind-mount /dev /proc /sys and chroot, then reinstall the bootloader and rebuild the initramfs from inside the chroot. Test the VM thoroughly before decommissioning hardware.

Final notes: keep off-site copies, make backups accessible to the IT team (learned the hard way in ’s follow-up), and verify restores by booting a test VM.

Recommended Answers

All 3 Replies

I'm going to upset someone here. After decades of such work, we backup the entire server when it is not "live." We can use any number of methods you find on the web to backup the entire server and have never had to look for software to do this for us as almost every Live Linux on USB, DVD can give us the "dd" command to clone the entire drive. I'm going to skip supplying google searches since you are running a RedHat from the year 2000 and by now you know how to do that work.

But when you ask about converting your physical RedHat 6.x to a virtual machine, RedHat gives GOLD in the instructions at
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/v2v_guide/chap-v2v_guide-p2v_migration_converting_physical_machines_to_virtual_machines

I have to ask why anyone would run a server without performing backups on a regular basis. I won't write badly about you but it's always interesting why folk do this.

Been a long time, but thanks for the heads-up. In fact the backup was done by the supplier of the server, and never shared them with IT team due to their contractual agreements. And this issue happened when the agreement had expired and no longer had the supplier to help..
Finally swapping the faulty disk with a new one solved the issue, as being in RAID 1, the rebuilding process was done.

commented: Thanks for the update. It does raise other questions about what is called the "Disaster Recovery Plan." +15

Thank you it is very useful

commented: Hey ? +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.