LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-30-2006, 06:26 AM   #1
PingFloyd
Member
 
Registered: Jun 2006
Posts: 94

Rep: Reputation: 16
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).
 
Old 06-30-2006, 10:42 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,745

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Ironically, I don't have the answers, just another question. Did you edit /etc/fstab to change the filesystem type from ext2 to ext3?
 
Old 06-30-2006, 10:48 AM   #3
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally Posted by PingFloyd
I recently converted my filesystem from ext2 to ext3.''''''''''''
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.

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?
As far as I know there is no reason to unmount the drive to create an ext3 filesystem from ext2.

I am curious to know why you took the decision to create ext 3 using;

tune2fs -i 0 /dev/hdXX

looking at man tune2fs;

"-i interval-between-checks[d|m|w]
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.

Last edited by TigerOC; 06-30-2006 at 10:51 AM.
 
Old 07-01-2006, 11:53 AM   #4
PingFloyd
Member
 
Registered: Jun 2006
Posts: 94

Original Poster
Rep: Reputation: 16
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.

TigerOC:
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?
 
Old 07-01-2006, 01:28 PM   #5
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Some ext3 tricks.
 
  


Reply

Tags
e2fsck, ext2, ext3, filesystems, mount, mounting, tune2fs, umount, unmounting


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXT2 -fs warning (device sda1): ext2_fill_super:mounting ext3 filesystem as ext2 snakeo2 Linux - Newbie 6 11-19-2006 07:35 PM
Converting ext2 to ext3 joker20 Slackware 6 09-23-2004 06:18 PM
converting from ext2 to ext3 sqn Linux - Software 3 01-13-2004 03:25 PM
ext2_read_super: mounting ext3 filesystem as ext2 Jiggy Linux - Newbie 8 11-18-2003 07:27 PM
Converting ext2 to ext3 ericcarlson Linux - Software 4 01-22-2002 07:40 AM


All times are GMT -5. The time now is 04:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration