Linux hints mkdir:cannot Create directory ' Test ': Read-only file system

Source: Internet
Author: User

Problem phenomenon: receive the Monitoring Group personnel feedback, in a host opt fooled to create a directory, the hint is read-only read-only file system, not allowed to write or delete, according to past experience this problem has three possible:

1, the mount did not give the W authority;

2, the partition problems, need to fsck repair treatment;

3, hard disk failure, the server will be the original tool to verify whether the hard disk problems, replace the hard drive to avoid loss of data.

Note: Some people may also think of using chattr to set permissions that cannot be written and configured with disk quotas, but these two settings are different from the error.

Solution Idea:

1. View current parameters by mount:

# mount
/dev/sda2 on/type ext3 (rw,acl,user_xattr)
Proc On/proc type proc (rw)
Sysfs On/sys type SYSFS (rw)
Debugfs on/sys/kernel/debug type Debugfs (rw)
Udev On/dev type TMPFS (rw)
Devpts on/dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda5 on/boot type ext3 (rw,acl,user_xattr)
/DEV/SDA9 on/home type ext3 (rw,acl,user_xattr)
/DEV/SDA10 on/opt type ext3 (rw,acl,user_xattr)
/dev/sda8 on/tmp type ext3 (rw,acl,user_xattr)
/dev/sda6 on/usr type ext3 (rw,acl,user_xattr)
/DEV/SDA7 On/var type ext3 (rw,acl,user_xattr)

You can see from the view that the currently mounted permission is RW permission.

2. Fsck Repair

[root@361way.com ~]# umount/opt/
Umount:/opt:device are busy
Umount:/opt:device is busy
[root@361way.co M ~]# fuser-m/dev/sda10
/dev/sda10:           11334
[ Root@361way.com ~]# PS auxww|grep 11334
apache   11334  0.0  0.3  14288 ? 6404 bsp;      s    09:47   0:00/usr/sbin/httpd-k start-dssl
root& nbsp;    12184  0.0  0.0   4128   684 pts/0    R+    09:50   0:00 grep 11334
[root@361way.com ~]# service httpd stop
stopping httpd: [  ok  ]
[root@361way.com ~]# umount/opt/
[root@361way.com ~]# fsck-v-a/dev/sda10
fsck 1.39 (29-may-2006)
[/S BIN/FSCK.EXT3 (1)--/opt] fsck.ext3-a/dev/sda10
/opt:recovering Journal
/opt:clean, 1890281/20971520 files, 6 941812/20970849 blocks

3, Hard drive detection

This can be based on the OEM manufacturer's tools for the relevant systems, commonly used such as HP Hpacucli, Dell Delldset, Atae disk_info_test, etc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.