Mount command mainly use to mount the file system or hardware disk such as: CD-ROM, portable hard driver and Flash disk that were found by CentOS Linux System or other Linux distribution version. How do I mount a Ext3 or Ext4 file system under Linux system or CentOS operating system? How to mount a read only ext3 file system under linux system? In this post you ‘ll see the way to mount read only file system using linux mount command.
CentOS Linux Mounting Ext3 File System
Assuming that there is a ext3 file system under /dev/sdb1 partition, you must mount it to a directory so that it is availabe to use. type the following command to mount this file system to /mnt/disk directory, type:
$mount -t ext3 /dev/sdb1 /mnt/disk
If you want this file system to be mounted automatically while system starts up, need to define mouting relationship in /etc/fstab configuration file, using “vim” command to edit /etc/fstab file and adding the below content:
/dev/sdb1 /mnt/disk ext3 defaults 0 0
Then you can directly use the below simple command to mount that ext3 filesystem.
$mount /mnt/disk
CentOS Linux Mounting Read Only File System
Mounting a read only file system need to use “-o ” option and providing “ro” value for option, issue the following command to mount read only filesystem under /dev/sdb1 partition, type:
$sudo mount -t ext3 -o ro /dev/sdb1 /mnt/disk
How to change a mounted filesystem as read only mode?
If you have mounted a file system using mount command and wanna to change it to read only, issue the following command:
$sudo mount -o remount,ro /mnt/disk