# reiserfs - drives me crazy

## Karsten1973

Hi,

Everytime I boot, reiserfs tells me, that my filesystem is corrupted. Every time. The repair checks me to reboot (which runs fine), I shut down the computer okay - next boot reiserfschck tells me "Wrong number of used blocks". 

Okay, what do I know? reiserfs says:

 *Quote:*   

> 
> 
> its 3.6
> 
> during boot it says: ordered data mode journal params, size 8192, journal first block 18, max trans length 1024, max batch 900, max commit age 30, max ??? age 30 (can't read my writing here, sorry) using r5 hash to sort names.
> ...

 

After init starts, it there is a "root file system check". Here the error occurs. It says

 *Quote:*   

> file system clean,
> 
> read only,
> 
> skipping journal replay
> ...

 

Possible reasons? I changed to gcc 4 and I have loads of X-Server freezes, which forces me to cut the power supply to my computer. 

How can I get rid of the reiserfs problem?

Thanks for any help!

----------

## linuxtuxhellsinki

Switch to Ext3 or some other more reliable filesystem (XFS,JFS ?)  :Confused: 

----------

## Jaglover

 *Karsten1973 wrote:*   

> 
> 
> Possible reasons? I changed to gcc 4 and I have loads of X-Server freezes, which forces me to cut the power supply to my computer. 
> 
> 

 

If your X server freezes and Linux is still running - why to cut the power?

----------

## Kurt Steiner

 *linuxtuxhellsinki wrote:*   

> Switch to Ext3 or some other more reliable filesystem (XFS,JFS ?) 

 Good one... ReiserFS is the most reliable!   :Smile: 

@Karsten1973: I'm pretty sure thats becouse of sudden power cuts - try to solve your problem with X. Maybe downgrade your gcc. 

--EDIT--

Is there any possibility you could kill X? Try Ctrl+Alt+Del or Ctrl+Alt+Backspace, or switching to konsole. Try to reconfigure Xorg, or the kernel...

----------

## Maedhros

Moved from Installing Gentoo to Kernel & Hardware.

----------

## jomen

You could (and should) use the install-cd or another live-cd like knoppix and run the file-system check from there:

reiserfsck /dev/_your_device_

possibly with the argument --fix-fixable

make sure it is not mounted...

Be very careful (stay away!) from using --rebuild-tree - this could wreck everything.

...from the manual-page of reiserfsck:

 *Quote:*   

> if the reiserfsck --check reports "Running with --rebuild-tree is required". You are strongly encouraged to make a backup copy  of the  whole  partition before attempting the --rebuild-tree option

 

----------

## Karsten1973

 *Jaglover wrote:*   

>  *Karsten1973 wrote:*   
> 
> Possible reasons? I changed to gcc 4 and I have loads of X-Server freezes, which forces me to cut the power supply to my computer. 
> 
>  
> ...

 

the only way to talk to my computer when X freezes is via ssh. But I have only one computer... So I can't always walk over to my neighbor and ask for it (several times a day). And no, you can't just Control-Alt-F1 to a terminal. Its totally frozen.

----------

## Karsten1973

 *Kurt Steiner wrote:*   

>  *linuxtuxhellsinki wrote:*   Switch to Ext3 or some other more reliable filesystem (XFS,JFS ?)  Good one... ReiserFS is the most reliable!  
> 
> @Karsten1973: I'm pretty sure thats becouse of sudden power cuts - try to solve your problem with X. Maybe downgrade your gcc. 
> 
> --EDIT--
> ...

 

I can't kill X. All keys are frozen. Only a ssh login works. Not always possible.

----------

## Karsten1973

 *jomen wrote:*   

> You could (and should) use the install-cd or another live-cd like knoppix and run the file-system check from there:
> 
> reiserfsck /dev/_your_device_
> 
> possibly with the argument --fix-fixable
> ...

 

This doesn't sound like a solution - its exactly what happens automatically everytime I boot. What I need is the reason why there are is a "wrong amount of used blocks" even through the partition was umounted before the computer shut itself down.

----------

## get sirius

 *Kurt Steiner wrote:*   

>  *linuxtuxhellsinki wrote:*   Switch to Ext3 or some other more reliable filesystem (XFS,JFS ?)  Good one... ReiserFS is the most reliable!  "

 

Another good one!  I've heard more complaints of reiserfs' corruption/fragmentation problems than of any other filesystem, and v.3.6 is not being developed/debugged any further.  Ext3, on the other hand, is still under development, and its developers have recently released several "killer" improvements to it that drastically increase its speed.  AND it has always been more reliable than reiserfs.  There are several forum threads extant which discuss this in a lot of depth - search for them, they're worth reading.   :Smile: 

----------

## Karsten1973

 *get sirius wrote:*   

>  *Kurt Steiner wrote:*    *linuxtuxhellsinki wrote:*   Switch to Ext3 or some other more reliable filesystem (XFS,JFS ?)  Good one... ReiserFS is the most reliable!  " 
> 
> Another good one!  I've heard more complaints of reiserfs' corruption/fragmentation problems than of any other filesystem, and v.3.6 is not being developed/debugged any further.  Ext3, on the other hand, is still under development, and its developers have recently released several "killer" improvements to it that drastically increase its speed.  AND it has always been more reliable than reiserfs.  There are several forum threads extant which discuss this in a lot of depth - search for them, they're worth reading.  

 

Its my root partition. Who can I change it to ext3 without recompiling everything?

----------

## jomen

 *Quote:*   

> This doesn't sound like a solution

  but it might be...

I looked at the script /etc/init.d/checkroot and /etc/init.d/checkfs - maybe /forcefsck is not deleted...

and

only a check you run yourself lets you see & makes sure there are no errors left

you cannot interact with the automatic procedure and you _might_ not even see everything important

You are looking for a solution - how can you know if you did not try?

-edit-

and for the previous post which was faster than me:

you don't need to recompile anything (except your kernel maybe) but you do need to backup/copy everything from the old filesysten to the new filesystem - no problem if you have enough space on your hd - but a bit of work if you don't

----------

## linuxtuxhellsinki

 *Karsten1973 wrote:*   

> 
> 
> Its my root partition. How can I change it to ext3 without recompiling everything?

 

Copy everything on other partition with tar,cp or partimage etc...(search Stage4 from forums) and then make a fresh filesystem and copy everything back, then you'll have new unfragmented reliable filesystem   :Confused: 

----------

## Karsten1973

 *linuxtuxhellsinki wrote:*   

>  *Karsten1973 wrote:*   
> 
> Its my root partition. How can I change it to ext3 without recompiling everything? 
> 
> Copy everything on other partition with tar,cp or partimage etc...(search Stage4 from forums) and then make a fresh filesystem and copy everything back, then you'll have new unfragmented reliable filesystem  

 

Okay, I do that. Haven't done it before... My / contains: *Quote:*   

> 
> 
> karsten@hagen ~ $ ls /
> 
> bin   dev  grub  lib         media  opt      proc  sbin  tmp  var
> ...

 I guess I don't need to copy /dev, /proc, /lost-found and /tmp

right?

----------

## jomen

in /tmp there is a file called .keep - I think you want to recreate that after you recreate /tmp - I was reading about strange problems during upgrades when this was not present anymore (probably keeps emerge from deleting stuff in there which is still in use)

You don't need to copy /dev - but make sure you create /dev/null and /dev/console before you boot - else you will have the problem to have to do it on the error you will get because these critical files are missing

(just copy these two...)

/proc and /sys just needs to be created - do not copy them

and: use "cp -a" to keep all the permissions intact

----------

## Karsten1973

 *jomen wrote:*   

> and: use "cp -a" to keep all the permissions intact

 

cp -a gives me lot of errors: "cannot create sybolic link ... Operation not permitted" 

I guess thats a real problem, as loads of links exist in /bin - important programs will not be found if the links are missing. What am I to do? Help!!!  :Smile: 

----------

## jomen

could you post:

the command you gave - which gave these errors

also:

the output of "mount" - and/or make sure the partition you are copying to is mounted rw

and: you must run the copy-command as root - else you will not have permission to read some files or to create them with the right permissions

------------------------------------------------------

a suggestion of how to do it...

the new partition is mounted at /new-part (rw)

as root:

cd / && cp -a `/bin/ls -1Ab | egrep -v "^new-disk$|^boot$|^proc$|^dev$|^sys$|^tmp$"` /new-part

or

cd / && cp -a /bin /etc /home /lib /media /mnt /opt /root /sbin /usr /var /new-part

are two variants to do it - make sure _nothing_ is mounted on /mnt or /media or anywhere else (would be recursively copied also...)

after the command finishes - create:

/boot /dev /proc /sys /tmp

and copy /dev/console and /dev/null to /dev on the new partition

and create /tmp/.keep there

then change fstab (on the new partition) to reflect the change (different device for / and different filesystem - including mount-options...)

and also your grub.conf for the same reason

reboot

----------

