Skip to content

Instantly share code, notes, and snippets.

Intel devices use sysctl to enable/disable flow control:
#sysctl -a|grep fc
dev.em.X.fc:3
dev.igb.X.fc:3
dev.ix.X.fc:3
# ifconfig ix0
hy001
# zfs create -s -V 50g -b 128k zroot/iscsi/lun_images01
# vi /etc/ctl.conf
auth-group ag0 {
chap hy002 iscsiforever
chap username1 anotherbigsecret
}
Convert the .iso file to .img using the convert option of hdiutil
hdiutil convert /path/to/ubuntu.iso -format UDRW -o /path/to/target.img
diskutil list
diskutil unmountDisk /dev/diskN
sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m
@nlienard
nlienard / gist:9caa9accd9ba8a8fd485
Created February 6, 2016 08:28
Clone iohyve VM remotely
zfs send -R zroot/iohyve/bichono@autorep-01312016_1454259712 | ssh 149.202.85.153 zfs recv -Fu zroot/iohyve/bichono
@nlienard
nlienard / gist:64bbfb3fba052e309ba8
Last active February 6, 2016 20:22
where is my memory ?
root@alcsys-vm52:~# free
total used free shared buffers cached
Mem: 2058732 1952924 105808 10552 13764 127776
-/+ buffers/cache: 1811384 247348
Swap: 241660 101604 140056
=> 105Mb FREE ??
root@alcsys-vm52:~# atop |grep MEM
@nlienard
nlienard / gist:754d83d8b998508c3d02
Last active February 6, 2016 23:43
OVH - Kernel générique qui marche
Quand on installe Ubuntu 15 avec le manager OVH, l'installation se fait obligatoirement avec un noyau OVH.
Pour repasser en noyau générique :
1/ installer Ubuntu 15 via le manager OVH
2/ Booter sur le kernel OVH (par default)
3/ set un passwd root (nécessaire pour la console plus tard)
root@dnxovh-hy001:~# ceph-deploy uninstall node1 node2
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.20): /usr/bin/ceph-deploy uninstall node1 node2
[ceph_deploy.install][INFO ] note that some dependencies *will not* be removed because they can cause issues with qemu-kvm
[ceph_deploy.install][INFO ] like: librbd1 and librados2
[ceph_deploy.install][DEBUG ] Uninstalling on cluster ceph hosts node1 node2
[ceph_deploy.install][DEBUG ] Detecting platform for host node1 ...
[node1][DEBUG ] connected to host: node1
[node1][DEBUG ] detect platform information from remote host
[node1][DEBUG ] detect machine type
@nlienard
nlienard / gist:ab5d057dcbb065dd194e
Created February 23, 2016 20:20
ZFS Duplicate ZPOOL remotely
root@dnxsys-web001:~ # zfs snapshot -r zdata@snapshot_for_ovh
root@dnxsys-web001:~ # zfs send -R zdata@snapshot_for_ovh | ssh 164.132.147.90 zfs recv -vFd zdata
root@inxovh-hy003 (rbx3):~# sgdisk -t 3:45B0969E-9B03-4F30-B4C6-B4B80CEFF106 /dev/sda
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Warning! Secondary partition table overlaps the last partition by
33 blocks!
# cat /etc/freebsd-update.conf
# $FreeBSD: releng/10.2/etc/freebsd-update.conf 258121 2013-11-14 09:14:33Z glebius $
# Trusted keyprint. Changing this is a Bad Idea unless you've received
# a PGP-signed email from <[email protected]> telling you to
# change it and explaining why.
KeyPrint 800651ef4b4c71c27e60786d7b487188970f4b4169cc055784e21eb71d410cc5
# Server or server pool from which to fetch updates. You can change
# this to point at a specific server if you want, but in most cases