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.

Disk Druid Partitioning


Disk Druid Utilities for Disk Partitioning
When doing an interactive installation the partitioning will be done using Disk Druid. It’s a very simple GUI.

ddmain

Swap Partition
Swap partitions are used to support virtual memory. In other words, data is written to a swap partition when there is not enough RAM to store the data your system is processing. If your computer has 16MB of RAM or less, you must create a swap partition.

/Boot Partition
The partition mounted on /boot contains the operating system kernel (which allows your system to boot Red Hat Linux), along with files used during the bootstrap process.

/Root Partition
The root directory resides. In this setup, all files (except those stored in /boot) reside on the root partition.

Creating File System in Console


File System
A filesystem is the methods and data structures that an operating system uses to keep track of files on a disk or partition; that is, the way the files are organized on the disk. The word is also used to refer to a partition or disk that is used to store the files or the type of the filesystem.

volume-not-contain-recognized-file-system

Creating File System in Console
Create a linux file system
Command
mke2fs /dev/sda1

1.png

Initialize swap partition
Command
mkswap /dev/sda1

Checking File System
Check Integrity of Linux File System
Command
e2fsck -f /dev/sda1

Check Bad Blocks & Errors
Command
e2fsck -f -c -p /dev/sda1