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.