A question for the filesystem gurus about converting from ext2 to ext3 and mounting
I recently converted my filesystem from ext2 to ext3. Currently I have the system setup to only use 2 filesystems. One partition is mounted as "/" and the other is my swap partition.
Before doing the conversion I read everything I could get my hands on over the internet that seemed like it might be useful information and things to know before proceeding.
I noticed that there seems to be alot of conflicting information about what the right procedure is for doing the conversion (ironically finding answers lead to more questions :) ). The information in regards to creating the journal (# tune2fs -j /dev/hdXX) seems to be real straight forward and there doesn't seem to be much conflicting information from varying sources about that. The part where there is different stories from different sources is in regards to whether unmounting the filesystem, you're going to convert and change settings with tune2fs (eg. tune2fs -i 0 /dev/hdXX), is really necessary. Some say it is while others say seem to imply that it isn't.
Also, some sources talk about running mkinetrd if it's the "/" root partition you're going to convert. Otherwise you may not be able to get the system to boot. Some sources make no mention of it in regards to conversion the root filesystem. I may be wrong, but I have a feeling that this may only be necessary if the kernal has to be rebuilt to support ext3. Same thing when it comes to editing LILO's config (I"m using grub though).
Anyway, to make a long story short:
I didn't unmount "/" before converting it and changing the settings for intervals in which e2fsck (tune2fs -i 0 /dev/hdXX) is run on it. The system booted up fine without any problems or error messages about the filesystem and tune2fs -l shows the filesystem with the status of "clean".
My question is if I made a huge mistake by not unmounting it before running tune2fs on it with those 2 options. It seems to be functioning without any problems so far, but am I just on barrowed time to where data corruption is going rear it's ugly head eventually? Also, if the answer is that I'm not safe, if I run e2fsck on it, should I be ok if everything checks out ok? If I need to run e2fsck on it, do I need to run any special options since it's now an ext3 filesystem? Is there any special caveats about running e2fsck on an ext3 filesystem that I should take into account before proceeding with running it?
Any expert help or advice is very much appreciated.
note: In case it helps to know, I'm running with kernal 2.4.27-3-686 (this is the kernal that I got through Debian's stable repository via apt-get).
Ironically, I don't have the answers, just another question. Did you edit /etc/fstab to change the filesystem type from ext2 to ext3?
I am curious to know why you took the decision to create ext 3 using;
tune2fs -i 0 /dev/hdXX
looking at man tune2fs;
Adjust the maximal time between two filesystem checks. No post-fix or d result in days, m in months, and w in weeks. A value of zero will disable the time-dependent checking. It is strongly recommended that either -c (mount-count-dependent) or -i time-dependent) checking be enabled to force periodic full e2fsck(8) checking of the filesystem. Failure to do so may lead to filesystem corruption due to bad disks, cables, memory, or kernel bugs to go unnoticed until they cause data loss or corruption.
In this case as can be seen above no auto filesystem checks is bad.
Normally one would use tune2fs -j /dev/hdxy to create the ext3 system as this then creates the necessary journal for you and normally e2fsck runs about every 20th boot. One can amend this frequency using the switch -c . Read man tune2fs for more info on this.
Yeah, I changed the setting for ext2 in the fstab to ext3. Supposidly a person can put "auto" in there as well since allegidly mount is supposed to look to see if it's ext3 first then try ext2 second, by default. There might be some caveats to that, so I decided to put the "ext3" option setting in the fstab instead.
That's a good point that you bring up. I was originally just going off what the howtos were recommending when I set that option (-i). I think I'll re-enable it to probably somewhere around 30 days. IIRC, the default is 180 days?
|All times are GMT -5. The time now is 10:05 PM.|