1825795 Members
2196 Online
109687 Solutions
New Discussion

file system

 
SOLVED
Go to solution
Shivkumar
Super Advisor

file system

Dear Sirs,

We have file system mounted as shown below:-

/dev/vg00/lvol6 /var
/dev/vg00/lvol10 /var/opt/OV
/dev/vg01/lvol3 /var/adm/crash

If a file "test" is created as under:-
/var/logs/test
/var/opt/logs/test
/var/adm/logs/test

The file "test" would under which file system ?

Regards,
Shiv
12 REPLIES 12
Arunvijai_4
Honored Contributor
Solution

Re: file system

Hi Shiv, the file "test" will come under /var FS since you create every "test" file under /var. Only /var/opt/OV and /var/adm/crash are different file system.

Hope this is clear.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Thayanidhi
Honored Contributor

Re: file system

Hi,

In your case it would be /var.
The simply way to check this is go to the folder (e.g cd /var/opt/logs..) then run "bdf ." which will show the file system under which the current folder is located.

Regds
TT
Attitude (not aptitude) determines altitude.
Muthukumar_5
Honored Contributor

Re: file system

You can as,

df

Example:

file is in /tmp then,

df /tmp/test
(/tmp...)


showing it is located in /tmp. You can as well as use ncheck utility.

-Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: file system

Using ncheck utility as,

# ncheck -F

Get these informations from bdf as,

# bdf

Example:

# ncheck -F vxfs /dev/vg00/lvol4 | grep file1

-Muthu
Easy to suggest when don't know about the problem!
Cem Tugrul
Esteemed Contributor

Re: file system

Hi Shiv,
As others mentioned if you want to create
"test" file under /var/logs or /var/opt/logs
or /var/adm/log then it will locate
under /var
Just an advice,try to take a little bit care
while creating test files with the name "test" because unix systems have a command name test

baan01:/#whereis test
test: /usr/bin/test /usr/share/man/man1.Z/test.1

so you may accidently remove this file

Good Luck,

Our greatest duty in this life is to help others. And please, if you can't
Devender Khatana
Honored Contributor

Re: file system

Hi,

All these will be under /var file system only. If the initial full path of the file matches any of other mount points then only it will be under that specific file system else it will be in parent file system and that is the case here.

HTH,
Devender
Impossible itself mentions "I m possible"
Arunvijai_4
Honored Contributor

Re: file system

Hi Shiv, you can use # du or df to find out which FS it resides.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Devender Khatana
Honored Contributor

Re: file system

Hi,

Also doing a bdf in a particular path will let you know which file system that directory belongs to. The files in the directory will also belong to the same file system.

#bdf .

HTH,
Devender
Impossible itself mentions "I m possible"
Muthukumar_5
Honored Contributor

Re: file system

You can use -xdev option donot cross file system so that you can find the file availablity as,

find /var -xdev -type f -name "filename"

change /var to your file system more.

-Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: file system

# find /var -local -type f -name "test" will also list "test" where it is.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Yogeeraj_1
Honored Contributor

Re: file system

hi shiv,

One easy way to know is to run command:

bdf test

e.g.
$ bdf /etc/hosts
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 67664 136088 33% /
$



hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Muthukumar_5
Honored Contributor

Re: file system

same to bdf, use df command.

# df /stand/vmunix
first column /stand is showing the mount point.

ncheck utility is created to suit this.

-Muthu
Easy to suggest when don't know about the problem!