Click to See Complete Forum and Search --> : lossless hard shutdown


tecknophreak
03-20-2002, 09:10 AM
anyone know of a storage medium or linux distro which i can read/write at any time and the only info i would lose on a hard shutdown would be the data i'm currently writing to the medium?

i need to be able to handle hard shutdowns at any time and i'm pretty new to this. :rolleyes:

demian
03-20-2002, 09:26 AM
This is not really a question of the right storage medium but rather about the filesystem. What you want is a journaling filesystem like ext3, reiserfs, jfs or xfs. Personally I use ext3 and never had any problems.

If you have a half-way recent distro you might have support for various journaling systems already.

tecknophreak
03-20-2002, 09:46 AM
sweet! thanks, i'll have to try it out. this seems easier done than said :D

demian
03-20-2002, 09:58 AM
Originally posted by tecknophreak:
<STRONG>sweet! thanks, i'll have to try it out. this seems easier done than said :D</STRONG>

You're welcome. If you're going for ext3 and have ext2 filesystems the upgrade is a piece of cake. All you have to do is make sure your kernel supports ext3. Then run tune2fs -j /dev/xxxx and change the corresponding entry in /etc/fstab from ext2 to ext3.

Be aware that if you want your root filesystem to be ext3 you will need a kernel that has ext3 support compiled in. A kernel module won't do it because you need ext3 support to load the module.

Here's a comparison between various journalinf filesystems. It might be a little dated, though. http://bazar.conectiva.com.br/~marcelo/jfs/

tecknophreak
03-20-2002, 10:13 AM
Originally posted by demian:
<STRONG> All you have to do is make sure your kernel supports ext3. </STRONG>

how do you go about doing that again? i forgot, sorry.

don't tell me it's in /etc/filesystems, please. cause it ain't in there.

[ 20 March 2002: Message edited by: tecknophreak ]

demian
03-20-2002, 11:17 AM
There are several ways to accomplish this.
[list=a]
The easy way (only applicable if you don't want your root filesystem to be ext3): Chances are all you have to do is modprobe ext3 (not sure if that's the module name but something along thoses lines).
The with-a-little-help-from-my-distributor way: Most all distros offer precompiled kernels with ext3 support compiled in. You can download the corresponding package (what was your distro again) and install it. After you installed the new kernel and verified that it works you can go and convert your filesystems.
The real-penguins-don't-trust-precompiled-kernel-images way: You grap the latest kernel source (has to be more recent than 2.4.15 (&lt;- under _no_ circumstances use 2.4.15. It contains a filesystem corruption bug!)) and compile it yourself. While doing so you make sure that you answer 'yes' to 'support for ext3 filesystem' in the configuration dialog. Install the new kernel, make sure it works properly and then convert your filesystems.
[/list=a]