noatime 

Newsgroups: comp.os.linux.misc
Date: 9 Apr 2003 14:38:40 GMT
> > Probably you can mount ext3 with some options enhancing performance,
> > like "noatime". 'man mount'
>
> On a side note, what is the ramification of noatime?  I've been told
> that will stop the disk accessing every few seconds, which I'd like to
> do on my home computer to reduce wear.

Modern disks are built to run 24/7. Including "noatime" won't increase the lifespan of your disks, it'll just make seeks and writes less frequent, speeding up disk access in most cases. If you want to make your disks last longer, leave them on all the time. Most disk failures occur at spinup (just as most light-bulb failures occur at initial power-on.)

> But I don't really understand what the ramification of stopping inode
> access time means?

It doesn't mean much to the normal user. If you do "ls /bin", every file in /bin gets its inode accessed. Typically, the files you're interested in will have been accessed constantly, so the atime doesn't really convey much useful information. If you mount a filesystem with "noatime", then neither the -atime option to find nor the -u option to ls will give you valid data. Typically, you want the last modification time (-mtime) anyway.

Matt G

noatime 

> On a side note, what is the ramification of noatime?

My laptop has had everything set to "noatime" for several years and I haven't noticed any problems. It is possible for programs that care about atime to fail if it isn't updated, but that seems fairly rare in practice.

> I've been told that will stop the disk accessing every few seconds,

Atime updates cause inode updates whenever you read a file. This causes writes to disk even if you haven't explicitly written anything. I turn off atime on my laptop because if I don't the disk won't spin down.

Bob Hauck

ext2 to ext3 in 4 easy steps 

Posted by: Linegod on Aug 30, 2001

http://www.warpedsystems.sk.ca/modules.php?op=modload&name=News&file=article&sid=324

After reading various articles on the virtues of different Journalled Files Systems, I decided to take the plunge and convert my test box over to ext3. Armed with the latest Mandrake kernel and e2fsprogs I set out to bring my drives into the 21st Century :)

The process itself could not have been simpler, and as the title of the article suggest, was done with the following 4 steps:

That's all there was to it. The reason for unmounting 'not in use' file systems is that it will hide the '.journal' entry after creation, where on mounted filesystems it will be visable.

To 'shock test' the system (not recommended), I simply cut the power to the box and watch it boot up. All but the '/' file system, which still ran fsck, came back up without a hitch. I believe the '/' problem is due to the new 'devfsd', but will do some tests to confirm this.

If you are looking for a quick and easy solution for journalled file systems, I'd say ext3 is the way to go.

ext2 to ext3 in 4 easy steps 

> did u manage to mount it data=writeback? wouldn't work for me....but should
> be a lot faster.

Haven't tried that yet, but I will…..

No luck here either. Must tinker some more….

pasnak

ext2 to ext3 in 4 easy steps 

From: http://www.redhat.com/support/wpapers/redhat/ext3/tuning.html#elevator

Choosing elevator settings 

The /sbin/elvtune program can be used to trade off between throughput and latency. For example, you might run: /sbin/elvtune -r 1024 -w 2048 /dev/sdd to change the elevator settings for the device /dev/sdd (including all the partitions on /dev/sdd). Changes to the elevator settings for a partition will apply to the elevator for the device the partition is on; all partitions on a device share the same elevator.

Once you have found elvtune settings that give you your most satisfactory mix of latency and throughput for your application set, you can add the calls to the /sbin/elvtune program to the end of your /etc/rc.d/rc.local script so that they are set again to your chosen values at every boot.

Choosing journaling mode 

There are some characteristic loads that show very significant speed improvement with the data=writeback option. In those cases, the data consistency guarantees are essentially the same as the ext2 file system; the difference is that the file system integrity is maintained continuously during normal operation.

If you switch from ext2 to ext3 and find that your application performance drops substantially, the data=writeback option is likely to give you a significant amount of performance back; you will still have some of the availability benefits of ext3 (file system is always consistent) even if you do not have the more expensive data consistency guarantees.

Tong

Choosing journaling mode 

It is because / is already mounted as read only at boot. And remounting with data=writeback is not possible because at boot it is mounted as data=ordered. So, now to mount as writeback at boot?

Danny

ext3 back to ext2 in 3 easy steps 

Converting a ext3 partition back to ext2 is an easy task, as shown in the following 3 easy steps. However, it can also be extremely troublesome. The following steps will make conversion hassle free. For the reasons behind it, and cases that may go wrong (and aftermath), read on the following articles.

That's it.

Optionally you can use parted to confirm the partitions are as ext2.

Tong

Converting ext3 to ext2 

Newsgroups: comp.os.linux.misc
Date: Sat, 12 Apr 2003 15:30:35 GMT
> The filesystem HOWTO says that it is "easily" done, but doesn't mention
> how to do it.  Havn't been too successful in googling for an answer.
> Somebody give me a pointer please?

Well, it's in the man page (tune2fs), but even some fellow instructors have had trouble figuring it out:

tune2fs -O ^has_journal /dev/hda5

will turn off (and, I believe, remove) the journal. As OP has stated, an ext3 fs can probably be mounted as ext2, so it's not mandatory to turn off the journal to use the fs, but it could be confused if the journal is still there and stale the next time the fs is mounted.

Also, some utilities (specifically, previous versions of Partition Magic) cannot countenance an ext3 fs and won't deal with it. Turning off the journal satisfies PM.

Dave Brown

ext3 to ext2 convertion 

Newsgroups: linux.debian.user
Date: 2003-02-13 13:10:12 PST
> how can I convert a ext3 partition to ext2? Is it only to change the
> type in fstab and reboot? How can I synchronize the modification stored
> in the journal file?

Simply mounting it is the easy way and should be ok if your filesystem has been correctly unmounted. If you want to delete the journal itself, run "tune2fs -O ^has_journal /dev/xxx", run e2fsck and delete the ".journal" file.

Dennis

ext3 to ext2 convertion 

Yep. Just change the fstab entry from ext3 to ext2, and then reboot. The journal is flushed on a clean umount: it only needs to replay if your computer crashes.

Once you've rebooted, you can use tune2fs to remove the journal itself.

Mark Ferlatte

ext3 to ext2 convertion 

From http://www.kernel.org/pub/linux/kernel/people/sct/ext3/README :

How to move back from ext3 to ext2

It's quite easy. If you unmount an ext3 filesystem cleanly, then you can remount it as ext2 without any other commands. If you crash and are left with an unclean ext3 filesystem, on the other hand, the filesystem will prevent you from mounting it as ext2: it is not safe to mount it until you have recovered the journal, and the only way to do that for now is to mount it as ext3.

However, if for any reason you do have an ext3 filesystem which you want to convert permanently back to ext2, whether it was cleanly unmounted or not, you can use "debugfs" from e2fsprogs-1.17 or later to do it. First, run debugfs and open the filesystem (the -w flag means open for write, and the -f flag forces it to open the filesystem even if there are unknown journal flags set):

[root@sarek /root]# debugfs
debugfs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
debugfs:  open -f -w /dev/sdb1

Now, use "features" to see which feature bits are set on the filesystem:

debugfs:  features
Filesystem features: has_journal filetype sparse_super

We want to clear the journal bits, then we can quit:

debugfs:  features -has_journal -needs_recovery
Filesystem features: filetype sparse_super
debugfs:  quit
[root@sarek /root]# debugfs

That's it!

Levi Waldron

How to convert from ext3 back to ext2 

Ok, what I did was booted with 'linux single' then ran 'umount /' and 'umount /boot'. Then I ran 'tune2fs -O ^has_journal /dev/hda[x]' on both drives and changed /etc/fstab to mount as ext2.

After that the system wouldn't boot complaining about a missing journal. What am I doing wrong? I have to use the CD to rescue and go back a recreate the journal.

How can I get rid of ext3 permanently and have the system boot up to ext2?

Warren Bell

How to convert from ext3 back to ext2 

> > How can I get rid of ext3 permanently and have the system boot up to
> > ext2?
>
> Edit /etc/fstab, that's all (and you can delete the journal file if
> you want to)

I did that and the EXT3 stuff at boot was still showing up. And when I deleted the journal file the system wouldn't boot.

How to convert from ext3 back to ext2 

I read that the only real advantage of ext3 is skipping the fsck at startup. But when my system locked and I rebooted it gave me the option to do a system check. I choose yes and it's the same speed doing the fsck as ext2 was.

Now I think I have ext3 disabled. I had to reinstall the kernel wile running in ext2, then edit lilo.conf and remove the initrd line, then go into single mode and remove the journal with tune2fs -O ^has_journal /dev/…

But there's still the choice to skip fsck at boot, the one where it counts down from 5 seconds. Is this part of ext3 or is redhat just giving a choice now to fsck or not?

Also, after getting everything back to ext2 I shut the computer off in X just to test the fsck out. When I boot and X first starts I still get a flash on the screen of the desktop in the state it was when I powered off with no shutdown. I noticed it doing this when I first installed 7.2 with ext3 and thought it might be somthing to do with the journal saving the last state of the system. Since I'm still seeing this, it ext3 still active on the system?

How to convert from ext3 back to ext2 

> But there's still the choice to skip fsck at boot, the one where it
> counts down from 5 seconds.  Is this part of ext3 or is redhat just
> giving a choice now to fsck or not?

I got everything working except that there's still the chioce at boot to skip the fsck or choose yes. But now that I've removed ext3, if I choose yes to fsck it does it. If I let the time run out to skip it it does it anyway. Does anyone know how to remove this prompt to fsck? Without ext3 it doesn't do any good exept slow the boot time.

Warren Bell

convert / from ext3 back to ext2 

Newsgroups: comp.os.linux.questions
Date: 2002-05-17 22:24:03 PST

i have redhat 7.2 on a 40 gb disk… / is /dev/hda10 about 5 gb. it was ext3 till recently.

i wanted to make it ext2, so i used tune2fs to remove the journal. (tune2fs -O^has_journal /)

then i edited /etc/fstab.

i used parted to see the partition list and parted shows / now as a ext2 partition.

till here things r fine. but when i reboot, linux kernel tries mounting / read-only .. it still thinks / is ext3 and ext3 module gives up, says no journal, so kernel hangs up coz no /'s been found.

sanketh

convert / from ext3 back to ext2 

Might be the reason that he did not mount the / filesystem in read only mode when changing it… nothing revealed in the newsgroup postings.

can i convert from ext3 to ext2 file system ? 

Newsgroups: comp.os.linux.security
Date: 2002-01-04 13:14:13 PST
> Does anybody know how to convert a partition (without loosing data) from
> 3->2 format ?

Yup.

Mount it as ext2, and then remove the journal inode by doing

tune2fs -O"^has_journal"

and the inode will be freed up & everything should be back to normal ext2.

~Tim

can i convert from ext3 to ext2 file system ? 

> > Well after fighting with this I finaly got it to work. It's not
> > sufficient to just remove the journal and remount as ext2. The boot image
> > loads support for ext3 and jbd and then complains that it can't find a
> > journal file, kernel panic.
> >
> > I had to boot from CD, linux rescue, vi the
> > /lib/modules/2.4.9-13/modules.dep and remove EXT3 & JBD. Then mkinitrd a
> > new /boot/initrd-2.4.9-13.img.
>
> What a crap idea. What happened with the `tune2fs' command? Why did it
> think any journal was required if you were mounting as ext2?!
>
> ~Tim

No one want to do things the hard way. He did it because he had to.

can i convert from ext3 to ext2 file system ? 

yes. mount it as ext2. it's fully backwards compatible, though of course you won't get the journalling features.

can i convert from ext3 to ext2 file system ? 

[snip]
> If drive image 5.0 recognises ext2, in principle ext3
> shouldn't have made any difference.

You might still need to change a few flags in the superblock - things expecting ext2 don't always cope with ext3 just because it's *compatible*.

~Tim

can i convert from ext3 to ext2 file system ? 

> > You might still need to change a few flags in the superblock
>
> You might. I would be wary of continuing to use some magic tool on my
> partitions that was evidently incompatible with the FS. Cart before the
> horse if you start deciding that your DOS programs are the measure of
> what ext2 looks like.

Well, the tune2fs -O"^has_journal" that I suggested earlier was there to overcome exactly this problem. It's been known to flush all the ext3- specific bits in my superblocks before now.

I wouldn't worry, anyway; I've been known to fling filesystems around between ext2, ext3, reiserfs and XFS (massive copying across, obviously) with much abandon before now :8)

~Tim

ext3 information 

Michael K. Johnson

http://linuxtoday.com/news_story.php3?ltsn=2001-08-22-004-20-NW-RH

Why do you want to migrate from ext2 to ext3? Four main reasons: availability, data integrity, speed, and easy transition.

Availability 

After an unclean system shutdown (unexpected power failure, system crash), each ext2 file system cannot be mounted until its consistency has been checked by the e2fsck program. The amount of time that the e2fsck program takes is determined primarily by the size of the file system, and for today's relatively large (many tens of gigabytes) file systems, this takes a long time. Also, the more files you have on the file system, the longer the consistency check takes. File systems several hundreds of gigabytes in size may take an hour or more to check. This severely limits availability.

By contrast, ext3 does not require a file system check even after an unclean system shutdown, except for certain rare hardware failure cases (e.g. hard drive failures), because the data is written to disk in such a way that the file system is always consistent. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the "journal" used to maintain consistency. The default journal size takes about a second to recover (depends on the speed of the hardware).

Data integrity 

Using the ext3 file system can provide stronger guarantees about data integrity in case of an unclean system shutdown. You have a choice of how carefully to protect your data. Essentially, you can choose either to keep the file system consistent but allow for damage to data on the file system in the case of unclean system shutdown (for a modest speed up under some but not all circumstances) or to ensure that the data is consistent with the state of the file system (which means that you will never see garbage data in recently-written files after a crash.) The more safe choice to keep the data consistent with the state of the file system is the default.

Speed 

Despite writing some data more than once, ext3 is often faster (higher throughput) than ext2 because ext3's journaling optimizes hard drive head motion. You can choose from three journaling modes to optimize speed, optionally choosing to trade off some data integrity.

ne mode, data=writeback, limits the data integrity guarantees, allowing old data to show up in files after a crash, for a potential increase in speed under some circumstances. This mode, which is the default journaling mode for most journaling file systems, essentially provides the more limited data integrity guarantees of the ext2 file system and merely avoids the long file system check at boot time.

The second mode, data=ordered (the default mode), guarantees that the data is consistent with the file system: recently-written files will never show up with garbage contents after a crash.

The last mode, data=journal, requires a larger journal for reasonable speed in most cases and therefore takes longer to recover in case of unclean shutdown, but is sometimes faster for certain database operations. The default mode is recommended for all general-purpose computing needs.

Easy transition 

It is easy to change from ext2 to ext3 and gain the benefits of a robust journaling file system, without reformatting. That's right, no need to do a long, tedious, and error-prone backup, reformat, restore operation in order to experience the advantages of ext3. There are two ways to do the transition:

A list of reasons Red Hat chose ext3 for our first supported journaling file system follows. Note that these reasons are not necessarily each unique to ext3 (some other journaling file systems share several of the points here) but the whole set of reasons taken together is unique to ext3.

Again, we don't claim that every one of these points are unique to ext3. Most of them are shared by at least one other filesystem. We merely claim that the set of all of them together is true only for ext3.

Here are some of the things Red Hat has done to ensure that ext3 is safe for users to use for their data: