Journaled file systems (linux) - Can I recover an unsaved file?

Infohawk

Lifer
Jan 12, 2002
17,844
1
0
I have a laptop-- no battery. I lost power and my debian linux session was lost. I had an openoffice doc open. I use ext3. Does the fact that I have a journaled file system mean that those unsaved changes are somehwere? Lost+found? Or does journalling only prevent corruption?

Thanks
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Unsaved files don't touch the hard drive or any part of the filesystem. They sit in ram, and when you quit / reboot / log out / etc, the data is gone. Journaled filesystems can only keep track of data that acutally touches the hard drive (i.e. gets saved).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
If your lucky and you haven't booted up there might be remnants of what you were working on inside the /tmp folder, but it's unlikely you'll find anything usable. :(
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Typically journalling is only there to proect the partition from corruption, not the data.
 

Infohawk

Lifer
Jan 12, 2002
17,844
1
0
Thanks guys.

If I don't have any critical data, perhaps I should just use ext2? Does ext3 have any benefits besides preventing corruption?

Ext3 also gets in the way of spinning down my hdd (I know there's ways around it but it complicates things)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Infohawk
Thanks guys.

If I don't have any critical data, perhaps I should just use ext2? Does ext3 have any benefits besides preventing corruption?

Ext3 also gets in the way of spinning down my hdd (I know there's ways around it but it complicates things)

That's an important reason to use ext3. You could set it up to journal the data too, I think. But there is a significant performance hit.
 

Infohawk

Lifer
Jan 12, 2002
17,844
1
0
The only autosave I've noticed is the one that brings up a dialog and asks if you want to save. And then saves under openoffice format still takes five seconds or so (where word on the same system takes less than a second). The combination of these factors makes the feature unusable to me in oo. Anyway, I bought a battery so losing power shouldn't be a problem anymore.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Infohawk
I have a laptop-- no battery. I lost power and my debian linux session was lost. I had an openoffice doc open. I use ext3. Does the fact that I have a journaled file system mean that those unsaved changes are somehwere? Lost+found? Or does journalling only prevent corruption?
Thanks

Journalling file systems like ext3 and NTFS guarentee the consistancy of the file system, not user data. In fact user data written will be rolled back if required to insure the file system itself is coherient.

Bill
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
That's an important reason to use ext3. You could set it up to journal the data too, I think. But there is a significant performance hit.

The performance hit is minimal and in some cases can cause higher throughput by causing writes to be ordered.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Nothinman
That's an important reason to use ext3. You could set it up to journal the data too, I think. But there is a significant performance hit.

The performance hit is minimal and in some cases can cause higher throughput by causing writes to be ordered.

Interesting, thanks for the info. I wonder how that ordering compares to softupdates. :p
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Interesting, thanks for the info. I wonder how that ordering compares to softupdates.

Well it's probably only partially intentional with ext3's journaling code and since softupdates were designed around ordered writes, I would guess the 'hit rate' is probably a good bit lower.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
I would advise you use "VIM" because it saves backups of the files for you automatically :) . It's a very nice feature to have in recovery cases like yours. Also I would strongly suggest you stay in a journaling file system because although you may not realize it, if your file system gets corrupted you will lose more data. You may also want to setup lm-sensors so they can tell you how much battery you have left in your laptop in case of a power outage.