Featured Posts

GoAccess is an interactive and website / web-server log analyzer tool currently better than the ApacheTop interface. It provides fast and valuable HTTP statistics for system administrators that require a visual...

Readmore

AjaxMyTop AjaxMyTop is a Web-based tool featuring an AJAX user interface for monitoring a MySQL server. Installing and configuring is fairly simple which you can done it within 2 minutes. [caption id="attachment_587"...

Readmore

Mod_spin is a content handler and/or a filter, meaning, for a specified file extension, mod_spin will read the file (or other input), parse it into an Abstract Syntax Tree (AST) and then replace the occurrences...

Readmore

Server Monitoring using DSTAT DSTAT an excellent tool which combines the overall stats of vmstat, iostat, netstat and ifstat. Dstat allows us to view all of the system resources in the real-time including the network bandwidth, network...

Readmore

BWM-NG Monitoring Network Bandwidth and Disk I/O using BWM-NG BWN-NG (Bandwidth-NG) is old and simple tool to monitor the bandwidth and disk I/O including the RAMdisk usage, this tool really helps the...

Readmore

  • Prev
  • Next

Mounting filesystem as readonly

Posted on : 19-10-2011 | By : admin | In : Tips

Tags:

1

There are different ways to mount / remount the file system as readonly. Here are few simple steps which might be helpful if you want to remount your filesystem/partition as readonly. This is especially  useful if you want to run fsck on a selective partition for example /home , /var etc from init 3 runlevel.

 

  • # mount -o remount,ro /

(or)

  • # mount -o remount,ro /dev/sdaX /

 

The above command will remount the / root file system as read-only where sdaX is the partiton number. If you want to remount only your /home or /var mounted on a seperate partion. Just use

 

 

  • # mount -o remount,ro /home

(or)

  • # mount -o remount,ro /dev/sdaX /home

 

To remount it back to read-write. Try

 

  • # mount -o remount,rw /

 

Using sysrq-trigger

 

You can also use the sysrq-trigger magic key under /proc to remount all the mounted filesystems as readonly. To do that, just use

  • # echo u > /proc/sysrq-trigger

This will remount all the mounted filesystem in your system to read-only.

 

Comments (1)

[...] want to run fsck on a selective partition for example /home , /var etc from init 3 runlevel. [...] GNU Tool Box Filesystem mounting Readonly [...]

Write a comment

You must be logged in to post a comment.