Wednesday, April 20, 2011

Can't umount on RHEL/CENTOS Error: device is busy

[root@sandbox1 ~]# umount /dev/sdb1
umount: /mnt/pen: device is busy
umount: /mnt/pen: device is busy

Solution :

[root@sandbox1 ~]# lsof | grep /mnt/pen
esd       23711   root  cwd       DIR       8,17      4096    1228794 /mnt/pen/720p BRRip x264 - HDMiCRO by Mr. KickASS
esd       23711   root    3r      REG       8,17 942758269    1229005 /mnt/pen/ - HDMiCRO by Mr. KickASS/ Mr. KickASS.mp4

[root@sandbox1 ~]# kill -9 23711


[root@sandbox1 ~]# umount /dev/sdb1

Done.

Wednesday, April 13, 2011

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

While compiling any sources in linux if you got above Error.
----------------------------------------------------
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[2]: *** [boot.o] Error 1
make[2]: Leaving directory `/mnt/resin-4.0.16/modules/c/src/resin_os'
make[1]: *** [plugins] Error 2
make[1]: Leaving directory `/mnt/resin-4.0.16/modules/c/src'
make: *** [all] Error 2

--------------------------------------------------
Please do install following lib package from YUM:
 yum -y install glibc-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.stanford.edu
 * base: mirrors.kernel.org
 * extras: mirrors.kernel.org
 * updates: mirrors.kernel.org
Setting up Install Process
Package glibc-devel-2.5-58.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package glibc-devel.i386 0:2.5-58 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================
 Package                              Arch                          Version                            Repository                     Size
===========================================================================================================================================
Installing:
 glibc-devel                          i386                          2.5-58                             base                          2.0 M

Transaction Summary
===========================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Friday, April 8, 2011

postfix/postdrop warning: uid=48: Illegal seek postfix/sendmail: fatal: (48): queue file write error

If you got the error. And you are not able to send large size/ mail attachment from postfix please do above config.

postfix/postdrop warning: uid=48: Illegal seek
postfix/sendmail: fatal: (48): queue file write error

Edit the postfix mailserver file:
vi /etc/postfix/main.cf 
Change/Add this option to  send large file size.

message_size_limit = 100000000
mailbox_size_limit = 800000000

Tuesday, April 5, 2011

[On Ubuntu Mod_proxy added to apache2] BalancerMember Can't find 'byrequests' lb method

Mod_proxy added to apache2.

apt-get install libapache2-mod-proxy-html

apt-get install libxml2-dev

Add following lines to /etc/apache2/apache2.conf :


LoadModule  proxy_module         /usr/lib/apache2/modules/mod_proxy.so
LoadModule  proxy_http_module    /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule  headers_module       /usr/lib/apache2/modules/mod_headers.so
LoadModule  deflate_module       /usr/lib/apache2/modules/mod_deflate.so
LoadFile    /usr/lib/libxml2.so

/etc/init.d/apache2 restart

Friday, April 1, 2011

Compare two file and find diff between two file in sort form.

Compare two file and find diff between two file in sort form.

It will list both file content and diff.
sdiff -s File1 File2

It will do Sort and showing complete diff.

grep -vf File2 File1