[NCLUG] newbie::Write to superblocks

Yong Sun ysun at gxt.com
Wed Aug 1 13:42:35 MDT 2001


Thanks for input from Sean Reifschneider and Michael Dwyer. I was not
running as root, and I was not writing file to /dev/hda. Here is the
output when I did "dmesg",

=======================================
llocating block in system zone - block = 688480
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688488
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688496
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688504
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688512
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688520
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688528
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688536
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688544
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688552
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688560
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688568
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688576
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688584
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688592
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688600
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688608
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688616
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688624
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688632
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 688640
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786432
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786440
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786448
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786456
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786464
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786472
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786480
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786488
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786496
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786504
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786512
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786520
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786528
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786536
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786544
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786552
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786560
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786568
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786576
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786584
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786592
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786600
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786608
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786616
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786624
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786632
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786640
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786648
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786656
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786664
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786672
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786680
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786688
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786696
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786704
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786712
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786720
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786728
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786736
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786744
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786752
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786760
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786768
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786776
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786784
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786792
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786800
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786808
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786816
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786824
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786832
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786840
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786848
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786856
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786864
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786872
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786880
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786888
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786896
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786904
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786912
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786920
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786928
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786936
EXT2-fs error (device sd(8,8)): ext2_new_block: Allocating block in system
zone - block = 786944
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#768546: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#752194: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#735842: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#735842: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#752194: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#752194: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#768546: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_new_block: Free blocks count
corrupted for block group 3
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#768546: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#768546: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#768546: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_readdir: bad entry in directory
#621378: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0
EXT2-fs error (device sd(8,8)): ext2_free_inode: bit already cleared for
inode 245281

=============================

Does that mean anything to your guys?

Thanks,
Confused Yong

Sean Reifschneider wrote:

> On Tue, Jul 31, 2001 at 04:09:06PM -0600, Michael Dwyer wrote:
> >> int fd = open(afile, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644);
> >> int n1, n2, n3;
> >> ....
> >> off64_t offset = (off64_t) (n1*n2*n3*sizeof(float));
> >> if(lseek64(fd, offset, SEEK_SET) != offset) exit(-1);
> >> write(fd, blablah...);
> >
> >Unless you run your programs as root, this should not
> >have destroyed superblocks.  lseek (and presumably lseek64)
>
> To be precise, unless you ran it as root *AND* you specified the file
> "/dev/hda" or the like...  Simply running as root and doing a large
> negative seek on a file will just fail.
>
> Sean
> --
>  The early bird may get the worm, but the second mouse gets the cheese.
> Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
> tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python
> _______________________________________________
> NCLUG mailing list
> NCLUG at nclug.org
> http://www.nclug.org/mailman/listinfo/nclug




More information about the NCLUG mailing list