In prevous article we discussed something about File system. In this article we see how to create file systems, how to mount the file systems and general file operations.
After creating the partitions we have to create file system on the partition. Here in general people call this as formatting. formating means creating the file system on the permanent storage media like Hard disk, CD, Floppy...etc
In previous article, some file systems types were mentioned.
To create EXT2 file system enter
#mkfs.ext2
Try
#mkfs<tab><tab> you see many commands to create various filesystems.
As mentioned in previous article to access the contents of any file system first we have to mount it on some directory.
The file system mounted on / directory is root file system.
mnt is the directory in root filesystem.
To create directory
#mkdir <name>
To access the CD or floppy we have to mount them at some directory in root file system.
Generally CD is mounted at /mnt/cdrom direct ory
Floopy is mounted at /mnt/floppy
To mount
#mount <device> <directory>
#mount /dev/cdrom /mnt/cdrom
At boot time init process reads the contents of /etc/fstab and mounts the mentioned file systems.
To see the format of fstab try
#man fstab
NFS is the distributed file system i.e the actual file system is in remote system but we access it as local file system.
To access remote filesystem you can mount like this
#mount <remotehost>:<device> <directory>
#mount linuxserv:/nfs /mnt/local
To mount the remote file system you should have sufficient priviliges and nfs client should be running.
These all mount commands you can put in /etc/fstab, then at the boot time file systems are automatically mounted. This is static mounting. i.e we are mounting the file systems whether we are using them or not. To mount the file system when only we are using..do like this..