Server

Make cloning hdd with dd command

Cloning a partition

From physical disk /dev/sda, partition 1, to physical disk /dev/sdb, partition 1.

dd if=/dev/sda1 of=/dev/sdb1 bs=4096 conv=notrunc,noerror,sync

If output file of (sdb1 in the example) does not exist, dd will start at the beginning of the disk and create it.
Cloning an entire hard disk

From physical disk /dev/sda to physical disk /dev/sdb

dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror,sync

This will clone the entire drive, including MBR (and therefore bootloader), all partitions, UUIDs, and data.

-notrunc or ‘do not truncate’ maintains data integrity by instructing dd not to truncate any data.
-noerror instructs dd to continue operation, ignoring all read errors. Default behavior for dd is to halt at any error.
-sync writes zeroes for read errors, so data offsets stay in sync.
-bs=4096 sets the block size to 4k, an optimal size for hard disk read/write efficiency and therefore, cloning speed.

Backing up the MBR

The MBR is stored in the the first 512 bytes of the disk. It consist of 3 parts:

The first 446 bytes contain the boot loader.
The next 64 bytes contain the partition table (4 entries of 16 bytes each, one entry for each primary partition).
The last 2 bytes contain an identifier

To save the MBR into the file “mbr.img”:

# dd if=/dev/hda of=/mnt/sda1/mbr.img bs=512 count=1

To restore (be careful : this could destroy your existing partition table and with it access to all data on the disk):

# dd if=/mnt/sda1/mbr.img of=/dev/hda

If you only want to restore the boot loader, but not the primary partition table entries, just restore the first 446 bytes of the MBR:

# dd if=/mnt/sda1/mbr.img of=/dev/hda bs=446 count=1

To restore only the partition table, one must use

# dd if=/mnt/sda1/mbr.img of=/dev/hda bs=1 skip=446 count=64

You can also get the MBR from a full dd disk image.

#dd if=/path/to/disk.img of=/mnt/sda1/mbr.img bs=512 count=1

Source : https://wiki.archlinux.org/index.php/Disk_Cloning

VM creation has failed. Reason: No ploop support in the kernel, or kernel is way too old. Make sure you have OpenVZ kernel 042stab058.7 or later running, and kernel ploop modules loaded. Creation of container private area failed – Hyper vm

Problem :

VM creation has failed. Reason: No ploop support in the kernel, or kernel is way too old. Make sure you have OpenVZ kernel 042stab058.7 or later running, and kernel ploop modules loaded. Creation of container private area failed

SOlusi :

cek file berikut :

It seems you are using EL5 kernel. Edit /etc/vz/vz.conf
change:
VE_LAYOUT=ploop
to:
VE_LAYOUT=simfs

– reboot server

can not create vps no_kernel_support_for_openvz_check_if_right_kernel – Hyper vm

Problem :

can not create vps no_kernel_support_for_openvz_check_if_right_kernel – Hyper vm

Solution

– cek versi kernel open vz

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-371.6.1.el5.028stab112.3PAE #1 SMP Thu Mar 27 20:40:50 MSK 2014 i686 i686 i386 GNU/Linux

– cek /etc/grub.conf

buat settingan nya seperti ini >> sesuaikan dengan kernel open vz kalian masing masing

[root@localhost ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title OpenVZ (2.6.18-371.6.1.el5.028stab112.3PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-371.6.1.el5.028stab112.3PAE ro root=/dev/VolGroup00/LogVol00 selinux=0
initrd /initrd-2.6.18-371.6.1.el5.028stab112.3PAE.img
title OpenVZ CentOS (2.6.18-164.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5PAE ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-164.el5PAE.img

– reboot server

Starting exim: /bin/bash: line 1: 14341 File size limit exceeded/usr/sbin/exim -bd -q1h – exim can’t start

Problem :

ga bisa ngirim mail lewat mail client / webmail ( squrle/rouncube) >> smtp problem / not connected

kalo di server : ketika restart service exim muncul nya

Starting exim: /bin/bash: line 1: 14341 File size limit exceeded/usr/sbin/exim -bd -q1h – exim can’t start

kalo ngecek isi queue ( exim -bpc)

File size limit exceeded (core dumped

SOlusi :

biasanya file exim_mainlog nya kegedean ( limited) >> hapus saja

trus coba restart exim nya