On 7/25/06, Vladimir V. Saveliev <[EMAIL PROTECTED]> wrote:
Hello

On Sat, 2006-07-22 at 08:37 +1000, Joel Heenan wrote:
> On 7/22/06, Vladimir V. Saveliev <[EMAIL PROTECTED]> wrote:
> > hello
> >
> > On Fri, 2006-07-21 at 10:09 +1000, Joel Heenan wrote:
> > > Hi,
> > >
> > > I can home about two weeks ago and found my media box locked up. I was
> > > able to discover that it had filled up its /dev/md2 partition (mounted
> > > on /home) which surprised me because it is 550 gigs. Perhaps mythtv
> > > went nuts and used it all up. It was only a temporary thing I was
> > > going to move mythtv to another partition anyway and boy I wish I had
> > > now :-P.
> > >
> > > Anyway I rebooted and the fsck said I had to run rebuild-tree. So I
> > > ran that and a few days later it said "out of disk space, aborted". I
> > > can't mount the partition it says "No folder found I believe". I tried
> > > it a few times with both the reiserfsprogs from etch:
> > >
> > > ii  reiserfsprogs                    3.6.19-2
> > > User-level tools for ReiserFS filesystems
> > >
> > > and the latest ones downloaded from the website (3.6.19). I am
> > > currently trying it with the -S option.
> > >
> > there is no need to use -S in your case.
> >
> > > I'm running a custom 2.6.12 kernel which is basically the same as the
> > > default debian one except it includes some drivers for my dvico fusion
> > > tv tuner.
> > >
> > > I read that the best way to fix this problem is to dd to a bigger
> > > partition but there is really no easy way for me to do that - it will
> > > probably involve me purchasing 2x300gig partitions, raiding them, then
> > > performing the restore.
> > >
> > > Please let me know if there is a way I can fix this without going to a
> > > bigger partition.
> > >

You can configure linear raid of the /dev/md2 and some additional
device, which does not have to be very big. 100 mb should be enough and
should not be hard to allocate for spare.

Than you can have something like:
raiddev /dev/md3
        raid-level      linear
        nr-raid-disks   2
        chunk-size      32
        persistent-superblock 0
        device          /dev/md2
        raid-disk       0
        device          /dev/spare
        raid-disk       1


IMPORTANT NOTE: persistent-superblock has to be set to 0.

Than you should run
reiserfsck --rebuild-sb /dev/md3
and answer n to "Did you use resizer(y/n)[n]:"
and answer y to "Is this ok ? (y/n)[n]:"

Than run reiserfsck --rebuild-tree. There should be no problem with lack
of disk space.

Hey Vladimir,

Thanks... I followed your instructions exactly. I thought about doing
something similar but wasn't sure about how to go about it.

After I answered y to is this ok? it said "The fs may still be
unconsistent. Run reiserfsck --check.". I did that and it said it was
still messed up (as I expected). Its currently doing a rebuild-tree.

Greatly appreciate your help. Lets see how it goes :-)

Joel

> > > Here is output of the fsck:
> > >
> > > """
> > > fsck.reiserfs --rebuild-tree /dev/md2
> > > reiserfsck 3.6.19 (2003 www.namesys.com)
> > >
> > > *************************************************************
> > > ** Do not  run  the  program  with  --rebuild-tree  unless **
> > > ** something is broken and MAKE A BACKUP  before using it. **
> > > ** If you have bad sectors on a drive  it is usually a bad **
> > > ** idea to continue using it. Then you probably should get **
> > > ** a working hard drive, copy the file system from the bad **
> > > ** drive  to the good one -- dd_rescue is  a good tool for **
> > > ** that -- and only then run this program.                 **
> > > ** If you are using the latest reiserfsprogs and  it fails **
> > > ** please  email bug reports to [email protected], **
> > > ** providing  as  much  information  as  possible --  your **
> > > ** hardware,  kernel,  patches,  settings,  all reiserfsck **
> > > ** messages  (including version),  the reiserfsck logfile, **
> > > ** check  the  syslog file  for  any  related information. **
> > > ** If you would like advice on using this program, support **
> > > ** is available  for $25 at  www.namesys.com/support.html. **
> > > *************************************************************
> > >
> > > Will rebuild the filesystem (/dev/md2) tree
> > > Will put log info to 'stdout'
> > >
> > > Do you want to run this program?[N/Yes] (note need to type Yes if you 
do):Yes
> > > Replaying journal..
> > > Reiserfs journal '/dev/md2' in blocks [18..8211]: 0 transactions replayed
> > > ###########
> > > reiserfsck --rebuild-tree started at Mon Jul 17 21:41:44 2006
> > > ###########
> > >
> > > Pass 0:
> > > ####### Pass 0 #######
> > > Loading on-disk bitmap .. ok, 116676032 blocks marked used
> > > Skipping 11771 blocks (super block, journal, bitmaps) 116664261 blocks
> > > will be read
> > > 0%....20%....block 85875092: The number of items (256) is incorrect,
> > > should be (1) - corrected
> > > block 85875092: The free space (1) is incorrect, should be (208) - 
corrected
> > > pass0: vpf-10110: block 85875092, item (0): Unknown item type found
> > > [33488896 65537 0x100 ??? (15)] - deleted
> > >                                                    left 0, 15065 
/seccseccccc
> > > 108413 directory entries were hashed with "r5" hash.
> > >         "r5" hash is selected
> > > Flushing..finished
> > >         Read blocks (but not data blocks) 116664261
> > >                 Leaves among those 87768646
> > >                         - leaves all contents of which could not be
> > > saved and deleted 1
> > >                 Objectids found 108417
> > >
> > > Pass 1 (will try to insert 87768645 leaves):
> > > ####### Pass 1 #######
> > > Looking for allocable blocks .. finished
> > > 0%....20%....40%..Not enough allocable blocks, checking bitmap...there
> > > are 1 allocable blocks, btw
> > >
> >
> > I am working on a fix for this problem. But the above output looks
> > suspicious.
> >
> > What kind of files are there, would you describe?
>
> It is the /home folder on my media box. So it has around 10gigs of
> personal files (normal everyday file usage), and the rest is media.
> There is 40 gigs of mp3s. 100 gigs of avi files of different sizes but
> mostly large at least 100 megs or more.
>
> It also has 200 gigs of mythtv NUV files.
>
> My suspicion is that mythtv went nuts and began recording something
> and never closed the file and used up all the space. But really I
> don't know because it has been unusable since I found the problem.
>
> > Are they long? Did you mount reiserfs with any options?
>
> Some of the files are long, there would be some files that are 4 gigs
> in size. Sometimes mythtv makes very large files.
>
> I mounted reiserfs with "defaults"
>
> > Can you give me ssh access to the filesystem so that I could take a look
> > at it myself?
>
> The filesystem contains some sensitive data so I can't really do this
> I'm afraid. I'm happy to run any diagnostic tools you have or provide
> any more information.
>
> Joel
>


media:/# mdadm -D /dev/md3
/dev/md3:
        Version : 00.90.01
  Creation Time : Tue Jul 25 21:37:36 2006
     Raid Level : linear
     Array Size : 467635872 (445.97 GiB 478.86 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 3
    Persistence : Superblock is not persistent

    Update Time : Tue Jul 25 21:37:36 2006
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

       Rounding : 32K

    Number   Major   Minor   RaidDevice State
       0       9        2        0      active sync   /dev/md2
       1       8       20        1      active sync   /dev/sdb4
media:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md1              19534244   2752716  16781528  15% /
tmpfs                   258164         0    258164   0% /dev/shm
/dev/md0                 96248     52120     44128  55% /boot
media:/# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1               19G  2.7G   17G  15% /
tmpfs                 253M     0  253M   0% /dev/shm
/dev/md0               94M   51M   44M  55% /boot
media:/# df /dev/md2
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md1              19534244   2752716  16781528  15% /
media:/# df /dev/md3
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md1              19534244   2752716  16781528  15% /
media:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md1              19534244   2752716  16781528  15% /
tmpfs                   258164         0    258164   0% /dev/shm
/dev/md0                 96248     52120     44128  55% /boot
media:/# reiserfsck --rebuild-sb /dev/md3
reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to [email protected], **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will check superblock and rebuild it if needed
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes

Did you use resizer(y/n)[n]: n
rebuild-sb: wrong block count occured (116676032), fixed (116908960)
rebuild-sb: wrong bitmap number occured (3561), fixed (3568)
rebuild-sb: wrong tree height occured (65535), zeroed
Reiserfs super block in block 16 on 0x903 of format 3.6 with standard journal
Count of blocks on the device: 116908960
Number of bitmaps: 3568
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 
116676032
Root block: 0
Filesystem is clean
Tree height: 0
Hash function used to sort names: "r5"
Objectid map size 972, max 972
Journal parameters:
        Device [0x0]
        Magic [0x57487cec]
        Size 8193 blocks (including 1 for journal header) (first block 18)
        Max transaction length 1024 blocks
        Max batch size 900 blocks
        Max commit age 30
Blocks reserved by journal: 0
Fs state field: 0xfa03:
        FATAL corruptions exist.
         some corruptions exist.
sb_version: 2
inode generation number: 75296
UUID: <no libuuid installed>
LABEL: /home
Set flags in SB:
        ATTRIBUTES CLEAN
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.

media:/# mount /dev/md3 /home/
mount: Not a directory
media:/# reiserfsck --check /dev/md3
reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to [email protected], **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will read-only check consistency of the filesystem on /dev/md3
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
###########
reiserfsck --check started at Tue Jul 25 21:41:53 2006
###########
Replaying journal..
Reiserfs journal '/dev/md3' in blocks [18..8211]: 0 transactions replayed
Zero bit found in on-disk bitmap after the last valid bit.
Checking internal tree..

Bad root block 0. (--rebuild-tree did not complete)

Aborted
media:/# reiserfsck --rebuild-tree /dev/md3
reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************
** Do not  run  the  program  with  --rebuild-tree  unless **
** something is broken and MAKE A BACKUP  before using it. **
** If you have bad sectors on a drive  it is usually a bad **
** idea to continue using it. Then you probably should get **
** a working hard drive, copy the file system from the bad **
** drive  to the good one -- dd_rescue is  a good tool for **
** that -- and only then run this program.                 **
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to [email protected], **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will rebuild the filesystem (/dev/md3) tree
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
Replaying journal..
Reiserfs journal '/dev/md3' in blocks [18..8211]: 0 transactions replayed
Zero bit found in on-disk bitmap after the last valid bit. Fixed.
###########
reiserfsck --rebuild-tree started at Tue Jul 25 21:43:03 2006
###########

Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 116686848 blocks marked used
init_source_bitmap: Bitmap 3561 (of 32768 bits) is wrong - mark all blocks 
[116686848 - 116719616] as used
init_source_bitmap: Bitmap 3562 (of 32768 bits) is wrong - mark all blocks 
[116719616 - 116752384] as used
init_source_bitmap: Bitmap 3563 (of 32768 bits) is wrong - mark all blocks 
[116752384 - 116785152] as used
init_source_bitmap: Bitmap 3564 (of 32768 bits) is wrong - mark all blocks 
[116785152 - 116817920] as used
init_source_bitmap: Bitmap 3565 (of 32768 bits) is wrong - mark all blocks 
[116817920 - 116850688] as used
init_source_bitmap: Bitmap 3566 (of 32768 bits) is wrong - mark all blocks 
[116850688 - 116883456] as used
init_source_bitmap: Bitmap 3567 (of 25504 bits) is wrong - mark all blocks 
[116883456 - 116908960] as used
Skipping 11778 blocks (super block, journal, bitmaps) 116897182 blocks will be 
read
0%^A                                                   left 114759478, 13791 
/sec

Reply via email to