Wednesday, December 26, 2018

Жан Бетч (гипноз Жан Беч) - Ковалёв

Ковалёв всё время говорит про некоего Жана Беча.
Я замучался его искать в гугле. Правильное написание его имени оказалось
 Жан Беккио (Jean Becchio).

Пишу для того, чтобы люди вводившие его имя неправильно, как и я прежде, не мучались,
привожу вариации как я сам гуглил:
Жан Бэтч психология психотерапия гипнотерапия
Жан Бечч прошлые жизни
Жан Бечче прошлые жизни
Жан Бечче гипноз
Жан Бечче
Жан Бейч
Жан Беччо
Жан Бэчче нлп
Жан Бэчел нлп
Жан Бэчел гипноз
Жан Пече
Жан Бече
Жан Бетч
Жак Беч
Жан Печ











Friday, November 9, 2018

SOLVED: Start multipath before LVM (Proxmox/Debian/SAN/QLogic HBA). Boot from multipathed LVM root device.


Problem: Proxmox see duplicated disks instead of one. And cannot boot from it (LVM fails).
Even if multipath-tools-boot is installed and initramfs is updated(as well as grub config).

Cause: possibly initramfs scripts order is broken (thus multipath is not ready yet and LVM can see only duplicated disks)
Solution: Join all necessary steps in one quick custom script and rebuild initramfs with it.
  1. Create file /etc/initramfs-tools/scripts/local-top/forcelvm with following content
  2. #!/bin/sh
    # See man INITRAMFS-TOOLS(8). Section HEADER.
    # https://manpages.debian.org/jessie/initramfs-tools/initramfs-tools.8.en.html
    
    PREREQ=""
    prereqs()
    {
       echo "$PREREQ"
    }
    case $1 in
    prereqs)
       prereqs
       exit 0
       ;;
    esac
    . /scripts/functions
    # Begin real processing below this line
    
    # Load driver for your HBA
    /sbin/modprobe qla2xxx
    # Load device-mapper multipath support
    /sbin/modprobe dm_multipath
    
    # Start multipath
    # WARNING!!! Your /etc/multipath.conf, /etc/multipath/bindings should be configured prior to this!
    
    /sbin/multipath -v3
    /sbin/multipath -ll
    
    # Check how it works. To debug 
    blkid
    sleep 5
    vgchange -ay
    
    if [ -x /sbin/kpartx -a -x /sbin/dmsetup ]; then
         /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p -part" >/dev/null
    fi
    
    # tmp. Checking again
    #tmp_my_debug=`blkid`
    #echo $tmp_my_debug
    
    # To debug initramfs:
    # You can boot your kernel with "debug" option
    # and then check /run/initramfs/initramfs.debug after boot
    # https://wiki.debian.org/InitramfsDebug 
    
    # N.B. Useful commands when dropped into the initramfs shell:
    # blkid, multipath -v3, multipath -ll, vgchange -ay and "exit" ;)
  3. Make it executable
    chmod +x /etc/initramfs-tools/scripts/local-top/forcelvm
  4. Rebuild your initramfs:
    sudo update-initramfs -u -k all
    
  5. Rebuild your grub cfg:
     sudo update-grub

Tuesday, February 20, 2018

Image + Audio = Video (for Youtube)

for i in `ls -1 *.mp3` ;
   do date;
   echo "**** Converting $i" ;
   time ffmpeg -loop 1 -i 1.jpg -i $i -c:v libx264 -tune stillimage -c:a aac -strict -2 -b:a 192k -pix_fmt yuv420p -shortest $i.mp4 ;
done