LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Attempt to Set Ext3 Journaling Option Breaks X11 (https://www.linuxquestions.org/questions/linux-software-2/attempt-to-set-ext3-journaling-option-breaks-x11-764240/)

mejohnsn 10-24-2009 05:17 PM

Attempt to Set Ext3 Journaling Option Breaks X11
 
I just installed the latest released version (version 7) of Linux Mint on my Acer Aspire One Notebook computer. Things seemed to be going pretty well until I tried to protect my flash drive (there is no real HDD on this model: only flash) by setting the "data=writeback" option in /etc/fstab on the ext3 filesystem.

Once I did that, everytime I boot, I get the following message (both from generic boot and from 'recovery-mode'):

"Could not start the X server (your graphical environment) due to some Internal error.
Please contact your system administrator or check your syslog to diagnose.
In the meantime this display will be disabled. Please restart GDM when the problem is corrected."

Then what gets printed is:

"Linux Mint 7 Gloria - Main Edition mejohnsn-netbook tty1mejohnsn-netbook login:

and a little later
*Stopping anac(h)ronistic cron anacron" twice.

So the obvious question is: how could this break X11? It even did an fsck the first time I rebooted after the change, and it passed.

Next obvious question: is there something else I have to change other than the <options> column in /etc/fstab to make this change? Could omitting that "something else" explain the failure? Or is it just coincidence?

irishbitte 10-24-2009 05:32 PM

Did you make a backup of /etc/fstab before you changed it? If so, revert back and see if that changes your xserver problems. Otherwise, go into the file and undo what you did. I'm assuming, of course that you are getting to a login prompt at a terminal screen. If you want more detailed help, post here, and I'll try to give more complete instructions.

mejohnsn 10-24-2009 07:42 PM

Quote:

Originally Posted by irishbitte (Post 3731288)
Did you make a backup of /etc/fstab before you changed it? If so, revert back and see if that changes your xserver problems. Otherwise, go into the file and undo what you did. I'm assuming, of course that you are getting to a login prompt at a terminal screen. If you want more detailed help, post here, and I'll try to give more complete instructions.

It was a very simple change, no backup should be necessary. It is easy enough to delete the ",data=writeback". However, when I boot with the LiveCD and read the filesystem on the HD, I can open /etc/fstab under 'vi' as superuser, but it still refuses to write it.

Somehow, I suspect it would do the same thing if I had made a backup and tried to restore it using 'cp'. It does the same thing, after all, when I boot in a non-graphics recovery mode (I forget the exact name of the option).

As I type this, I am at another system, so more details are not available.

Since I can read the filesystem, if I really have to, I can backup up what few new files and packages are on that system and re-install. But I really want to understand why such a simple change, one that makes perfect sense based on the man page for 'mount' and 'fstab', could have such an effect on the system.

I want to know, for example, whether this is a peculiarity of the Mint distribution, or is this common to all Debian based distributions, or even all Linux.

Remember: the only change was to add ",data=writeback" to the end of the options column for the sole ext3 device in /etc/fstab. Everything else is Mint 7 installation defaults.

irishbitte 10-24-2009 08:35 PM

I'm guessing it has something to do with the flash disk storage in your netbook, something is stopping ext3 running, which manifests itself as X not starting. Only a guess mind!

irishbitte 10-24-2009 08:38 PM

Can you post output of
Code:

cat /var/log/Xorg.0.log
from the netbook. Also, why are you booting it with a liveCD to modify /etc/fstab? Esp. since you know vi!

mejohnsn 10-25-2009 02:17 AM

Quote:

Originally Posted by mejohnsn (Post 3731376)
It was a very simple change, no backup should be necessary. It is easy enough to delete the ",data=writeback". However, when I boot with the LiveCD and read the filesystem on the HD, I can open /etc/fstab under 'vi' as superuser, but it still refuses to write it.

Somehow, I suspect it would do the same thing if I had made a backup and tried to restore it using 'cp'. It does the same thing, after all, when I boot in a non-graphics recovery mode (I forget the exact name of the option).

As I type this, I am at another system, so more details are not available.

Since I can read the filesystem, if I really have to, I can backup up what few new files and packages are on that system and re-install. But I really want to understand why such a simple change, one that makes perfect sense based on the man page for 'mount' and 'fstab', could have such an effect on the system.

I want to know, for example, whether this is a peculiarity of the Mint distribution, or is this common to all Debian based distributions, or even all Linux.

Remember: the only change was to add ",data=writeback" to the end of the options column for the sole ext3 device in /etc/fstab. Everything else is Mint 7 installation defaults.

Now that I am back on the Acer Aspire One, I can supply additional details:

1) the error message I get while trying to modify /etc/fstab as superuser from vi is "E303: unable to make swap for /etc/fstab". But I am still typing that from memory; I am sure of the E303 part, and the general wording of the rest.

Earlier, I got this message whether I booted from LiveCD or from recovery mode. But now I cannot even find the mount table entry when booting from LiveCD.

Wait: upon retrying, /dev/disk appeared, and now I can edit /media/disk/etc/fstab!

This makes no sense to me! But now I have removed my change, so that the line reads:
UUID=27d4b1ef-0894-4b86-8af0-a202f2586d66 / ext3 relatime,errors=remount-ro 0 1

I'll try this and see how it does: but all this unpredictable behavior does not commend the Mint distribution!

mejohnsn 10-25-2009 02:36 AM

Quote:

Originally Posted by irishbitte (Post 3731416)
Can you post output of
Code:

cat /var/log/Xorg.0.log
from the netbook. Also, why are you booting it with a liveCD to modify /etc/fstab? Esp. since you know vi!


Wasn't I clear enough? I was booting from a LiveCD because a normal boot from the image on disk failed, and the recovery-mode boot would not allow me to edit /etc/fstab.

I have no idea why I was finally able to edit /media/disk/etc/fstab as superuser when booted from the LiveCD. But that finally did work, and now I have the system working again. Nor do I understand why I could see /media/disk only after executing 'mount' from Terminal for about the 3rd time!

But in any case, this time, before I modify /etc/fstab to try to get data=writeback working, I would like for someone to verify that I am following the right procedure: this time, instead of appending to the end of the options, I am going to replace the line:

UUID=27d4b1ef-0894-4b86-8af0-a202f2586d66 / ext3 relatime,errors=remount-ro 0 1

with the line:

UUID=27d4b1ef-0894-4b86-8af0-a202f2586d66 / ext3 data=writeback,relatime,errors=remount-ro 0 1

since I am guessing that when I appended "data=writeback" to the end, it thought I was modifying "errors=...".

What do you think? Should this work? I have seen so much conflicting advice about how to make this change, (in various Linux forums), I can't count on any of them. But from reading the man page on 'mount' and 'fstab', this LOOKS correct.

mejohnsn 10-25-2009 03:19 AM

Quote:

Originally Posted by mejohnsn (Post 3731599)
I have seen so much conflicting advice about how to make this change, (in various Linux forums), I can't count on any of them. But from reading the man page on 'mount' and 'fstab', this LOOKS correct.

As an example of this conflicting advice, the cheery description of ext3 journaling options at http://www.ibm.com/developerworks/library/l-fs8.html options at first describes how you can change any ext3 filesystem by editing mount options in fstab, but then says to change options on the root filesystem, one should use "bootflags=data=writeback".

But wait! The root filesystem IS in /etc/fstab. So then shouldn't you do both? Or will all filesystems hung off of root inherit the setting from bootflags? I see nothing at http://www.ibm.com/developerworks/library/l-fs8.html that answers these questions.

irishbitte 10-25-2009 07:04 AM

May I ask what it is you are trying to achieve? I'm glad your machine is back up and running, but I'm still puzzled as to the reason for what you are doing. Is it to protect the flash drive by limiting the number of write backs? An option is just to use a network share as a main documents folder.

mejohnsn 10-25-2009 06:42 PM

Quote:

Originally Posted by irishbitte (Post 3731740)
May I ask what it is you are trying to achieve? I'm glad your machine is back up and running, but I'm still puzzled as to the reason for what you are doing. Is it to protect the flash drive by limiting the number of write backs? An option is just to use a network share as a main documents folder.

Thanks for persisting with this.

Yes, I am trying to protect the flash drive by limiting the number of write backs (I have also thought of the 'commit' option, but one thing at a time). Now why would using a network share accomplish that? And how could I use one on a netbook computer in the first place? The whole point of having a netbook is portability. I don't even always have network access, depending on where I have carried it to.

mejohnsn 10-27-2009 10:03 AM

Quote:

Originally Posted by mejohnsn (Post 3731618)
As an example of this conflicting advice, the cheery description of ext3 journaling options at http://www.ibm.com/developerworks/library/l-fs8.html options at first describes how you can change any ext3 filesystem by editing mount options in fstab, but then says to change options on the root filesystem, one should use "bootflags=data=writeback".

But wait! The root filesystem IS in /etc/fstab. So then shouldn't you do both? Or will all filesystems hung off of root inherit the setting from bootflags? I see nothing at http://www.ibm.com/developerworks/library/l-fs8.html that answers these questions.

I figured out how to add bootflags=data=writeback either by hand during boot, or by adding (as I now have it) to /boot/grub/menu.lst. The system still boots fine, but I have no way to tell if it is working.

As I mentioned before, the wording of the above sources makes it sound like I really should have the corresponding change in fstab, too. Should I?

irishbitte 11-01-2009 08:20 PM

Hi there again, was away for a few days. I took a quick look around some netbook forums, found this: http://wiki.eeeuser.com/howto:tweakmountparameters, it may shed some light on this situation for you. I have a netbook, with regular HDD, but I use some online services like googledocs in order to protect the machine, and make it last longer. However, from the above link, I think the amount you will extend the lifetime of your SSD is limited enough anyway, but is worth it. Personally, I might buy a couple of extra SSD's and make an image of your current one! Better protection in the long term!

mejohnsn 11-02-2009 03:07 AM

Quote:

Originally Posted by irishbitte (Post 3740679)
Hi there again, was away for a few days. I took a quick look around some netbook forums, found this: http://wiki.eeeuser.com/howto:tweakmountparameters, it may shed some light on this situation for you. I have a netbook, with regular HDD, but I use some online services like googledocs in order to protect the machine, and make it last longer. However, from the above link, I think the amount you will extend the lifetime of your SSD is limited enough anyway, but is worth it. Personally, I might buy a couple of extra SSD's and make an image of your current one! Better protection in the long term!

That is an interesting website. It confirms some of what I expected to be true and adds more info I had not yet figured out.

Curious, though, that it does not address the basic question I had: do I need the change in both kernel flags and fstab, or is just kernel flags good enough?

irishbitte 11-02-2009 05:30 PM

As I understand it, and I am no hacker, what is important is the options passed at mount time, which is dictated by the fstab. The ext3 filesystem is just a protocol that is supported by the kernel, so I don't understand what you mean by 'kernel flags', unless you mean
Quote:

....change options on the root filesystem, one should use "bootflags=data=writeback".....
which are bootflags. The other thing I noticed about the website you were referencing in previous posts is that the information given refers to an out of date kernel, that you should not be running at this point in time. The opening paragraph of one:
Quote:

Summary: With the 2.4 release of Linux come many new filesystem possibilities, including Reiserfs, XFS, GFS, and others. These filesystems sound cool, but what exactly can they do, what are they good at, and exactly how do you go about safely using them in a production Linux environment? Daniel Robbins answers these questions by showing you how to set up these new advanced filesystems under Linux 2.4. In this installment, Daniel continues his look at ext3, a new improved version of ext2 with journaling capabilities. He reveals all the inside information on ext3, and demonstrates some shockingly good ext3 data=journal interactive performance numbers.
refers to Kernel 2.4 which was new in 2001! Are you playing with an old kernel, or are you using an uptodate one? You should be able to see this in GRUB at boot time.

irishbitte 11-02-2009 06:36 PM

BTW, you may find the article here: https://help.ubuntu.com/community/EeePC and here: https://help.ubuntu.com/community/EeePC/Installation helpful. The author talks about wanting to reduce amount of writes to a SSD, hence suggests using ext2 instead of ext3. It has drawbacks, mainly if your netbook crashes. Very strong on not having a swap partition, suggests using a swap file instead.


All times are GMT -5. The time now is 05:56 PM.