I have a running SLES 11 SP2 physical server (Dell R series). I wish to create its image on a usb hard disk such that I can install its exact replica on another physical server. Is it possible? If yes, what is the best method to do so?
On 07/12/17 08:24, alokpandey wrote:
[color=blue]
I have a running SLES 11 SP2 physical server (Dell R series). I wish to
create its image on a usb hard disk such that I can install its exact
replica on another physical server. Is it possible? If yes, what is the
best method to do so?[/color]
Is the new physical server exactly the same make, model, hardware
specification, etc. as the running one?
Obviously the USB hard disk storage would need to be larger than the
running server’s disk(s) - this could come done to bytes as formatted
capacity will be less than advertised capacity. USB hard disk will also
need to be formatted with a file system that can take large files (I’m
guessing your hard disks are bigger than 2-4GB!).
I would boot the running server from a rescue disk then use dd to make
an image of the disk(s) saving them to the USB hard disk. Note image the
disk(s) not the individual partitions.
Use something like “dd if=/dev/sda of=/mnt/usb/disk1.img” where /dev/sda
is the disk to image and /mnt/usb is where USB hard disk is mounted.
You can then boot the new server from the same rescue disk then copy
image to hard disk with something like “dd if=/mnt/usb/disk1.img
of=/dev/sda”.
If it’s the same hardware, etc. it should then boot though the network
configuration will need adjusting to take account of different MAC
addresses.
If it’s not the same hardware then you may need additional and/or newer
drivers. Storage could be different so disk may not be /dev/sda.
HTH.
Simon
SUSE Knowledge Partner
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
Use “dump” and “restore” to create file system images. “Dump” and “restore” are provided by modern, production stable file systems. For example XFS:
https://forums.suse.com/showthread.php?10294-about-partition&p=40594#post40594
Or even better, use a virtual machine (which is hardware independent):
https://en.wikipedia.org/wiki/Virtual_machine
[CODE]Boot from SLED Installation-DVD. Press button . Choose “More” => „Rescue System“
Login „root“
mkdir /usr/lib/microcode/root
mkdir /usr/lib/microcode/home
mkdir /usr/lib/microcode/backup
mount /dev/sda1 /usr/lib/microcode/root
umount /dev/sda1
mount /dev/sda5 /usr/lib/microcode/home
umount /dev/sda5
mount /dev/sdb1 /usr/lib/microcode/backup
umount /dev/sdb1
mount
df -h
xfs_repair /dev/sda1
xfs_repair /dev/sda5
xfs_repair /dev/sdb1
mount -r /dev/sda1 /usr/lib/microcode/root
mount -r /dev/sda5 /usr/lib/microcode/home
mount /dev/sdb1 /usr/lib/microcode/backup
mount
df -h
Full Backup
xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/ /dev/sda1
xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/ /dev/sda5
df -h
umount /dev/sdb1
umount /dev/sda1
umount /dev/sda5
mount
poweroff
Remarque: „-l“ => small “L” like „Level“.[/CODE]
[CODE]Complete restore
=> Preparation (boot SLED12 installation dvd ans so on)
mount /dev/sdb1 /usr/lib/microcode/backup
umount /dev/sdb1
mount
df -h
xfs_repair /dev/sdb1
mount -r /dev/sdb1 /usr/lib/microcode/backup
umount /dev/sda1
umount /dev/sda5
mkfs.xfs -m crc=1 -fL root /dev/sda1
mkfs.xfs -m crc=1 -fL home /dev/sda5
mount /dev/sda1 /usr/lib/microcode/root
umount /dev/sda1
mount /dev/sda5 /usr/lib/microcode/home
umount /dev/sda5
mount
df -h
xfs_repair /dev/sda1
xfs_repair /dev/sda5
mount /dev/sda1 /usr/lib/microcode/root
mount /dev/sda5 /usr/lib/microcode/home
xfsrestore -f /usr/lib/microcode/root
xfsrestore -f /usr/lib/microcode/home
df -h
ls -alh /usr/lib/microcode/root
ls -alh /usr/lib/microcode/home
For SSD only:
fstrim -v /usr/lib/microcode/root
fstrim -v /usr/lib/microcode/home[/CODE]
[CODE]Install Boot Manager
=> Preparation (boot SLED12 installation dvd ans so on)
mkdir /usr/lib/microcode/root
mount /dev/sda1 /usr/lib/microcode/root
umount /dev/sda1
mount
df -h