Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a broken HDD for the rootfs - this probably caused the filesystem to be mounted read-only... however /proc/mounts still says it's mounted rw:

$ cat /proc/mounts 
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=7575440k,nr_inodes=1893860,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,relatime,size=3033888k,mode=755 0 0
/dev/disk/by-uuid/548b00b0-bd98-4017-9e62-5c27b633268b / ext4 ro,noatime,errors=remount-   ro,data=ordered 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
/dev/sdb1 /mnt/storage1 ext4 ro,noatime,errors=remount-ro,data=ordered 0 0
/dev/sdc1 /mnt/storage2 ext4 rw,noatime,errors=remount-ro,data=ordered 0 0
/dev/sdd1 /mnt/storage3 ext4 rw,noatime,errors=remount-ro,data=ordered 0 0

However the filesystem is read-only:

$ touch new
touch: cannot touch `new': Read-only file system

That's pretty unfortunate because the Nagios/Icinga Script I use check_ro_mounts checks /proc/mounts for exactly this. It works with other filesystems mounted under /mnt/ without problems.

Is this some Linux Kernel trick? I also don't know what does rootfs means here?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.3 LTS
Release:    12.04
Codename:   precise
$ uname -a
Linux foo 3.5.0-25-generic #39~precise1-Ubuntu SMP Tue Feb 26 00:07:14 UTC 2013     x86_64 x86_64 x86_64 GNU/Linux
share|improve this question

1 Answer 1

up vote 5 down vote accepted

There are multiple entries for / in /proc/mounts, and the second entry shows information about your real root filesystem (note the ro flag there):

/dev/disk/by-uuid/548b00b0-bd98-4017-9e62-5c27b633268b / ext4 ro,noatime,errors=remount-ro,data=ordered 0 0

The first entry with the rootfs filesystem type appears because the Linux kernel creates a RAM-based filesystem internally during boot and unpacks the initramfs archive there; then initramfs scripts and utilities load the required driver modules and mount the real root filesystem.

share|improve this answer
    
Thanks! That's it. The nagios script is appearently buggy. –  mt_ Jan 14 at 11:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.