LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-16-2011, 09:28 AM   #1
sbwoolf
LQ Newbie
 
Registered: May 2011
Posts: 3

Rep: Reputation: 0
Problems booting on Centos 5.6, e2fsck [failed], fstab wrong?


Hi there,

Recently installed Centos 5.6 in order to install Plesk on. Not familiar with Linux partitioning so left the default values at install with a few GB of unpartitioned space left free. Followed the instructions on the Plesk installation manual for adding a seperate partition for /tmp - http://kb.parallels.com/en/1410

Then later on I couldn't get in to the server locally via the GUI (which was already switched on), it just had a black screen so I powered the machine off. It then wouldn't boot back up. When it got to e2fsck I got a [Failed]. I also got the same message as in this thread.

I'm now at a remote location. When logging in as root and trying to run fsck to find and fix any disk problems a remote engineer has found that it won't unmount the partitions so I can't really run fsck on it. He's forced the machine to boot for me and I have SSH access but if I reboot the machine I'm quite sure I won't be able to get in again from here.

Is there something wrong with my fstab maybe?

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /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
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/filesystems/tmp_fs /tmp ext3 noexec,nosuid,loop 1 1
 
Old 05-16-2011, 08:52 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Few things really

Quote:
Originally Posted by sbwoolf View Post
Not familiar with Linux partitioning so left the default values at install
There's absolutely nothing keeping you from familiarizing yourself with what Linux system administration encompasses. Centos is the Red Hat Enterprise Linux derivative and RHEL comes with extensive documentation. Reading documentation may seem like a drag but the investment is worth it in terms of building up knowledge and server reliability, integrity and safety. If you don't have a server to play with at least have a staging server, workstation or virtualization guest to test things out in. Best practices state servers come with the least amount of packages installed necessary to fulfill their tasks. X server and Desktop Environments you run in runlevel 5 generally don't belong on a server. Also search LQ for partitioning threads because opinions differ. Generally speaking a "/ /home swap" layout is not as robust and configurable as the "/boot / /usr /tmp /var" one. In short separating the main file system directories allows you not only to use different mount flags but also keeps the system from keeling over when say /var gets filled. LVM makes sense if you 0) use dm-crypt or ecrypt-like encryption or 1) must be able to re-allocate storage on-the-fly, which doesn't make sense for say "/" if /usr, /home, /tmp and /var are separate partitions.


Quote:
Originally Posted by sbwoolf View Post
Followed the instructions on the Plesk installation manual for adding a seperate partition for /tmp
Basically it offers a file system-in-a-file loop/bin alternative for the time being but that doesn't trump actually having a separate /tmp partition. Unless you've past the point of no return if you agree separate partitions are better you could nuke the installation and start over?


Quote:
Originally Posted by sbwoolf View Post
Then later on I couldn't get in to the server locally via the GUI (which was already switched on), it just had a black screen
Best not boot into a GUI after install if Xorg needs to be configured still. /etc/inittab holds the default runlevel to boot into: change from 5 to 3 or else change /boot/grub/grub.conf and add " 3" at the end of the kernel line.


Quote:
Originally Posted by sbwoolf View Post
so I powered the machine off. It then wouldn't boot back up. When it got to e2fsck I got a [Failed]. I also got the same message as in this thread. I'm now at a remote location. When logging in as root and trying to run fsck to find and fix any disk problems a remote engineer has found that it won't unmount the partitions so I can't really run fsck on it. He's forced the machine to boot for me and I have SSH access but if I reboot the machine I'm quite sure I won't be able to get in again from here.
Ext3 often is rugged enough to survive a file system getting umounted improperly but powering off properly also ensures the file system dirty flag gets cleared so you don't need fsck on reboot. And what you think is an error message is just instructions asking you to run 'fsck'. To force checking all filesystems at (re)boot you could add " forcefsck" at the end of the kernel line. One reason for having that added to /boot/grub/grub.conf is an fsck may first check "/" and then reboot before checking other file systems leaving them out and because partitions should not be checked when mounted so that leaves out "/" unless you reboot. Afterwards remove it from /boot/grub/grub.conf as servers don't need reboots often but you sure don't want to wait each reboot for a forced fsck to complete.



Quote:
Originally Posted by sbwoolf View Post
Is there something wrong with my fstab maybe?
Your root file system is located at /dev/VolGroup00/LogVol00 and /tmp appears to be a file in the non-standard "/filesystems" directory. Unless loop-mounted file systems don't get mounted automagically there's nothing wrong with that. It's just not as optimal a configuration as it could be but that's your choice.
 
1 members found this post helpful.
Old 05-17-2011, 03:33 AM   #3
sbwoolf
LQ Newbie
 
Registered: May 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, I've set the run level to 3.

I can try forcing fsck on boot, but I'm trying to minimise the risk of the server not coming back up as I have to ask a remote engineer to force the boot each time otherwise. So I'm just trying a couple of other things first, before I try that.

I actually tried yesterday to unmount some partitions to run fsck on them. I did /tmp and it was fine. Then I tried doing the same on /dev/shm and I got

Code:
fsck 1.39 (29-May-2006)
fsck: fsck.tmpfs: not found
fsck: Error 2 while executing fsck.tmpfs for tmpfs
Tried googling it but can't work out what this means. Do you know?

Also, if I understand correctly, I can do this on all partitions apart from / which can only be done in maintenance mode when booting or by forcing fsck to run automatically when booting. Is that right?

Also, how easy is it for me to add a seperate partition for /var now after install? Currently / is taking up most of the space. Would you recommend shrinking down / and then creating /var partition? According to the Plesk website /var is where all the diskspace gets used.
 
Old 05-17-2011, 09:35 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by sbwoolf View Post
Tried googling it but can't work out what this means. Do you know?
tmpfs is a virtual file system in RAM, not one you should fsck like your physical or LVM partitions.


Quote:
Originally Posted by sbwoolf View Post
Also, if I understand correctly, I can do this on all partitions apart from / which can only be done in maintenance mode when booting or by forcing fsck to run automatically when booting. Is that right?
Yes, any partition that hasn't got files open (everything is a "file" in Linux) you can't close.


Quote:
Originally Posted by sbwoolf View Post
how easy is it for me to add a seperate partition for /var now after install? Currently / is taking up most of the space. Would you recommend shrinking down / and then creating /var partition?
I don't know what your definition of "easy" is. You'll have to shrink the existing LV, add a new one, create a file system, mount it somewhere, copy /var contents over, then mount it as (or over) /var when all files in /var are closed. That's why I suggested previously that if you thought your layout could be improved you could consider starting from scratch again...
 
1 members found this post helpful.
Old 05-18-2011, 03:07 AM   #5
sbwoolf
LQ Newbie
 
Registered: May 2011
Posts: 3

Original Poster
Rep: Reputation: 0
OK thanks for the advice.
 
  


Reply



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
[SOLVED] centos has problems at booting windstory Linux - Newbie 2 08-18-2009 03:51 AM
e2fsck error while booting lfs EPM_Students Linux From Scratch 6 07-29-2005 01:33 AM
e2fsck failed Corrupt superblock gasparov Linux - General 1 02-21-2005 07:16 AM
Mandrake, problems booting after failed nvidia driver install civic94vtc Mandriva 2 03-29-2004 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:11 AM.

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
Open Source Consulting | Domain Registration