When you delete a Virtual Disk on a MD3000i array, that was previously used by a Linux system, the device is not removed from the system, and Linux will still try to access it (if you use LVM for example, you’ll see lots of errors while the system scans the disks to identify PVs). This can be very inconvenient if you reassign a previously assigned LUN, as the system won’t detect the new parameters of the device.
I did not find a command similar to hot_add (used to detect new devices) to automatically remove deleted disks.
By trial and error, though, I understood that you can delete a scsi device with this method:
echo "1" > /sys/class/scsi_device/adapter:bus:target:lun/device/delete
I also wrote a small script that will try and guess the paths to your devices, when you tell it the LUN number you just deleted on the SAN array :
md300i_delete_lun bash script
Warning: this script comes with no guarantee and I won’t take any responsibility if you try to use it
. I could just test it on two RHEL 5.3 systems, and I don’t know if it will work anywhere else. Since it can be a little bit dangerous, it won’t actually delete anything, just tell you what commands you could use to delete the devices. At your own risk.
October 22nd, 2009 in
Posteet | tags:
linux |
No Comments
# get IP address of eth0 network interface
ifconfig eth0 | awk '/inet addr/ {split ($2,A,":"); print A[2]}'
source
October 16th, 2009 in
Posteet | tags:
bash,
linux |
3 Comments
dpkg-reconfigure locales doesn’t seem ask what locales you want to enable anymore (ubuntu 8.10), whatever the priority of questions you set in debconf…
The locales to be generated are listed in this file : /var/lib/locales/supported.d/local
Just add your locales there, then do a dpkg-reconfigure locales, it should generate you new locales :
skanx@tipica:~$ cat /var/lib/locales/supported.d/local
en_US.UTF-8 UTF-8
fr_FR UTF-8
skanx@tipica:~$ sudo dpkg-reconfigure locales
Generating locales…
en_US.UTF-8… up-to-date
fr_FR.UTF-8… done
April 10th, 2009 in
Posteet | tags:
dpkg,
ubuntu |
No Comments
On my eeePC 700 running ubuntu 8.10 (kernel 2.6.27-11-server), I experienced constant network disconnections with the LAN card, and found these messages in the logs :
[ 1355.131236] eth0: txs packet size do not coinsist with txd txd_:0x000005ea, txs_:0x20000754!
[ 1355.131244] txd read ptr: 0x166c
[ 1355.131249] txs-behind:0x000105ea
[ 1355.131254] txs-before:0x000105ea
[ 1365.041754] atl2: eth0 NIC Link is Up<100 Mbps Full Duplex>
I resolved the issue by installing a newer version of the atl2 module :
Get the lastest atl2 driver from: http://people.redhat.com/csnook/atl2/
Make sure you have the linux-header package corresponding to your kernel installed (package linux-headers-2.6.27-11-server in my case)
- Untar the driver source, compile with make
- Backup the atl2 module that shipped with your kernel (/lib/modules/2.6.27-11-server/kernel/ubuntu/atl2/atl2.ko in my case)
- Replace it with your new version
- sudo depmod
- reboot the computer or stop the network and reload the atl2 module
more info: https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/147639
edit: http://people.redhat.com/csnook/atl2/ seems to be unavailable… I still have the driver source, but don’t know if I can post it here… If you need it, just ask and I’ll send it by e-mail
February 18th, 2009 in
Posteet | tags:
eeepc,
ubuntu |
No Comments
The debian way (etch packages):
# apt-get install linux-source-2.6.18 kernel-package build-essential fakeroot libncurses5-dev
$ cd /usr/local/src
$ tar jxvf /usr/src/linux-source-2.6.18.tar.bz2
$ cp /boot/config-2.6.18-6-686 linux-source-2.6.18/.config
$ cd linux-source-2.6.18
$ make menuconfig
$ fakeroot make-kpkg --initrd clean
$ fakeroot make-kpkg --initrd kernel_image
Examples:
fakeroot make-kpkg --arch amd64 clean
fakeroot make-kpkg --arch amd64 --initrd --append-to-version=-skx.2008082001 kernel_image
December 17th, 2008 in
Posteet | tags:
debian,
kernel |
No Comments

L’April a pour but la promotion et la défense des logiciels libres. Je connais l’existence de l’April depuis des années, mais pourtant je n’avais jamais pensé à y adhérer… voilà qui est fait, profitant de la piqûre de rappel administrée par la campagne d’adhésion qui a lieu actuellement : “Objectif 5000 adhérents”.
L’April défend nos idées, le montant de minimal de la cotisation est de 10 euros, et je pense qu’ils seront bien utilisés.
J’adhère toutes affaires cessantes !
December 2nd, 2008 in
Free Software | tags:
april |
No Comments
Jumpcut is another very useful menu bar application. This one keeps an history of the text you have copied or cut. You can access it later with a configurable hotkey, even if you’ve copied another text in between.
Jumpcut is open sourced under the MIT License.
http://jumpcut.sourceforge.net/
November 14th, 2008 in
Software | tags:
macosx |
No Comments
Caffeine is a cute little “menu bar” program that prevents your Mac from going to sleep when you don’t want it to, with just a click. No need to change all your screen saver and energy saver preferences any more!
Great when you’re using a media player or flash movie player that doen’t do it by itself.
http://lightheadsw.com/caffeine/
November 13th, 2008 in
Software | tags:
macosx |
No Comments
The RHEL / Centos way:
edit /etc/modprobe.conf, and add :
alias <modulename> off
The Debian way:
Create a file ‘/etc/modprobe.d/<modulename>’ containing ‘blacklist <modulename>’.
Run ‘depmod -ae’ as root
Recreate your initrd with ‘update-initramfs -u’
/!\ Read http://wiki.debian.org/KernelModuleBlacklisting, then do not use ‘/etc/modprobe.d/blacklist’ and remove ‘/etc/modprobe.conf’ as it supersedes anything in /etc/modprobe.d/*.
source : Debian wiki
The Tobi way:
edit /etc/modprobe.conf, and add :
install <modulename> /bin/true
inspiration: DotMana
November 10th, 2008 in
Posteet | tags:
linux |
No Comments
When running apt-get update with a lot of sources in your sources.list, you may encounter this error:
Reading package lists... Error!
E: Dynamic MMap ran out of room
Add this line APT::Cache-Limit "25165824"; to your /etc/apt/apt.conf, and run apt-get update again.
October 13th, 2008 in
Posteet | tags:
apt-get,
debian |
No Comments