File system mounted or not

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat File system mounted or not
# 1  
Old 10-30-2014
File system mounted or not

Hi,

I know something about file system that its a directory to hold files.
My query is how to identify file system is mounted or not .Can you give me some examples?

OS --- Linux 2.6
# 2  
Old 10-30-2014
The mount command can help you with that. By itself it shows every mounting point:

Code:
[aia@server1 ~]$ mount
/dev/mapper/vg_server1-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

If you know the filesystem (ext4 in this case), it can be a little more specific by using the flag -t:

Code:
[aia@server1 ~]$ mount -t ext4
/dev/mapper/vg_server1-lv_root on / type ext4 (rw)
/dev/sda1 on /boot type ext4 (rw)

This User Gave Thanks to Aia For This Post:
# 3  
Old 10-30-2014
Thanks Aia.

Why is it necessary a file system should be mounted. Can you explain ?

Regards,
Maddy
# 4  
Old 10-30-2014
A device (a disk, a memory stick, ...) is available to the OS or it's not. Presence is scanned at boot time, or the device may be hot plugged. It will be made available in the /dev directory. Its raw data can be read from there, but, please, don't mess around with raw data. The device can be one single data container, or it can be "partitioned" or "sliced". That means, there are data structures on disk that tell the OS how some regions on disk are to be distinguished from others. Those regions can be seen as "disk" of their own. Up to now, you can't do too much useful things with the device (or "disks") except e.g. put a (large) data stream like a backup on them.
To make data randomly accessible from the OS, you need to create another structure: a file system. There's many an FS in them there hills... *nix type, DOS, windows, MAC, ... FS have tables and pointers and names that allow the OS to manage data chunks called files and make them available to system or users' commands.
Mounting a disk (or file system) reads these logical structures and makes the directories, files, etc... known and accessible to the system, and thus users.
# 5  
Old 10-30-2014
RedHat File system mounted or not

You can very well use mount command to know the list of filesystems mounted.
This mount command returns the output of fstab file.

One more alternate way is to view /proc/mounts file which has updated list of filesystems mounted.
# 6  
Old 10-30-2014
Quote:
Originally Posted by Sriramsivajira
. . .
This mount command returns the output of fstab file.
. . .
I'm sure you meant /etc/mtab
# 7  
Old 10-30-2014
Quote:
Originally Posted by Maddy123
Thanks Aia.

Why is it necessary a file system should be mounted. Can you explain ?

Regards,
Maddy
In order to understand mounting points, you need to understand and associate it with these two concepts: partitions and formatting.
Partitions are the logical division that you can impose on a single disk or storage device. Formatting is the prearranged organizational structure imposed on the data written to that partition.

In order to access this complex combination abstraction, an interface or point of access has been created, using directories. That's mounting.

Now when you see:
Code:
/dev/sda1 on /boot type ext4 (rw)

You can identify the partition 1 on disk sda or first partition on first disk: /dev/sda1 mounted on the directory /boot and formatted with the filesystem ext4 for reading and writting (rw)

---------- Post updated at 01:15 PM ---------- Previous update was at 01:10 PM ----------

If you still are not sure, think about a house. That's a disk.
A house usually have many rooms or divisions. That's partitions.
A bathroom is different that a kitchen room or a bedroom. That's formatting.
You access these rooms, usually, via an entry door or doorway. That's mounting.
This User Gave Thanks to Aia For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Related to "NAS" some file system (mounted volumes) were not writable

Dear friends, I have been facing an issue with one of my red hat unix machine, suddenly lost to switch sudo users. My all colleagues lost to switch to access sudo users. Then, we have realized its related to NAS issue which does not allowing to write the file. because of this we got so many... (1 Reply)
Discussion started by: Chand
1 Replies

2. UNIX for Advanced & Expert Users

Which system calls to move data on a device with mounted partitions?

I need to be able to move data around a disk that has mounted partitions. I am not touching the data on the mounted partition, the MBR or any other disk metadata, only the freespace and unmounted partitions. At the moment I am using libparted but it causes data corruption sometimes although there... (1 Reply)
Discussion started by: vstrom
1 Replies

3. AIX

Error unmounting a remote mounted file system

Hi All, I'm facing an issue while trying to unmount a remotely mounted file system, strangely it's not even getting mounted, Kindly find the reply messages. Mounting error msg nfsmnthelp: 1831-019 <Server host>: Cannot mount a file system that is already remotely mounted. mount: 1831-008... (13 Replies)
Discussion started by: Abhishekag
13 Replies

4. UNIX for Dummies Questions & Answers

What happens if i unmount local file system when is mounted to a different server?

Hi, as title says what happens if i unmount local file system when is mounted to a diffrent server ? (2 Replies)
Discussion started by: galuzan
2 Replies

5. Solaris

System Unbootable - /usr not mounted

Hi admins, I'm having some issues with a Solaris 10 machine. I just rebooted the box after at least 2 years running smooth and now the OS is not comming up. This is what I see in the console (if I press Ctrl^D it loops again): Root password for system maintenance (control-d to bypass): ... (3 Replies)
Discussion started by: verdepollo
3 Replies

6. Ubuntu

display the mounted file system types

how can i list/display the mounted partitions in Ubunutu, mount command just display the devices but not the file system used. (4 Replies)
Discussion started by: XP_2600
4 Replies

7. SCO

file system not getting mounted in read write mode after system power failure

After System power get failed File system is not getting mounted in read- write mode (1 Reply)
Discussion started by: gtkpmbpl
1 Replies

8. Solaris

How to find which file system was not mounted ?

Hello all, can someone help on how can i check if all file system were mounted during reboot? I know that we have first to look on /etc/vfstab; the containing of this one should be mounted during boot of system, and after with : df -k we can see if mentioned file system on vfstab were... (3 Replies)
Discussion started by: vitchi
3 Replies

9. UNIX for Dummies Questions & Answers

how many directory can be mounted on one file system

I have a question and seek help. How many directory can be mounted on one file system on UNIX with solaris 9? For example, I have one file system as /dev/dsk/cieit0a6. I have created one directory as /u01/app/oracle and mounted this directory to cieit06. It works. Then I create another directory as... (4 Replies)
Discussion started by: duke0001
4 Replies

10. UNIX for Dummies Questions & Answers

fsck on a mounted file system?

I have a Solaris 7 box. We got a strange error in the syslog, which read as follows: Nov 15 11:50:16 server-01 unix: NOTICE: free inode /mount1/8025691 had size 0x20d I consulted with a fellow sysadmin, and he suggested running "fsck -N" on the filesystem in question without unmounting it. So I... (1 Reply)
Discussion started by: GKnight
1 Replies
Login or Register to Ask a Question