Search This Blog

Thursday, October 30, 2014

How to Forcefully umount filesystem

fuser -km

-k =
Kill processes accessing the file.
-m =
Name specifies a file on a mounted file system or a block device that is mounted. In above example you are using

Thursday, July 24, 2014

Ubuntu Virtualbox Shared folder Mount Issue

While mounting a shared folder on Virtual box you may encounter an error saying 
Mount wrong fs type bad option.

Don't panic 

Just run below script

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions \

Sunday, June 15, 2014

sysctl linux command.

Its more likely you are not aware of this command until you install Oracle DB ;)

Lets look at how to use it .
You may encounter a warning asking you change the kernel parameter. At this point of time you start searching for how to change kernel parameter . 

sysctl is an answer to your query lets stop talking and fire some command. 
(Note : Kernel parameters are not toys to play with so be very careful while dealing with them)

First you need to see the current value of kernel parameter 
You can simple run below command to check the value.
sysctl -a |grep (parameter-name)
# sysctl -a |grep pid_max
kernel.pid_max = 32768

Once you identify the value its time to change it  .
There are two ways of doing it 
1) temporary ( parameter will only be changed as long as you don't reboot the host)
2) permanent  ( parameter will stay even after reboot)

1) temporary ( parameter will only be changed as long as you don't reboot the host)
Step 1:
Login using root
Step 2:
sysctl -w (parameter-name)=(value)

2) permanent  ( parameter will stay even after reboot)
Step 1:
Login using root
Step 2:
take a backup of /etc/sysctl.conf
#cp /etc/sysctl.conf /etc/sysctl.conf.bkp.16jun2014
Step 3: 
now check if the parameter you want to change is in the file or not 
#cat /etc/sysctl.conf |grep (parameter-name)
If it exists then change it or else add an entry at the bottom of the file.(using text editors like vi )
Step 4:
once you edit the file fire below command so that parameters will be reinitialized. 
#sysctl -p

Thursday, March 13, 2014

OVM 3 not able to detect local disk.

Sometime it is possible that You may not able create local repositories as Local disks are not shown in OVM manager .
This is possible mainly due to following reasons
 i) Server Pool in non clustered mode.
 ii) Multipathing is disabled on server.(I know it sound little stupid but that's how its build. )

 #service multipathd status
 # to start the service
 #service multipathd start  
 #moreover allow the service to start after system reboot
 #chkconfig multipathd on  
For more information please refer below link.

Thursday, January 23, 2014

How to check mounted luns ?

Install FC PCI card on server.

To check the FC PCI card port details on Server. use below commnd.

#ls /sys/class/fc_host
 host8  host9
(In above case host8 and host9 are adapters )

# cat /sys/class/fc_host/host8/port_name

# cat /sys/class/fc_host/host9/port_name

 (In above example we have 2 port on server.. With wwnn number as described in output)
You can also get above information using command below
#systool -c fc_host -A port_name

 Before scanning the fc lun  . 
Check the number of disks
# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

(In above case i have  5 disks before running the scan)

# echo "1" > /sys/class/fc_host/host8/issue_lip
# echo "1" > /sys/class/fc_host/host9/issue_lip

(Check /var/log/messages .. Sometime it may take time as its asynchronous process )
After scanning the fc lun.
Check the number of disks.
# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

(Earlier it was 5 .. We have added only one lun however due to fc adaptor's 4 port its showing 4.. We need to enable multi pathing here)
You can also ensure the above by counting the number of disks.
#fdisk -l |egrep '^Disk' |egrep -v 'dm-' ( some disks excluded to include new disk details)
In addition to existing disks i can see below 4 disks
Disk /dev/sdf: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdg: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdh: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdi: 1099.5 GB, 1099511627776 bytes

All the lun details are stored in below path.

Here comes the pain understanding the output :)

Oracle VM 3 How to find the VM Server version.

Yes that old /etc/issue file will help you find the Server version details in below format.

#cat /etc/issue
Oracle VM server release 3.2.2
Hypervisor running in 64 bit mode with Hardware Virtualization support.

Network :
IF : bond0      MAC :  IP :
IF : eth0       MAC :
IF : eth1       MAC :
IF : eth2       MAC :
IF : eth3       MAC :
IF : eth4       MAC :
IF : eth5       MAC :
IF : eth6       MAC :
IF : eth7       MAC :

cpu family      :
model           :
model name      :

Thursday, January 24, 2013

Tar gzip simplified.

I m a great fan of .Recently come across their article over Tar and Gzip commands.

I must say This guy Ramesh Doing Great stuff by simplifying the complex Linux commands.

Take a look at the article Here.

Its always a best practice to include date in tar file name .
tar cvf Directoryname-$(date +%Y%m%d).tar  Directorypath