LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2011, 11:34 PM   #1
JET-33
Member
 
Registered: Nov 2006
Posts: 80

Rep: Reputation: 15
checking where folders are mounted


how can i check from console where folders are mounted?

i want to be able to check what partitions certain folders are on.
 
Old 05-09-2011, 11:38 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,137
Blog Entries: 2

Rep: Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840Reputation: 4840
Just type
Code:
mount
without parameters.
 
Old 05-09-2011, 11:48 PM   #3
JET-33
Member
 
Registered: Nov 2006
Posts: 80

Original Poster
Rep: Reputation: 15
tried that, its not showing me what im after
 
Old 05-09-2011, 11:56 PM   #4
uppalagayatri
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Rep: Reputation: 1
Quote:
Originally Posted by JET-33 View Post
how can i check from console where folders are mounted?

i want to be able to check what partitions certain folders are on.

Hi

Have you tried
#df -Th

just try once
 
Old 05-10-2011, 12:00 AM   #5
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 601

Rep: Reputation: Disabled
Hmm... mount does exactly what you asked in your first post. It shows the partition and the folder that is mounted to it.

How about this:

~$ df -hT

If that does not do it then give us a bit more information on what you are looking for.
 
Old 05-10-2011, 12:33 AM   #6
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Try this:
'cat /etc/fstab'. This will show all the mounts with a lot of additional information.
Hope this helps.
 
Old 05-10-2011, 12:57 AM   #7
JET-33
Member
 
Registered: Nov 2006
Posts: 80

Original Poster
Rep: Reputation: 15
still no joy.

the software im working with is a linux based distro. by default, it creates a folder location such as /Yourdata and then it automatically creates 2 folders within that, /Yourdata/data and /Yourdata/databases, because the data that is saved is split into metadata which goes into /databases and normal data which goes into /data

in the build process, its better to separate the locations so sometimes if there is enough disk space in the array(s) 2 partitions are created manually. one example of a setup would be:

ARRAY1
/boot 100MB EXT3
SWAP 4GB
/ 10GB EXT3
/Yourdata VxFS (remaining space)

ARRAY2
/Yourdata/data VxFS (all space)

in this setup, the /Yourdata/databases partition hasnt been created manually so i assume it mounts it somewhere within /Yourdata on ARRAY1, but how do i check?

when ever i do a df -hl to check, it shoes me /Yourdata and /Yourdata/data but is there a way i cna find out exactly where /Yourdata/databases is?
 
Old 05-10-2011, 01:08 AM   #8
JET-33
Member
 
Registered: Nov 2006
Posts: 80

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by SilverBack View Post
Try this:
'cat /etc/fstab'. This will show all the mounts with a lot of additional information.
Hope this helps.
thanks. maybe im being a bit unclear (im fairly new to linux)

maybe its not a mount point. i just want to find out where a certain folder is located eg what partition is it on?
 
Old 05-10-2011, 01:21 AM   #9
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
let me join in to this discussion

when i do mount i get this
Code:
# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
ip:/CVBDISK on /CVBDISK type nfs 
name:/VOLUME1/PUBLIC on /nasdisk4 type nfs
/dev/ram0 on /ramdisk type ext2 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
and when i do df -Th i get this
Code:
# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
              ext3    131G   24G  101G  20% /
/dev/cciss/c0d0p1
              ext3     99M   36M   58M  39% /boot
tmpfs        tmpfs    1.8G     0  1.8G   0% /dev/shm
ip:/CVBDISK
               nfs    137G  124G   13G  91% /CVBDISK
name:/VOLUME1/PUBLIC
               nfs    1.4T  1.1T  360G  75% /nasdisk4
/dev/ram0     ext2    124M  3.3M  121M   3% /ramdisk
so what does this all mean?
I'm also trying to find my NFS mountpoints, but i get a lot of different possibilities, so i don't know which to take...
I only need the name and/or the place of the mount (not the type of mount, size, ...)
so can someone clear that one out?
It would be greatly appreciated!

Kind regards

Brownie
 
Old 05-11-2011, 12:59 AM   #10
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
can someone reply to this?
 
Old 05-11-2011, 01:08 AM   #11
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi brownie_cookie,

In my opinion your post is not completely related to the OP his thread/question since he's searching to where his folder gets mounted. You on the other hand are looking for the location to where your NFS is/are mounted. I might be wrong in this but if I'm not, then report your own post and ask the mods to separate it so it can lead its own life and get the attention it deserves.

Regarding your question, from the output you posted it looks to me that you have two mountpoints that are connected to a NFS:
Code:
ip:/CVBDISK on /CVBDISK type nfs 
name:/VOLUME1/PUBLIC on /nasdisk4 type nfs
Code:
ip:/CVBDISK
               nfs    137G  124G   13G  91% /CVBDISK
name:/VOLUME1/PUBLIC
               nfs    1.4T  1.1T  360G  75% /nasdisk4
So if you do for example:
Code:
ls /CVBDISK
ls /nasdisk4
you get the contents listed of both NFS shares.

Is that what you're looking for or did I misunderstand you?

Kind regards,

Eric
 
Old 05-11-2011, 01:37 AM   #12
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
sorry, it wasn't my intention to bash in someone's thread, i thought it was related !!
My apologizes to the OP!

So the mods can seperate this

anyway, i think that is the thing i'm after!
how do i get only the mounts? because if you say that those two are only mounts, why do i get all of the others?
 
Old 05-11-2011, 02:50 AM   #13
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

The other mountpoints are for your system (/, /boot, tmpfs, ramdisk). Without those you wouldn't have much.

Kind regards,

Eric
 
Old 05-11-2011, 02:55 AM   #14
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
i still don't understand (sorry xD)

but when i do the command 'mount' he shows ALL my mountpoints??
even those with 'none' in front of the line???
 
Old 05-11-2011, 09:58 AM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,289

Rep: Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384
Quote:
i want to be able to check what partitions certain folders are on.
In response to the OPs question.
If you have a directory named Yourdata under the mnt directory you would change to that directory:

cd /mnt/Yourdata/

Once there enter: df -h .

Need the dot.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking if a disk is connected but not mounted steven19782007 Linux - Newbie 3 06-16-2009 10:13 AM
script for checking if a drive is mounted Soulja1 Linux - General 2 05-07-2007 03:07 PM
Mounted Folders bendeco13 Linux - General 6 10-07-2004 06:31 PM
checking imap folders with gkrellm2 dibblethewrecke Linux - Software 0 03-20-2004 01:23 PM
Checking if a device is mounted using a script thar Linux - Software 2 02-22-2004 03:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration