[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: get root inode failed



Adam Van Haren writes:
> I have just been reading all the archives on the mailing list for the
> past few hours and decided to try make the journal with:
>             
>             tune2fs -j -J10 /dev/hdc1
> 
> [root tkw /]# tune2fs -j -J10 /dev/hdc1
> tune2fs 1.20-WIP, 17-Jan-2001 for EXT2 FS 0.5b, 95/08/09
> Creating journal inode: done
> 
> [root tkw /]# cat /etc/fstab 
> /dev/hdc1 /usr/local ext3 defaults 0 0
> 
> [root tkw /]# mount /dev/hdc1
> mount: wrong fs type, bad option, bad superblock on /dev/hdc1,
>        or too many mounted file systems
> 
> EXT3-fs error (device ide1(22,1)): ext3_get_inode_loc: bad inode number: 8
> EXT3-fs: invalid journal inode.
> EXT3-fs: get root inode failed

If you run "tune2fs -j" on an unmounted filesystem, it will now create
the journal in a reserved inode (#8 as you can see).  However, for older
versions of ext3 this was not a legal inode to open, hence the error.
You need to be running a newer version of ext3 (0.0.6b preferrably) in
order to use a reserved inode for the journal.

If you don't want to update the kernel, you can do:

tune2fs -O ^has_journal /dev/hdc1
e2fsck -f /dev/hdc1
mount /dev/hdc1 /mnt
tune2fs -j -J size=10 /dev/hdc1
umount /mnt

When you run tune2fs on a _mounted_ filesystem, it will create the journal
in a regular file because it can't update the filesystem metadata directly
without potentially corrupting the filesystem.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]