1. Quick check
/usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/sdX2. Run some tests if the command above reported any errors:
smartctl -t short /dev/sdX && smartctl -l selftest /dev/sdX
Entries tagged "notes".
/usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/sdX2. Run some tests if the command above reported any errors:
smartctl -t short /dev/sdX && smartctl -l selftest /dev/sdX
dd_rescue /dev/old-b0rk3d-drive /dev/new-clone-driveIt's a good idea to run the above in a screen, especially if you're doing this via the internet.
sfdisk -d /dev/existing-drive | sfdisk /dev/new-empty-driveUse `fdisk -l` before and after the partition cloning to be sure you're doing the right thing.
root@sysresccd /root % cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md3 : active raid1 sda6[1] 297780736 blocks [2/1] [U_] md1 : active raid1 sda3[1] 4192896 blocks [2/1] [U_] md2 : active raid1 sda2[1] 153597376 blocks [2/1] [U_] md0 : active raid1 sda1[1] 30716160 blocks [2/1] [U_]And now let's add partitions to our raid layout:
mdadm /dev/md0 --add /dev/sdb1 mdadm /dev/md1 --add /dev/sdb3 mdadm /dev/md2 --add /dev/sdb2 mdadm /dev/md3 --add /dev/sdb6And that's that, now we can see the raid resync'ing:
cat /proc/mdstat
export SHELL=/bin/bash chroot /mnt/clone #grub grub> find /boot/grub/stage1 (hd0,0) (hd1,0) grub> root (hd0,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded Done. grub> root (hd1,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd1) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded Done. grub>quitAnd we're done now: reboot.
ip ro replace default via GATEWAY src IPWhere GATEWAY is the default gateway of the system and IP is the new source IP address (this has to be an existing assigned IP).
script-security 2 systemI found this solution here.
Elastix is an open source Unified Communications Server software that brings together IP PBX, email, IM, faxing and collaboration functionality. It has a Web interface and includes capabilities such as a Call Center software with predictive dialing. The Elastix functionality is based on open source projects including Asterisk, HylaFAX, Openfire and Postfix. Those packages offer the PBX, fax, instant messaging and email functions, respectively.
lvcreate -L10G -nelastix-root vg0; lvcreate -L1G -nelastix-swap vg0
wget http://dl.nux.ro/xen/domU/elastix_32/elastix.tar.bz2; tar xjf elastix.tar.bz2
mkfs.ext3 /dev/vg0/elastix-root mkswap /dev/vg0/elastix-swap mkdir /mnt/elastix mount /dev/vg0/elastix-root /mnt/elastix cp -a elastix/* /mnt/elastix/ umount /mnt/elastix/
bootloader = "/usr/bin/pygrub" name = "elastix" memory = "512" disk = [ 'phy:/dev/vg0/elastix-root,sda1,w', 'phy:/dev/vg0/elastix-swap,sda2,w' ] vif = ['vifname=elastix,bridge=xenbr0'] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart'- 5 - After saving that file start the virtual machine:
xm create -c /etc/xen/auto/elastix.cfg
dumpe2fs -h /your/root/partition|grep created
sudo dumpe2fs -h /dev/sda2|grep created dumpe2fs 1.41.12 (17-May-2010) Filesystem created: Thu Dec 9 21:34:06 2010