Somehow my Debian went to read only in root file system. I have no idea how this could have happened.
For example when I am in /root folder and type command nano and after that press Tab to list possible file in that folder I get the message:

Look for the strings "ext4" et "/dev/mapper/debian-root" in /var/log/messages. If your filesystem is corrupt, you should see it in early kernel messages during boot. Also try mount -o remount,rw /dev/mapper/debian-root and tell us if it throws you an error.
–
lgeorgetJul 22 '14 at 9:42

also do you have remaining space, what gives you the command df
–
KiwyJul 22 '14 at 9:44

Can you boot into 'recovery mode' from grub? Alternatively, edit the grub kernel options and add the word single to the end and boot. You should end up with a root shell from which you can run various tools to check and repair your disk.
–
garethTheRedJul 22 '14 at 9:48

1 Answer
1

The default behaviour for most Linux file systems is to safeguard your data. When the kernel detects an error in the storage subsystem it will make the filesystem read-only to prevent (further) data corruption.

You can tune this somewhat with the mount option errors={continue|remount-ro|panic} which are documented in the system manual (man mount).

When your root file-system encounters such an error, most of the time the error won't be recorded in your log-files, as they will now be read-only too. Fortunately since it is a kernel action the original error message is recorded in memory first, in the kernel ring buffer. Unless already flushed from memory you can display the contents of the ring buffer with the dmesg command. .

Most real hard disks support SMART and you can use smartctl to try and diagnose the disk health.

Depending on the error messages, you could decide it is still safe to use file-system and return it read-write condition with mount -o remount,rw /

In general though, disk errors are a precursor to complete disk failure. Now is the time to create a back-up of your data or to confirm the status of your existing back-ups.

yes I have the backup data. Couold you please look at my question again? I found something in dmesg and made small edit in my question.
–
s1cJul 22 '14 at 13:45

Typically I would expect those ext4 errors to be surrounded with errors related to IO or the device as most likely the problem is not the filesystem as such, but the underlying disk. See for instance askubuntu.com/questions/141862/…
–
HBruijnJul 22 '14 at 13:54

One more question. Could it be because of mounted partions (SAN/NAS storage)? I have them of course in my fstab file defined.
–
s1cJul 22 '14 at 14:03