LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Pls help me urgently....../var is not mounting in rw mode (https://www.linuxquestions.org/questions/linux-newbie-8/pls-help-me-urgently-var-is-not-mounting-in-rw-mode-701592/)

Baps 02-02-2009 04:07 AM

Pls help me urgently....../var is not mounting in rw mode
 
Hi

my server's /dev/sda2 i.e. /var is not able to mount in rw mode
I tried mounting it manualy but still the same issue

mount -o remount,rw /var

in /etc/mtab its showing in ro mode,if I edit this with rw it again revert back to ro mode

Due to which many services not able to start.

Need your help urgently

linuxlover.chaitanya 02-02-2009 04:09 AM

What does your /etc/fstab look like? mtab is not be edited manually. If the entry in fstab shows it to mount ro then change it to rw.

repo 02-02-2009 04:11 AM

What changes did you made before this happened?
Are the other partitions rw ?

r3sistance 02-02-2009 04:26 AM

Might be worth unmounting it and running a fsck on it if /etc/fstab is correctly configured. Could be it's slightly degraded...

Baps 02-02-2009 04:41 AM

in /etc/fstab, its showing as rw mode

other partitions are working fine in rw mode

repo 02-02-2009 04:52 AM

What is the output of
Code:

cat /etc/fstab
If your fstab has
Code:

errors=remount-ro
Concider using the advice of r3sistance

Baps 02-02-2009 05:01 AM

Following is the output of /etc/fstab

LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=/boot1 /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 proc defaults 0 0
LABEL=SWAP-sda5 swap swap defaults 0 0

also unable to umount /var
as its saying device is busy

pls suggest what to do next

need your help.........

repo 02-02-2009 05:22 AM

Boot from a live cd, and run fsck

Baps 02-02-2009 05:32 AM

Hi repo
Thanks for your suggestion
but is ther any other alternative?
because for this I need to keep my server down which is not possible now,I can try this in non-office hour but not now

I will be highly pleased if you can suggest any other alternative without rebooting the server

r3sistance 02-02-2009 05:44 AM

Their are ways to do it without a liveCD but without unmounting /var the potential for filesystem corruption is too great to even attempt... I would not advise any action here unless you can cleanly unmount /var using umount and then can fsck it. If it's suppose to be mounted rw which appears to be the case, I would suggest that if a FSCK doesn't fix it, it'll give an indication of the problem behind /var not mounting correctly.

I suppose one possibility is using something like an external hard drive, copying /var to another partition on that and mounting it as -ro and then unmounting the original to fix it with FSCK, with the server still live (this way no body will lose any work they just did while you fix the original). But it's not clean, the best method without a doubt would be to take the server down and perform a FULL fsck on every partition as their may possibly be effects on the other partitions too which have not kicked in yet.

Oh yes, as it's not been said, please DO NOT use URGENT (or urgently in this case) in thread titles, all it does is put people off even looking at a thread. Thankfully however you have included the actual problem in the thread title where people usually forget. I can understand why you have put it, but it makes things inconvient for us to deal with and undiserable to even look at.

Baps 02-02-2009 05:57 AM

Thanks for our suggestion and detailed explanation.

I think its better trying it in init 1 or through live CD.

So I will work on it when it is possible to downtime the server and will let you know about further development.

Thanks again

r3sistance 02-02-2009 06:00 AM

Quote:

Originally Posted by Baps (Post 3428968)
I think its better trying it in init 1 or through live CD.

That would be the best solution :), I hope this sorts your problem out.


All times are GMT -5. The time now is 02:54 PM.