zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Remote Mirroring with nc and dd

November 13, 2013 by Igor Drobot Leave a Comment

Copy

Migration from Freenas all ZFS volumes to another machines lvm is pretty simple.

create on you new machine logical volume and start netcat which will write everything it receives to the new LVM of your choice:

# Source box

1
dd bs=16M if=/dev/disk/by-path/iscsi-mysql-lun-0 | nc 192.168.1.254 19000

dd bs=16M if=/dev/disk/by-path/iscsi-mysql-lun-0 | nc 192.168.1.254 19000

# Destination box (192.168.1.254)

1
nc -l -p 19000|dd bs=16M of=/dev/vg0/mysql-data

nc -l -p 19000|dd bs=16M of=/dev/vg0/mysql-data

Filed Under: Linux Tagged With: dd, FreeNAS, LVM, nc, netcat, ZFS

DRBD master/slave setup

July 7, 2011 by Igor Drobot 8 Comments

In the last time I get a lot questions and feedback to some older posts (Active/Passive Cluster) where I used DRBD. And actually I never wrote how to setup DRBD and I try to fill this gap now. Also this post will be a new ground for some new ideas and posts related to Active/Passive Clustering with KVM.

DRBD (Distributed Replicated Block Device) is a really cool cluster solution to have radundant data on two or more nodes. Everybody know RAID, DRBD is like RAID 1 over network.
[Read more…]

Filed Under: Debian, Linux, Networking Tagged With: Cluster, Debian, DRBD, drbd syncer, HA, KVM, LVM, Ubuntu

Create LVM Snapshot

May 27, 2011 by Igor Drobot Leave a Comment

I want to show you how to create a LVM snapshot on the fly, before you install some nasty updates.

I have my KVM virtual machine (/dev/vg0/Webserver) and want to upgrade it, before I go on, I want to create a LVM snapshot. In worst case it can change back to this state.

1
lvcreate -L 5000 -s -n "7.9_wheezy" /dev/vg0/devel.drobot.de

lvcreate -L 5000 -s -n "7.9_wheezy" /dev/vg0/devel.drobot.de

– L 5000 is the size in MB
-s flag is to create a snapshot
-n 7.9_wheezy is the name of new logical volume

If something goes wrong, go back to previously created snapshot:

1
2
3
lvchange -a n /dev/vg0/devel.drobot.de
lvconvert --merge /dev/vg0/7.9_wheezy
lvchange -a y /dev/vg0/devel.drobot.de

lvchange -a n /dev/vg0/devel.drobot.de lvconvert --merge /dev/vg0/7.9_wheezy lvchange -a y /dev/vg0/devel.drobot.de

Attention!
If you delete your origin volume your snapshot will be automatically deleted!

Filed Under: Debian, Linux Tagged With: lvchange, lvconvert, lvcreate, LVM, restore lvm, Snapshot

Mount LVM from liveCD

January 21, 2011 by Igor Drobot 2 Comments

Yeah after installation of Windows seven – my Grub-Bootloader was removed and I get only the Windows bootmager.

This article describe hot to mount root “/” which was created on LVM from a live CD and install GRUB Boot-Loader.

Step 1: Get a live CD in my case it was Ubuntu 10.10 Desktop edition.
[Read more…]

Filed Under: Bash, Linux Tagged With: LVM, rescue

Accessing data on guest lvm

January 10, 2011 by Igor Drobot Leave a Comment

for my KVM guests I use only LVM disks, I find it easy to use and administer.
Every time you running out of space you can resize your lvn volume.
Bus some days ago I moved some virtual servers to another physical Dom0(Host) and was a little bit confused – how to move lvm – DD was not the best idea.

There is always another way, here is my:
Very important! Shut-down virtual machine.
[Read more…]

Filed Under: Debian, Linux Tagged With: Filesystem, LVM, restore data

  • 1
  • 2
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok