"First they ignore you, then they laugh at you, then they fight you, then you win." M. Gandhi

La Fibra che Ride

Ubuntu 9.10 CountDown

RIAFFERMAZIONE DEI PRINCIPI FONDANTI LA RETE INTERNET

RIAFFERMAZIONE DEI PRINCIPI FONDANTI LA RETE INTERNET

ISOC Italia, delegazione nazionale di Internet Society, preso atto del dispositivo della sentenza di primo grado,emessa il 24 febbraio scorso dal Tribunale di Milano, che ha condannato tre dirigenti di Google per violazione delle norme sulla privacy, a causa di un video rimasto presente per alcune settimane nel 2006 sul sito di Google Videos, che riprendeva un minore affetto da autismo, insultato e offeso da quattro studenti di un istituto tecnico di Torino,ritiene di dover tornare ad affermare alcuni principi fondantie imprescindibili per conservarela libertà e le potenzialità della rete internet:

[1] la rete deve rimanere aperta; nessun ostacolo deve essere posto alle sue potenzialità ed al suo uso ad esclusivo beneficio della comunità;

[2] i provider, sia quelli impegnati nel garantire l’accesso alla rete, sia quelli che operano nella distribuzione dei contenuti eteroprodotti dagli utenti, non devono essere assoggettati ad alcuna forma di controllo o di censura preventiva sui contenuti;

[3]forme di autoregolamentazione, inevitabilmente sottoposte al vaglio degli utenti stessi della rete, oltre ad essere auspicabili promettono di garantire un buon equilibrio tra gli interessi, i diritti e le esigenze di libertà e di comunicazione della conoscenza dei soggetti coinvolti;

[4] le libere espressioni in rete non devono essere impedite attraverso metodi indiretti come controlli restrittivi sull’hardware, sul software, sulle infrastrutture di comunicazione o sulle altre componenti essenziali di Internet da parte dei governi o di portatori di interessi privati;

[5] l’informazione personale generata in rete non deve essere usata in modo improprio o utilizzata da altri senza il consenso informato di chi la ha prodotta; l’informazione è di chi la genera, non di chi la veicola tecnicamente attraverso gli strumenti della rete.

Questi principi appaiono disattesi negli effetti della sentenza, che vede Google condannata – attraverso i propri dirigenti – quale intermediario meramente tecnologico della comunicazione; sicuramente le motivazioni, non appena note, daranno la possibilità di approfondire lo scenario che ha portato all’esito processuale.

ISOC Italia non può che concordare sulla necessità di applicare le norme esistenti per sanzionare i reati commessi attraverso l’uso di Internet, tuttavia ritiene che nessuna responsabilità oggettiva possa essere attribuita ai fornitori dei servizi Internet per quanto attiene i contenuti posti in rete da terzi. Non è possibile trasferire la responsabilità di ciò che è pubblicato su una piattaforma video o su un social network dal soggetto che effettua la pubblicazione al soggetto che mette a disposizione l’infrastruttura tecnologica. Le conseguenze di sentenze di questo tipo potrebbero rendere impossibile l’uso della rete nelle forme più innovative di collaborazione quali il Web 2.0 e le reti sociali, che si basano sulla condivisione di contenuti creati da milioni di persone e per i quali controlli preventivi risulterebbero discutibili e tecnicamente impossibili.

ISOC Italia sente la necessità di esprimere una forte preoccupazione, come condiviso da varie fonti autorevoli, anche a livello internazionale, che la sentenza in questione metta a rischio i principi di libertà in rete attraverso la creazione di un pericoloso precedente.

STEFANO TRUMPY
Presidente ISOC ITALIA
(Giovedì 4 marzo 2010)

Vodafone Mobile Connect for Linux

If you have a Vodafone Internet Key and you don’t want to get crazy configuring it, use this really fine package: Vodafone Mobile Connect from Betavine Forge, a Vodafone Group R&D Lab.

It has nice features like:

  • statistics about transferred bytes (rx/tx)
  • sending SMS
  • choosing your preferred network settings (gprs, umts, preferred)
  • nice Python GUI
  • automatic detection of your Internet Key
  • it will not use Network Manager

It will works fine also with recent Internet Keys which need usb_modeswitch.

I’ve tested with a 28.8 Mbps USB Internet Key Model Number K4505 under Ubuntu 9.10 64 bit.

((enjoy))

Ubuntu Karmic 9.10 on HP EliteBook 8530p - All is fine!

After reading this interesting post on Phoronix about the great increase of performance between ubuntu 9.04 and 9.10, I finally convinced myself to make the upgrade.
My first concern was about the ATI driver, which gave me some trouble with 9.04.
Anyway after a good backup, I started the upgrade, and in almost 2 hours I was up and running with 9.10, with a lot of improvements!
The upgrade installed automagically the fglrx driver version 2:8.660, my previous version (built from source) was 2:8.620, however, after the first reboot I started in recovery mode to issue the magic command “aticonfig –acpi-services=off” because I feel that this is still crucial to make the driver work.
After this safety measure, I rebooted and really appreciated the boot speed! Upstart is making a great job really!
So far, I’m very impressed by this release, my major benefits are the following:

  • Ultra fast boot and shutdown
  • Great performance of the ATI driver. The black areas that sometimes were appearing for example scrolling a Firefox full screen window have disappeared
  • Upgrading Skype to 2.1.0.81 solved the problem about the editing of my profile and avatar display
  • Performance are really increased, for example opening PDF with Evince
  • Not yet tested printing feature
  • Suspend to ram works fine
  • VMware Workstation works fine

((enjoy))

Online LUN expansion and partition resizing without reboot under Linux

If you are in the need of expanding the LUN where your Linux is installed without rebooting the server, then may be that here you can find the right answer. Your Linux must be sufficiently recent to support features like LVM version 2, ext3 on-line resizing and so on.

My setup in tihs test is the following:

A Linux RedHat 5.3 64 bit Virtual Machine with a single 300 GB LUN /dev/sda in Raw Device Mapping mode (Physical Compatibility mode) under VMware 3.5 and a Compellent SAN. Inside the single disk there is one Volume Group (vg0) with serveral Logical Volumes.

The SAN guys expanded on-line the LUN from 300 to 500 GB (a 30″ operation :-) ).

To force the rescan of partition to get the kernel aware of the new size (supposing your LUN is /dev/sda):

# echo 1 > /sys/block/sda/device/rescan

and then in dmesg you’ll see:

SCSI device sda: 1048576000 512-byte hdwr sectors (536871 MB)
sda: Write Protect is off
sda: Mode Sense: 8f 00 00 08
SCSI device sda: drive cache: write through
sda: detected capacity change from 322122547200 to 536870912000

Now you have two choices at this point: expand the partition containing the current volume group or create a new partition and extend the current volume group. I sincerely prefer the latter, since resizing the partition with fdisk is a risky operation IMVHO.

Use fdisk to create a new partition of type LVM (0×8e) in the free space. But at this point you may have trouble in the kernel re-reading the partition table:

# sfdisk -R /dev/sda
BLKRRPART: Device or resource busy

So to inform the OS of the partition table changes use partprobe(8) command which comes with the parted packages.

Verify in /proc/partitions that the kernel has updated the partition table.

Now use pvcreate /dev/sda3, then vgextend vg0 /dev/sda3 and you are done! Verify with vgdisplay that the Free PE are consistent.

To make some more stress test I made the following:

While running this command on a newly created LVM partition /dev/vg0/TRASHME mounted on /TRASH:

# dd if=/dev/zero of=TTTT bs=1024k count=30000
..... dd is running....

I tried an online resizing of the Logical Volume and the ext3 partition inside it:

# lvextend -L+10G /dev/vg0/TRASHME
Extending logical volume TRASHME to 40.00 GB
Logical volume TRASHME successfully resized
# resize2fs /dev/vg0/TRASHME
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg0/TRASHME is mounted on /TRASH; on-line resizing required
Performing an on-line resize of /dev/vg0/TRASHME to 10485760 (4k) blocks.
The filesystem on /dev/vg0/TRASHME is now 10485760 blocks long.

in the mean time dd finished his work:
30000+0 records in
30000+0 records out
31457280000 bytes (31 GB) copied, 175.612 seconds, 179 MB/s

Great! Remember to always backup your data before doing operations like this! YMMV.

((enjoy))

HOWTO Mysql Master Slave Resync

If you are using the nice master-slave replication feature of MySQL (available since early version 3.x if I remember well), it may happens that the slave may get out of sync for various reasons.
One typical error is like this:
090908 12:58:48 [ERROR] Error reading packet from server: Client requested master to start replication from impossible position ( server_errno=1236)
090908 12:58:48 [ERROR] Got fatal error 1236: ‘Client requested master to start replication from impossible position’ from master when reading data from binary log
this error can happen for example on the slave if the master crashes and the binlog isn’t updated correctly in the fsck recovery.

So here is a quick description of how to resynchronize the slave in a single master single slave configuration.

This procedure involves a stop of the slave server, while the master will have the tables in lock mode for the time of taking a snapshot/export of your databases to be copied on the slave.

Step 1. On the Slave
Issue the following commands to mysql:
STOP SLAVE; # stop the Slave I/O threads
RESET SLAVE; # forget about all the relay log files
/etc/init.d/mysql stop # stop the database

Step 2. On the Master
Issue the following commands to mysql:
mysql> RESET MASTER; # reset the bin log counter and wipe out bin log files
mysql> FLUSH TABLES WITH READ LOCK; # flush buffers and LOCK tables (both MyISAM and InnoDB)
mysql> show master status\G
*************************** 1. row ***************************
File: mysql-bin.000001
Position: 98
Binlog_Do_DB:
Binlog_Ignore_DB:
1 row in set (0.00 sec)

mysql>

Plaase take note of the file (mysql-bin.000001) and the position (98). You’ll need it later on the slave.

Now, don’t exit from the current mysql client, since you will release the lock, and we don’t want this. Take another shell and do the following:
- make a copy (gzipped tar for example) of the datafiles of MyISAM databases
- make an export of the InnoDB databases (via mysqldump –databases –lock-all-tables DBNAME1 [DBNAME2...] > dumpfile.sql ).
To reduce the down time of the master database, If you don’t have InnoDB databases and you are using LVM on the MySQL volume, you can for example take a snapshot instead of copying the datafiles (take the snapshot and then UNLOCK TABLES;).

Go back to the mysql client where you issued the “FLUSH TABLES WITH READ LOCK;” and type “UNLOCK TABLES;” or logout from the client.
Now the master is available again to mysql clients.

Step 3. Go back on the Slave
Verify that the slave mysql is STOPPED.
Copy the dumps and the archives of the databases you made in previous steps on the master to the slave.
Replace the datafiles of the MyISAM databases you got from the master. These steps may vary and can be done in different ways (scp of the datafiles, mysqldump from the slave connecting to the master and so on… that’s your choice :-) .
Edit /etc/my.cnf and insert “skip-slave-start” in the mysqld section of the file to avoid the start of the slave I/O threads.
Start the mysql instance on the slave. Delete the InnoDB databases and import them from the SQL dumps.
Now issue the following to mysql using the right parameters taken from SHOW MASTER STATUS\G above:
mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=98;
mysql> SLAVE START;

Verify that the the slave connects to the master and that is getting the binlog.
mysql> show slave status\G
....
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
....
Seconds_Behind_Master: 1634

Slave_IO_Running tells you that the slave is connected to the master, while Slave_SQL_Running says you that the slave is applying the binlog and updating the local datafiles. If they are both set to “Yes” all is fine, replication is working.
Seconds_Behind_Master is the “lag” in seconds from the slave to the master, and should decrease to 0 in a short time (depending also on the activity on the master from the UNLOCK TABLES instant).

Don’t forget to comment out the “skip-slave-start” in /etc/my.cnf so that next time mysql restart on the slave the I/O threads are automatically started.

That’s all folks, monitor the Seconds_Behind_Master status counter to know if the slave is getting out of sync.

Please refer to the MySQL Reference Manual about replication for more details.

To purge old binlog files I use this script running on the slave from root’s crontab once a week:

#!/bin/bash
CURRENT_LOGFILE=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | awk '$1 == "Master_Log_File:" {print $2}')
/usr/bin/mysql -h MASTER -e "PURGE MASTER LOGS TO '${CURRENT_LOGFILE}'"
exit $?

((enjoy))

Simple IPV4 to IPV6 address converter

A dirty 2 shell lines trick to convert a static IPV4 address in the corresponding IPV6:

ipv4=$( ip ad sh eth0 | grep "inet " | awk '{print $2}'| sed -e 's/\/.*//')
printf "2002:%02x%02x:%02x%02x::1" `echo $ipv4 | tr "." " "`

((enjoy))

Shiretoko IS Firefox, it’s only a User Agent issue

On my Ubunty Jaunty I’ve started to use the latest Firefox build using this PPA:
deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main
but the Ubuntu Mozilla Team has decided to rebrand it as Shiretoko, and this seems to break some sites which relies on the User Agent string. Using the User Agent Switcher add-on for Shiretoko, ops… Firefox, is a nice trick. Another option is to use Ubuntuzilla.

((enjoy))

Google Patents World’s Simplest Home Page

Google Patents World’s Simplest Home Page

The first patent request was made on 2004, and now the Google Home Page has received a patent for “Graphical user interface for a display screen of a communications terminal”. Is Bing already violating this patent? :-)

((enjoy))

Testing Drivel

This is a test post using Drivel.

Does it work?

((enjoy))

The Art Of Community by Jono Bacon

The Art Of Community now available.

((enjoy))

http://www.jonobacon.org/2009/08/19/the-art-of-community-now-available/The