Check the mount space


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check the mount space
# 1  
Old 10-21-2014
need help urgently

Hi,

When i check the cifs = cifs i could get two dupliates of cifs present in unix. so the system couldnt check. could you please let me know how to make the change code to find out the unique one in the line 6.
Code:
 
1NTBD="/ft/sv/ss"
2check_ntfs()
3{
4 # Check that the necessary NT areas are mounted
5 [[ ! -d $NTBD ]] && error "Cannot find $NTBD"
6 [[ "$(df -n $NTBD | awk '{print $NF}')" = "cifs" ]]
7 print -u2 "$NTBD filesystem is mounted correctly"
8 return 0
}

I need to change the code to find the unique oe below.
Output:
Code:
> df -n /ft/sv/ss
/ft/sv/ss (ft45:/ss ) : cifs
/ft/sv/ss (ft45:/ss ) : cifs


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks

Last edited by vbe; 10-21-2014 at 05:32 AM..
# 2  
Old 10-21-2014
You could try this change in red which will only look at the 1st line of the df output:

Code:
[[ "$(df -n $NTBD | awk 'NR==1{print $NF}')" = "cifs" ]]

However, I feel you may have missed showing some of the code, as line six above doesn't appear to be taking any action based on the result of this "cifs" test.
This User Gave Thanks to Chubler_XL For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Checking the space for /archlog mount point script

I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected. #!/usr/bin/ksh export MAIL_LIST="tlr.voora@zamn.com" export ARCH_STATUS=`df -k... (1 Reply)
Discussion started by: dreams5617
1 Replies

2. Shell Programming and Scripting

Checking the space for /archlog mount point script

I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected. -------------------------------------------------------------------------... (0 Replies)
Discussion started by: dreams5617
0 Replies

3. Solaris

archive logs mount point space check script

I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected. -------------------------------------------------------------------------... (0 Replies)
Discussion started by: dreams5617
0 Replies

4. Solaris

How to know used disk space at a mount point?

how to check how much space is occupied when u softmount or hard mount a file? ---------- Post updated at 03:24 AM ---------- Previous update was at 03:24 AM ---------- can anyone send me the answer (2 Replies)
Discussion started by: revathireddy
2 Replies

5. Shell Programming and Scripting

Shell script for Server Mount Point space check

Does anybody have anything I can use to help me out with this one? (4 Replies)
Discussion started by: lbone007
4 Replies

6. Solaris

Increasing disk space of a mount point.

Hi I have a mount point that is in production environment, and is currently filled up. more space has been presented from same original source (EVA). Problem; 1. Can't see presented space 2. After I discover the presented space, how do I go about adding this new space to existing mount point.... (9 Replies)
Discussion started by: Targ
9 Replies

7. Solaris

Increasing allocated space to a mount - possible?

Hey guys, I am somewhat new to Solaris - and very new when it comes to mounts. My problem is that when I installed Solaris, I allocated way too little diskspace to my / mount (it first became obvious now, however, because of new needs). bash-3.00# df -h Filesystem size ... (25 Replies)
Discussion started by: brightstorm
25 Replies

8. Linux

Adding space to existing mount

I am on Red Hat Linux 4.7. I am getting this error message: Preparing... ########################################### You have insufficient diskspace in the destination directory (/usr/lib) to install xxxxxxxxxxxxx. The installation requires at least 1.5 GB free on this... (2 Replies)
Discussion started by: jxh461
2 Replies

9. UNIX for Dummies Questions & Answers

Problem in checking space of mount.Please help me

Hi everyone, I am writing a script. As a part of this script, I wanted to check the space of few mounts, If the space usage percentage of the mount crosses over a certain limit then i wanted to display a warning message. The following is the command df -k | awk ' { if (($6 == "/export/temp")... (4 Replies)
Discussion started by: Sheethal
4 Replies

10. AIX

Increase in space in mount point.

I am working in AIX 4.3.3 , here when we are doing one activity we ran out of space in one mount point, we need to increase the space in that mout point by reducing it in another mount point, can anybody help me out in carrying this activity. Vipin (3 Replies)
Discussion started by: vipin77
3 Replies
Login or Register to Ask a Question