Search Posts on Binpipe Blog

Common Linux Server Issues & Solution

Scenario:1 On one of my Production SuSE Linux (VMware Virtual Server ) , Storage team has extended partition (RDM disk ) from their end. Now how to rescan that partition and extend without rebooting from the Linux ?
Solution : In My case 8th disk on Controller-1 was extended by the Storage Team.So first rescan it. Using the below Command :
[root@binpipe ~]# echo 1 > /sys/class/scsi_device/device/rescan
In the above command replace the device info according to your setup.
[root@binpipe ~]# echo "1" > /sys/class/scsi_device/0\:0\:8\:0/device/rescan
Now resize the PV using the pvresize Command.
[root@binpipe ~]# pvresize /dev/dm-7
Check the size of Volume Group using vgs command and it should display the new extended size. Using lvextend command we can now easily extend or increase the size of lvm partition.
Scenario:2 On one of my Linux Server, Oracle database was not running because of tmpfs . Oracle Team wants to extend the tmfs file system size from 2 GB to 4GB.
Solution: tmpfs is a RAM based temporary file system which is generally mounted on /dev/shm. To to extend the tmfs file system use below steps :
Step:1 Check tmfs file system size.
[root@binpipe ~]# df -h /dev/shm/
Filesystem Size Used Avail Use% Mounted on
tmpfs      2.0G 148K 2.0G   1% /dev/shm
[root@binpipe ~]#
Step:2 Edit the /etc/fstab file.
Change the size as shown below :
tmpfs /dev/shm tmpfs size=4g 0 0
Step:3 remount the file system using mount command
[root@binpipe ~]# mount -o remount tmpfs
Step:4 Now check the tmfs file system
[root@binpipe ~]# df -h /dev/shm/
Filesystem Size Used Avail Use% Mounted on
tmpfs       4.0G 148K 4.0G  1% /dev/shm
[root@binpipe ~]#
Scenario:3 How to check which disks are used for Oracle ASM in Linux ?
Solution : To display the Oracle ASM disk, use below command :
root@binpipe:~# oracleasm listdisks
To Query a particular disk, use below command
root@binpipe:~# oracleasm querydisk -d /dev/sdq1
Scenario:4 In one of my Linux box , NAS share was mounted on the directory under /archive2015. Space of the NAS share was 150 GB and used size is 137 GB but when we try to create any file or directory we were getting “Disk Quota Exceed” error.
Solution: As it was NAS file system so from the OS perspective we can’t set quota on this. So in my case i contact to Storage team , ask them to check quota limit ( soft quota & Hard quota ). From the Storage Team we got the confirmation that quota limit is set ( Soft quota = 85 % & Hard Quota = 100 % ) and Grace period of 7 Days is also set.
So in our case soft quota limit was reached and no one has reduce the space utilization for 7 Days, so on 8th day Soft Quota limit becomes Hard Quota that’s why we are getting Disk Quota exceed error.
Scenario:5 For same file system df and du command shows different disk usage.
Solution: This could be because of open file deletion, i.e when someone delete a log file that is being used or open by other process if we try to delete this file then file name will be deleted buts it’s inode and data will not be deleted.
with the help “lsof” command we can determine the deleted files of /var that are still open :
$ lsof /var | egrep "^COMMAND|deleted"
So to release the space , we can kill the command with its PID using kill command.

No comments:

Post a Comment

Hi, Leave a comment here and one of the binary piper's will reply soon :)