LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2009, 04:07 AM   #1
Baps
LQ Newbie
 
Registered: Feb 2009
Posts: 25

Rep: Reputation: 15
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
 
Old 02-02-2009, 04:09 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 02-02-2009, 04:11 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What changes did you made before this happened?
Are the other partitions rw ?
 
Old 02-02-2009, 04:26 AM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 216Reputation: 216Reputation: 216
Might be worth unmounting it and running a fsck on it if /etc/fstab is correctly configured. Could be it's slightly degraded...
 
Old 02-02-2009, 04:41 AM   #5
Baps
LQ Newbie
 
Registered: Feb 2009
Posts: 25

Original Poster
Rep: Reputation: 15
in /etc/fstab, its showing as rw mode

other partitions are working fine in rw mode
 
Old 02-02-2009, 04:52 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What is the output of
Code:
cat /etc/fstab
If your fstab has
Code:
errors=remount-ro
Concider using the advice of r3sistance
 
Old 02-02-2009, 05:01 AM   #7
Baps
LQ Newbie
 
Registered: Feb 2009
Posts: 25

Original Poster
Rep: Reputation: 15
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.........
 
Old 02-02-2009, 05:22 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Boot from a live cd, and run fsck
 
Old 02-02-2009, 05:32 AM   #9
Baps
LQ Newbie
 
Registered: Feb 2009
Posts: 25

Original Poster
Rep: Reputation: 15
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
 
Old 02-02-2009, 05:44 AM   #10
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 216Reputation: 216Reputation: 216
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.

Last edited by r3sistance; 02-02-2009 at 05:53 AM. Reason: urgently
 
Old 02-02-2009, 05:57 AM   #11
Baps
LQ Newbie
 
Registered: Feb 2009
Posts: 25

Original Poster
Rep: Reputation: 15
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
 
Old 02-02-2009, 06:00 AM   #12
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 216Reputation: 216Reputation: 216
Quote:
Originally Posted by Baps View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pls Help: unusual messages in /var/log/message gurl4sh25 Linux - Enterprise 8 03-22-2009 08:38 PM
SUSE 9.2 on VMWare 4.5, mounting problem, pls help! sbinev Linux - Software 2 01-11-2005 09:57 AM
mounting NFS shares help pls mlu Linux - Networking 1 11-23-2004 09:32 PM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 05:12 PM
Mounting /var on a RAMdisk gamu829 Linux - General 2 09-04-2002 06:54 AM


All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration