All posts by admin

target busy when umount

I have mount webdav directory /mnt/wdav (more). And, now, I want to umount it.
but i have following error:

umount: /mnt/wdav: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)

first step : find out processes using this mount

witr$ fuser -u /mnt/wdav
/mnt/wdav: 408c(witr)

second step : identify process

witr$ ps 408
PID TTY STAT TIME COMMAND
408 pts/33 Ss 0:00 /opt/appli

third step : stop process

witr$ fuser -k /mnt/wdav

last step : safe umount

witr$ sudo umount /mnt/wdav

mount webdav directory

– install davfs2

witr$ sudo apt-get install davfs2

– create folder

witr$ sudo mkdir /mnt/wdav

– mount wbeddav

witr$ sudo mount.davfs https://webdav.witr.net /mnt/wdav
Username: witr
Password:

mount remote file systems over ssh (sshfs)

Mount remote file systems over ssh with three steps:

1. install sshfs

witr@witr-pc:~$ sudo apt-get install sshfs

2. create directory where you willi mount your remote file sustem

witr@witr-pc:~$ sudo mkdir /mnt/witrRemote

3. finally, mount the remote file system

witr@witr-pc:~$ sudo sshfs witr@serv.witr.net:myRemoteFolder/ /mnt/witrRemote/

Assumes myRemoteFolder is on witr serve home directory. See warning bellow.
————–
warn : ~ is expanded by the shell. Paths are relative on sshfs. that means : “sshfs witr@serv.witr.net:~/myRemoteFolder …” will fail with No such file or directory error.

guess ssh key passphrase

You have probably forgotten your ssh key passphrase. But you have a hunch what it might be. The simple way to check it, is to use ssh-keygen with -y argument which read private key file and print public key :

witr@witr-pc:~$ ssh-keygen -y
Enter file in which the key is (/home/witr/.ssh/id_rsa): /tmp/my_private_ssh_key
Enter passphrase:

If you input the correct passphrase, it will show you the associated public key. Otherwise, it will display

load failed

clean system data (oracle database)

Following, a useful sql request listing system tables sizes in descending order. It helps to detect which table data could be purged to save more disk space :

Audit table SYS.AUD$ could be the cause of full disk space. Administrator must control the growth and size of the audit trail.

upgrade mongodb under ubuntu

To upgrade mongodb follow steps bellow :

Note
While upgrading you have dpkg-deb error processing at step 4
/var/cache/apt/archives/mongodb-10gen_2.4.11_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

You must remove mongodb-clients before apt-get install :

Remove all references to the key before the key is to be dropped

if oracle db refuse to drop a constraint with message “Remove all references to the key before the key is to be dropped”. It’s clear that we must drop references before. But how to list these references.

Sql command bellow help to list all constraints which uses the constraint to be dropped “CONSTRAINT_TO_BE_DROPPED_NAME”

when ssh connection refused with “Too many authentication failures for x”

If you are here you have probably got following message when trying to connect with ssh:
“Received disconnect from xx.xx.xxx.xx: 2: Too many authentication failures for x”

In fact, when trying to connect, ssh send all locally registred keys to the server trying them one by one. The server will reject any key after too many keys have been rejected.

If you are using key to connect try :

ssh -i your_key -o ‘IdentitiesOnly yes’ user@server:/path/

If you are connecting without keys (login and password only) try

ssh -o ‘IdentitiesOnly yes’ user@server:/path/