[Original]/Var and/home are read-only file systems

Source: Internet
Author: User
Environment: Dell poweredge r905 server, centos 5.6 i386
 
Problem: After a server is cleaned, the file system becomes faulty./Var and/home become read-only file systems.
[Root @ NSC/] # DF-H file system capacity used available % mount point/dev/mapper/VolGroup_ID_14746-LogVol1 3.9g 1.3G 2.4g 35%/dev/mapper/VolGroup_ID_14746-LogVol2 3.9g 139 m 3.6g 4%/tmp/dev/mapper/VolGroup_ID_14746-LogVol5 540g 3.9g 508g 1%/usr/dev/sda3 190 m 22 159 M 13%/boot tmpfs 6.8G 0 6.8g 0%/dev/SHM /Dev/mapper/VolGroup_ID_14746-LogVolBak 807g 120g 647g 16%/bak  /Dev/mapper/VolGroup_ID_14746-LogVolHome 276G 22g 241g 9%/home/dev/mapper/VolGroup_ID_14746-LogVol4 7.6g 3.0g 4.3g 42%/var [Root @ NSC/] # rm/var/run/httpd. PIDRM: Do you want to delete the common file "/var/run/httpd. PID "? Yrm: "/var/run/httpd. PID" cannot be deleted: Read-Only File System [Root @ NSC/] # Mount-O remount, RW/var Mount: block Device/Dev/mapper/VolGroup_ID_14746-LogVol4Is write-protected, mounting read-only The same problem also occurs in the/home partition,/usr/bak normal -------------------------------------------------------------------------------- Solution: [Root @ NSC/] # mkdir/usr/varbackup [root @ NSC/] # Mount -- move/var/usr/varbackup [root @ NSC/] # rm-RF/var [root @ NSC/] # cd/[root @ NSC/] # mkdir-P/bak/var [root @ NSC/] # ln-S/bak/var [root @ NSC/] # cp-r/usr/varbackup/*/var/same method/home [root @ NSC/] # mkdir/usr/homebackup [root @ NSC /] # Mount -- move/home/usr/homebackup [root @ NSC/] # rm-RF/home [root @ NSC/] # cd/[root @ NSC/] # mkdir-P/bak/home [root @ NSC/] # ln-S/bak/var/home [root @ NSC/] # cp-r/usr/homebackup /*/ home Modification /Etc/fstab : [Root @ NSC/] # Cat/etc/fstab/dev/volgroup_id_14746/logvol1/ext3 defaults 1 1/dev/volgroup_id_14746/logvol2/tmp ext3 defaults 1 2 /Dev/volgroup_id_14746/logvolbak/bak ext3 defaults 1 2/dev/volgroup_id_14746/logvol5/usr ext3 defaults 1 2 Label =/boot ext3 defaults 1 2 tmpfs/dev/SHM tmpfs defaults 0 0 devpts/dev/PTS devpts gid = 5, mode = 620 0 0 sysfs/sys sysfs defaults 0 0 proc/proc defaults 0 0/dev/volgroup_id_14746/logvol0 swap defaults 0 0 #/Dev/volgroup_id_14746/logvolhome/home ext3 defaults 1 2/Dev/volgroup_id_14746/logvolhome/usr/homebackup ext3 defaults 1 2#/Dev/volgroup_id_14746/logvol4/var ext3 defaults 1 2/Dev/volgroup_id_14746/logvol4/usr/varbackup ext3 defaults 1 2 After the preceding operations are completed, reboot restarts the operating system. -------------------------------------------------------------------------------- Result:
The system starts normally.

[Root @ NSC/] #DF-H File System capacity used available % mount point/dev/mapper/VolGroup_ID_14746-LogVol1 3.9g 1.3G 2.4g 35%/dev/mapper/VolGroup_ID_14746-LogVol2 3.9g 139 m 3.6g 4%/tmp/dev /mapper/VolGroup_ID_14746-LogVol5 540g 3.9g 508g 1%/usr/dev/sda3 190 m 22 m 159 M 13%/boot tmpfs 6.8G 0 6.8g 0%/dev/SHM /Dev/mapper/VolGroup_ID_14746-LogVolBak 807g 120g 647g 16%/bak /Dev/mapper/VolGroup_ID_14746-LogVolHome 276G 22g 241g 9%/usr/homebackup/dev/mapper/VolGroup_ID_14746-LogVol4 7.6g 3.0g 4.3g 42%/usr/varbackup [Root @ NSC/] # llTotal 1966drwxr-xr-x 27 Root 4096 06-10 bakdrwxr-XR-x 2 root Root 4096 2010-01-20 bindrwxr-XR-x 4 Root 1024 03-10 06:11 bootdrwxr-XR-x 12 Root root 4980 06-10 devdrwxr-XR-X 107 Root 12288 06-10 etc Lrwxrwxrwx 1 Root 9 06-10 Home -> /Bak/home Drwxr-XR-x 2 root Root 4096 2006-10-10 mntdrwxr-XR-x 6 Root 4096 05-03 optdr-XR-x 336 Root 0 06-10 procdrwxr- X --- 33 Root 4096 06-10 rootdrwxr-XR-x 2 root Root 12288 2010-01-20 sbindrwxr-XR-x 12 Root 0 06-10 45 sysdrwxrwxrwt 15 Root 4096 06- 10 06:42 tmpdrwxr-XR-x 20 Root 4096 06-10 06:35 USR Lrwxrwxrwx 1 Root 8 06-10VaR -> /Bak/var

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.