Search This Blog

Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Thursday, February 14, 2013

Copy LVM volume over network to another LVM pool

We need to copy huge LVM volume from HOST_A to LVM on HOST_B. It can be virtual machine disk for example.
On HOST_B create LVM_HOST_B volume and after that dd over ssh with gzip. And do not use /dev/mapper

#> dd bs=1M if=LVM_HOST_A | gzip --fast -c | ssh HOST_B "gzip -d -c | dd bs=1M of=LVM_HOST_B"

Awesome!

pv utility can show progress bar for dd. pv - monitor the progress of data through a pipe.
pv -ptrb

Wednesday, September 26, 2012

sudo tune

visudo

Defaults    timestamp_timeout = 0

Thursday, June 7, 2012

bash multiline write to file


cat > ./outfile << DELIM
hello proble
h2 fadernaly
DELIM