Mounting File System


Mounting File System
Mounting and Unmounting File Systems. Before you can access the files on a file system, you need to mount the file system. Mounting a file system attaches that file system to a directory (mount point) and makes it available to the system. The root ( / ) file system is always mounted.All files accessible in a Unix system are arranged in one big tree,the file hierarchy, rooted at /.  These files can be spread out over several devices.  The mount command serves to attach the filesystem.

slide_18

Name
mount
mount a filesystem

Mount
The mount command mounts a storage device or filesystem, making it accessible and attaching it to an existing directory structure.

Unmount 
The umount command “unmounts” a mounted filesystem, informing the system to complete any pending read or write operations, and safely detaching it.

Mount Syntax
mount -t type device dir

Mount Command
mount -t ext4

mount

Mounting a USB Flash Drive
mount -t vfat /dev/sdc1 /media/flashdisk

Mounting ISO Image
mount -o ro,loop Fedora-14-x86_64-Live-Desktop.iso /media/cdrom

Mount Options
-a
Mount all the file systems listed in /etc/fstab
-d
Do everything except for the actual mount system call. This option is useful in conjunction with the -v flag to determine what mount(8) is actually trying to do.
-f
Force the mount of an unclean file system (dangerous), or the revocation of write access when downgrading a file system’s mount status from read-write to read-only.
-r
Mount the file system read-only. This is identical to using -o ro.
-u
Update mount options on the file system.
-v
Be verbose.
-w
Mount the file system read-write.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s