Saturday, March 4, 2017

Moving a zfs pool from one disk to another

If we want to move a zfs pool with their full layout from one disk to another we can use the following approach

zfs snapshot -r pool_A@migrate
zfs send -R pool_A@migrate | zfs receive -F pool_B

zfs unmount oldpool/myfilesystem

And take a new snapshot.

zfs snapshot oldpool/myfilesystem@snapshot2

you can now do an incremental send of the difference between the two snapshots which should be very quick.

zfs send -i oldpool/myfilesystem@snapshot1 \
             oldpool/myfilesystem@snapshot2 | zfs receive newpool/myfilesystem

Wednesday, February 8, 2017

Converting markdown presentation to pdf

If we want to convert a presentation from markdown to pdf, while keeping the slide format we can use the following command:

pandoc -t beamer -s -o habitat-presentation.pdf habitat-presentation-pdf.md 

Saturday, January 21, 2017

Resuming an interrupted scp tranfer

If we stop an scp tranfer, we can resume it by using rsync in the following way:

rsync -P -e ssh local_file user@host:remote_file

Thursday, December 22, 2016

Copying streams to video/audio files using vlc

If you ever need to save a stream (either audio or video) to a file, you can do it by using vlc.

You will find more details here: http://www.dedoimedo.com/computers/vlc-streaming.html

Wednesday, December 7, 2016

Wifi analyzer

If by any chance, you would like to see what is the wifi state around you, in order for example to pick the best channel for your own wireless device, and you do not have a wifi analyzer in an android device, you do not need to look far.

NetworkManager has got you covered. Just execute:
nmcli d wifi

on your linux console and you are done.

Saturday, November 26, 2016

Gimp and rule of thirds guides

Ever wanted to use rule of thirds guides in gimp?

Here is a simple guide that works just fine: http://registry.gimp.org/node/13536

Friday, November 25, 2016

Realtek gigabit usb ethernet card with usb hub

Just got this ethernet/hub combo and I was unable to make it work. I was getting the following error:

[ 265.335354] usb 1-1.1.3: Manufacturer: Realtek
[  265.335358] usb 1-1.1.3: SerialNumber: 00E14C3600C8
[  265.428826] usb 1-1.1.3: reset high-speed USB device number 19 using ehci-pci
[  265.567413] r8152 1-1.1.3:1.0 eth1: v1.08.2
[  267.113732] r8152 1-1.1.3:1.0 enx00e14c3600c8: renamed from eth1
[  267.139576] IPv6: ADDRCONF(NETDEV_UP): enx00e14c3600c8: link is not ready
[  267.197045] IPv6: ADDRCONF(NETDEV_UP): enx00e14c3600c8: link is not ready

and no connectivity.

After some digging, I discovered that my network card is a Realtek 0bda:8153, this card is supported by the driver r8152 that already existed in my system.

Some more digging brought this on surface: https://bugzilla.redhat.com/show_bug.cgi?id=1236679

In short it seems that tlp tries to save power for me by blocking my network card. The solution is to add the following

USB_BLACKLIST="0bda:8153" in /etc/default/tlp and reconnect the card. After that everything works as expected.