ts-7000
[Top] [All Lists]

[ts-7000] jfs and fsck.jfs confusion

To:
Subject: [ts-7000] jfs and fsck.jfs confusion
From: Don Tucker <>
Date: Tue, 13 Sep 2011 09:58:33 -0500
I have a Debian lenny image on an SD card.  The 4th partition of the
card has a jfs file system.  I have the /etc/fstab file set up (I
believe) to run fsck on this file system at boot.  Each time the board
boots, fsck reads the jfs log and reports the file system as clean. However, if I run fsck.jfs -f on that partition from my PC, fsck reports
that there IS some corruption and fixes it.  My faith in the fsck run at
boot is significantly reduced by the fact that I find corruption when
running fsck off the board.  Does anyone have experience setting up the
fstab to run fsck at boot for this image?  Perhaps I'm not doing it
correctly.  My entry is:

rootfs    /    defaults,noatime    0 1

Clark gave an example that used

/dev/tssdcarda5    /    defaults,noatime,(more options)    0 1

but if I substitute ./dev/tssdcarda4 for rootfs, fsck tell me that that
device has already been mounted at boot time, and so it does not run on it.

Don

I guess I'm confused as to what the difference is between rootfs and
/dev/tssdcarda4. If I look at what is mounted:

tcors02:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1894904 674184 1220720 36% /
tmpfs 31244 0 31244 0% /lib/init/rw
tmpfs 10240 36 10204 1% /dev/shm
/dev/t! ssdcarda4 1507 1072 435 72% /initrd
none 31244 0 31244 0% /initrd/dev
none 31244 0 31244 0% /initrd/dev/shm
tmpfs 10240 36 10204 1% /dev

it shows /dev/tssdcarda4 mounted at /initrd, but isn't the 4th partition
of the SD card for the TS lenny image the root file system? If I try
adding an entry into fstab like:

/dev/tssdcarda4 /initrd jfs defaults 0 1

then, when the board boots, fsck gives an error that /dev/tssdcarda4 is
already mounted, so fsck won't be run on it. Should fsck for the 4th
partition of the SD card be run from /linuxrc on the initrd (i.e. the 3rd
partition of the SD card)?

Don
>>
>>
>> On Sep 12, 2011, at 1:05 PM, Rekcut_Nod wrote:
>>
>>> I'm still trying to understand how fsck is run on the SD card
>>> filesystem. I check to make sure what I think is the root file
>>> system is jfs:
>>>
>>> tcors02:~# df -t jfs
>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>> rootfs 1894904 674044 1220860 36% /
>>>
>>> OK, so far so good. Then I try to do the jfs equivalent of dumpe2fs:
>>>
>>> tcors02:~# jfs_tune -l /
>>> jfs_tune version 1.1.12, 24-Aug-2007
! >>> ujfs_rw_diskblocks: read 0 of 4096 bytes at offset 32768
>>> ujfs_rw_diskblocks: read 0 of 4096 bytes at offset 61440
>>> ujfs_rw_diskblocks: read 0 of 2116 bytes at offset 4096
>>>
>>> Could not read valid JFS FS or log superblock on device /.
>>>
>>> Googling on this error returned nothing. It looks like something
>>> might be wrong with the file system, but I can't tell what. I have
>>> already run fsck.jfs on the SD card's 4th partition and was told
>>> that the file system was clean, so I'm not sure what is happening.
>>>
>>> Don
>>>
>>> --- In 
<ts-7000%40yahoogroups.com>, "Rekcut_Nod" <> wrote:
>>> >
>>> > I boot my TS-7260 from a SD image, and I want to force fsck to
>>> run at boot. I! put the following entry into my /etc/fstab file (I'm
>>> running a Debian lenny distro):
>>> > rootfs / jfs defaults,noatime 0 1
>>> >
>>> > When I look at /var/log/fsck/checkroot I see this:
>>> >
>>> > Log of fsck -C -a -t jfs /lib/init/rw/rootdev
>>> > Fri Sep 9 21:39:43 2011
>>> >
>>> > fsck 1.41.3 (12-Oct-2008)
>>> > fsck.jfs version 1.1.12, 24-Aug-2007
>>> > processing started: 9/9/2011 21.39.43
>>> > The current device is: /lib/init/rw/rootdev
>>> > Block size in bytes: 4096
>>> > Filesystem size in blocks: 475840
>>> > **Phase 0 - Replay Journal Log
>>> > Filesystem is clean.
>>> >
>>> > Fri Sep 9 21:39:44 2011
>>> > ----------------
>>> >
>>> > This makes me concerned that fsck is not actually running on th! e
>>> root file system, since there is a comment in /etc/rcS.d/
>>> S10checkroot.sh that says:
>>> >
>>> > # Does the root device in /etc/fstab match with the actual device ?
>>> > # If not we try to use the /dev/root alias device, and if that
>>> > # fails we create a temporary node in /lib/init/rw.
>>> >
>>> > Can someone tell me how to ensure that fsck is actually running
>>> on the SD card's root file system?
>>> >
>>> > Don
>>> >
>>>



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU