Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

April 14 2013

clone lvm via ssh

one just creates the targetlv in the same size as the srclv (8g in this case),
and when telling pv this size for the transfer it shows all the bells and
whistles it can .. even ETA :_)

dd if=/dev/srcvg/srclv | 
pv -p -e -t  -r -a -s 8G | 
ssh -i /home/user/.ssh/sshprivatekey -C -c arcfour -l root 172.x.y.z 'dd of=/dev/targetvg/targetlv'

February 21 2012

migrate lvm based xen dom0 to another machine ..

.. or even ignore that it is xen, basically this command moves the content of an logical volume to another server, reducing bandwidth using gzip compression.

prerequisites:

  • create lvm on target machine
  • install "pv" on src machine

run

root@src:# dd if=/dev/vg/disk bs=4096 | pv | gzip -1 | ssh -p2222 targethost.org "gzip -dc | dd of=/dev/vg/disk"

on your target machine you may want to:

  • resize2fs if the target lvm is larger
  • fsck.extX /dev/vg/disk on the target machine
  • edit the domU.cfg according to your target machine
  • mount /dev/vg/disk /mnt && chroot /mnt ** edit network, hostname, hosts

November 27 2011

new linux audio findings

recent findings

streaming & radio tools

new linux aduio findings

recent findings

streaming & radio tools

March 09 2011

OVH Xen with multiple Failover IPs and a Load Balancing IP

As the previous post with bridged Xen setup was not good to make the LoadBalance IP running,
I again fiddled with routed setup and the things I learned from my friend TH. And, against
all the warnings in propably older OVH docs I just use now dev ethX as default gw in my
routing table(s). (I think before they introduced the virtual MAC they always blocked unknown
MACs (and therefore also random ones from virtualisation as well) on their switches. This
seems not to be the case anymore).

first, get two of your 3 failover IPs and attach them to your rootserver.

second, get at least a second rootserver and attach a LoadBalancing infrastructure to both
of them and then enable only your test candidate for now.

get your Xen in routed mode (xend-config.sxp):

(network-script network-route)
(vif-script     vif-route)

don't forget to restart xend!

and in domU /etc/network/interfaces easy as this: (where 2.2.2.254) is the default gw of your dom0)

auto lo
iface lo inet loopback

# fixed IP
auto eth0
iface eth0 inet static
    address 1.1.1.1
    netmask 255.255.255.255
    broadcast 1.1.1.1
    post-up /sbin/ip route add 2.2.2.2 dev eth0
    post-up /sbin/ip route add default dev eth0
    post-down /sbin/ip route del 2.2.2.2 dev eth0
    post-down /sbin/ip route del default dev eth0

# moving failover IP
auto eth1
iface eth1 inet static
    address 1.1.1.2
    netmask 255.255.255.255
    broadcast 1.1.1.2
    post-up /sbin/ip rule  add from 1.1.1.2 lookup 100
    post-up /sbin/ip route add 2.2.2.2 dev eth1 table 100
    post-up /sbin/ip route add default dev eth1 table 100
    post-down /sbin/ip rule  del from 1.1.1.2 lookup 100
    post-down /sbin/ip route del 2.2.2.2 dev eth1 table 100
    post-down /sbin/ip route del default dev eth1 table 100

# moving loadbalance IP
auto eth2
iface eth2 inet static
    address 1.1.1.3
    netmask 255.255.255.255
    broadcast 1.1.1.3
    post-up /sbin/ip rule add from 1.1.1.3 lookup 200
    post-up /sbin/ip route add 2.2.2.2 dev eth2 table 200
    post-up /sbin/ip route add default dev eth2 table 200
    post-down /sbin/ip rule  del from 1.1.1.3 lookup 200
    post-down /sbin/ip route del 2.2.2.2 dev eth2 table 200
    post-down /sbin/ip route del default dev eth2 table 200

now: profit!

March 08 2011

OVH Xen with mre than one IP

Getting new sh*t around the block, having new roots at OVH, cool offers, nice machines, decent services, okay price, worst UI for management webinterface ever :_)

first, get two of your 3 failover IPs and attach them to your rootserver.

to get xen bridged running you need to create virtual mac addresses in the ovh manager. assign those to the vif section of the domU config:

vif         = [ 'ip=1.3.3.7,mac=02:00:00:00:00:01,vifname=vif.serv01',
                'ip=1.3.3.8,mac=02:00:00:00:00:02,vifname=vif.serv02' ]

use in xend-config.sxp

(network-script 'network-bridge antispoof=yes')
(vif-script vif-bridge)

and in domU /etc/network/interfaces easy as this:

auto eth0
iface eth0 inet static
    address 1.3.3.7
    netmask 255.255.255.255
    broadcast 1.3.3.7
    post-up /sbin/ip route add default dev eth0

auto eth1
iface eth1 inet static
    address 1.3.3.8
    netmask 255.255.255.255
    broadcast 1.3.3.8
    post-up /sbin/ip rule add from 1.3.3.8 lookup 100
    post-up /sbin/ip route add default dev eth1 table 100

February 28 2011

stuffing a fucked bootloader

screwing over a fucked bootloader

problem:

 u got grub, lilo or something in your partitions but the shit doesnt boot

solution:

 fuck the harddisks MBR over to get a bootmenu that boots any fuckin partition, regardless of whats inside

how-to-repeat:


DISCLAIMER: if you wipe your harddisk(s) trying this its your dogdamn own fault.
also, dos partition labels only. no idea if this works on gpt.

NOTE: this snippet was almost finished but got fucked up on the way. it prolly sounded nicer before.

entering:

some FreeBSD bootmedium (ie. a freesbie image if that works for you or maybe something more recent: a CD, Stick etc)

boot the thing and get root.

make your mind up about which disk you want to replace the MBR of.
if there is just one disk in the box, and this is a PATA disk connected as master on the first bus, the bios will likely call it 0x80 (0x81 for the 2nd etc.).
also, in this case the os will likely call it ad0.

knowing the disks name in terms of bios and OS numbering will help in hitting the right disk.

making the mbr writable:

  sysctl kern.geom.debugflags=0x10

write a new mbr without affecting the partitions on it:

  boot0cfg -B -v -d 0x80 ad0

if everything went well, on next reboot you'll be greeted with a little chooser for booting.

August 25 2010

"mkimage" command not found - U-Boot images will not be built


life can be so easy ...

phaidros@daddl:~/workspace/openrd/openrd.git$ sudo aptitude install uboot-mkimage
The following NEW packages will be installed:
  uboot-mkimage 
0 packages upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 9,876B of archives. After unpacking 57.3kB will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu/ lucid/main uboot-mkimage 0.4build1 [9,876B]
Fetched 9,876B in 0s (61.7kB/s)      
Selecting previously deselected package uboot-mkimage.
(Reading database ... 52121 files and directories currently installed.)
Unpacking uboot-mkimage (from .../uboot-mkimage_0.4build1_i386.deb) ...
Setting up uboot-mkimage (0.4build1) ...

phaidros@daddl:~/workspace/openrd/openrd.git$ make ARCH=arm CROSS_COMPILE=/home/phaidros/workspace/openrd/arm-2010q1/bin/arm-none-linux-gnueabi- uImage
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  Kernel: arch/arm/boot/Image is ready
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  AS      arch/arm/boot/compressed/lib1funcs.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-2.6.33-rc8-00099-gb4cb3f9
Created:      Wed Aug 25 17:42:47 2010
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2561572 Bytes = 2501.54 kB = 2.44 MB
Load Address: 0x00008000
Entry Point:  0x00008000
  Image arch/arm/boot/uImage is ready

yippieh, not longer complaining about missing mkimage .. thanks ubuntu (though possibly it came directly from Debian, so thanks to you uys as well !!! )

OpenRD .. finally


yay. finally I managed to mangle my OpenRD Client board .. sigh

I had troubles, that the marge of my dev board was never stating the correct
manufacturer ID for the NAND, which made flashing newer Uboot bootloader im-
possible.

This was the error popping up whatever I tried with Uboot/OpenOCD ...

unknown NAND device found, manufacturer id: 0x00 device id: 0x00
probing failed for NAND flash device

It drove me nuts until found a solution [1]. Yay!

Now with a newer Uboot (v3.4.19) I was suddenly able to install Debian on the
SD/MMC. For that I followed the great Howto under [2].

Heh, nice. So it finally boots Debian .. and having the D-I via serial console
in my screen (hint: screen tops minicom a million times: screen /dev/ttyUSB0 115200)
just feels very nice :)

But then I got hot and wanted moar .. MUAHAHA !! .. I finally have put the Debian
install from the SD/MMC onto the internal flash, but not before converting that
flash to UBIFS, following this guide [3] ff.

Heh, so now I have an OpenRD Client, booting Debian on choice from SD/MMC or the
internal flash with either kernel 2.6.32-5-kirkwood from Debian or the Sheevakernel
from [4] with 2.6.35.3 ..

I love it!

Further down I have a list with more good-to-read-in-case-links.

[1] http://code.google.com/p/openrd/issues/detail?id=7
[2] http://www.cyrius.com/debian/kirkwood/openrd/install.html
[3] http://plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Convert_internal_flash_root_partition_to_UBIFS
[4] http://sheeva.with-linux.com/sheeva




hth :)

April 19 2010

doc of enhanced search with aptitude


linked the aptitude docs ..

.. as I regularly tend to forget, I linked the aptitude docs on http://subsignal.org/aptitude.

the enhanced search option you can find directly here:
The aptitude Search Term Quick Guide !!eleven!

now, use it.
then, fun :)

March 18 2010

shell-fm url format


what is the station url format in shell-fm?

using the nice and fantastic shell-fm player, the last-fm player in your beloved terminal,
you might wanna know which channels you can listen to and preferably in which
format you have to enter them.

All I found over the interwebz are here:

lastfm://user/${user}
lastfm://user/$USER/recommended
lastfm://user/$USER/playlist
lastfm://user/${user}/loved
lastfm://user/${user}/personal
lastfm://usertags/${user}/${usertag}
lastfm://artist/${artist}/similarartists
lastfm://artist/${artist}/fans
lastfm://globaltags/${globaltag}

Hehe, meanwhile crawling through the omniscient dump, I just found another friendly
cli player lastbash (homepage) and wikipedia article. neat.

can haz this channels e.g.:

lastbash "lastfm://globaltags/jungle"
lastbash "lastfm://globaltags/glitch"
lastbash "lastfm://user/phaidros7/neighbours"
lastbash "lastfm://artist/Salmonella Dub/similarartists"

now: fun!

January 05 2010

audiosetup

audiosetup

this is a collection of information i went through to set up a digital audio workstation (DAW) running on linux.

as far as the systems here were concerned, the distros used for the setup were debian squeeze (testing), ubuntu intrepid, karmic and lucid, for other distros take a look at http://wiki.linuxmusicians.com/doku.php?id=linux_multimedia_distro_s.

1. hardware

2. software

3. putting it all together

data rates, bit depth, midi, osc

using it

general reference

audio communication channels
resources linux audio en francais

theory

December 04 2009

xm console not working (blank)

xm console not working (blank)

on some xen domUs I recently figured that the xm console didn't come
up. so investigating the issue I found out that you gotta set the
tty in the machine's config like this:

extra       = 'xencons=tty1'

but still I get a blank screen instead of the login. solution is simple,
for systems still having an inittab (eg. debian) look for the following
line:

nano /etc/inittab

1:2345:respawn:/sbin/getty 38400 tty1

for systems which utilize upstart already (ubuntu) look for another file:

nano /etc/event.d/tty1

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/getty 38400 tty1

makes the xm console work on all my machines again.

July 03 2008

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl