Monday, March 6, 2017

Tuesday, February 21, 2017

Oracle Database Appliance: random notes

How to create a shared repository

[root@oda11 ~]# oakcli create repo shared1 -dg data -size 50G

How to import a VM template

You must/can download a template from edelivery.oracle.com
You need to put the template or the assemly inside the DOM0, then import it from ODA_BASE.
[root@oda11 ~]# oakcli import vmtemplate prova -assembly /tmp/OVM_OL7U2_x86_64_PVHVM.ova -repo shared1 -node 0

How to create a VM

[root@oda11 ~]# oakcli clone vm pigna -vmtemplate prova -repo shared1 -node 0

How to create a vdisk

A vdisk that will be attacched to the VM
[root@oda11 ~]# oakcli create vdisk pignadiskl -repo shared1 -size 5G -type local

How to create a cpupool

The same pool name must be configured on each node.
[root@oda12 ~]# oakcli create cpupool provapool -numcpu 2 -node 1
[root@oda12 ~]# oakcli create cpupool provapool -numcpu 2 -node 0

How to configure the VM

Add two network interfaces

[root@oda11 ~]# oakcli configure vm pigna -network "['type=netfront,bridge=net1','type=netfront,bridge=net2']"

Enable failover

[root@oda11 ~]# oakcli configure vm pigna -failover true

Attach an additional disk

[root@oda11 ~]# oakcli modify vm pigna -attachvdisk pignadiskl

Configuring cpupool

[root@oda11 ~]# oakcli configure vm pigna -cpupool provapool

Starting the VM

[root@oda11 ~]# oakcli start vm pigna

Attacching to the console

You must ssh to the ODA_BASE using -Y flag.
[root@oda11 ~]# oakcli show vmconsole pigna
A VNC session will start

Expanding the disk space from inside the VM

This is the vdisk created before.
[root@pigna ~]# btrfs device add /dev/xvdb /
You can attach additional vdisks, and the VM OS will see them without the need to reboot it.

Adding space to the repo

[root@oda11 ~]# oakcli configure repo shared1 -incsize 25G

Monday, December 12, 2016

Percona Monitoring Plugins for Nagios on SmartOS

Using Percona monitoring plugins inside a SmartOS branded zone, I get an error related to the local command.

percona-monitoring-plugins-1.1.7/nagios/bin/pmp-check-mysql-innodb[58]: local: not found [No such file or directory]

To solve this problem, perform the following command against every script (i.e. inside the nagios/bin/ directory).

sed -i 's/^\( \{2,4\}\)local /\1typeset /' *

Monday, November 28, 2016

rsyslog gnutls: could not load module

Starting rsyslog with gnutls configured I got this error:

Nov 27 21:57:03 prometeo rsyslogd-2068: could not load module '/usr/lib64/rsyslog/lmnsd_gtls.so', rsyslog error -2078 [try http://www.rsyslog.com/e/2068 ]

The suggested link is not useful as the description (module could not be loaded - init failed) is too generic.

The problem here was that in the config file, the line DefaultNetstreamDriverCAFile was pointing to a non existent file.


Wednesday, June 15, 2016

We're sorry to see you go


We're sorry to see you go
Your LinkedIn account is now closed. Although you no longer have access to it, it'll take a few weeks for your public profile to disappear from search engines.
You may still receive invitations from LinkedIn members and groups.
Thanks,
The LinkedIn Team

Saturday, April 16, 2016

Giochini elettrificati

Per i lettori italiani.

Ho messo in piedi un sito vetrina dove condivido le mie creazioni elettroniche.
Oggetti altamente artigianali e dilettanteschi. Talvolta brutti e fatti male.

https://www.gioele.xyz

In questo sito raccolgo e presento qualche idea e qualche realizzazione, spesso maldestramente scopiazzate, di semplici e molto artigianali oggetti elettronici fatti in casa (circuiti e roba basata su Arduino) con cui far divertire in qualche modo bambine e bambini.
E magari, perché no, stimolare la loro curiosità nei confronti di hacking, DIY, elettronica e informatica.

Thursday, March 24, 2016

Arduino IDE and persistent serial port (Linux)

In the development of a little project with Arduino, I have to plug and unplug the USB cable a lot of times.
And I have a big annoyance: every time I plug the USB cable again, the port name changes from /dev/ttyUSB0 to /dev/ttyUSB1 and vice versa. So, in the IDE I have to go in Tools -> Port menu and select the right serial port every time before uploading the new sketch.
What a bore!

I've found this post, but the Arduino IDE seems that doesn't detect fancy names like /dev/arduino, but only names starting with "tty".

So my solution, in order to get a persistent name, is based on the http://hintshop.ludvig.co.nz/ blog post, but using a different port name:

sudo vi /etc/udev/rules.d/98-usb-serial.rules

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyUSB10"

Reload udev rules with:

sudo udevadm control --reload-rules -R

Now in the IDE you can select this port and it never change every time you unplug and plug the USB cable.