[plug] Filesystems

levsky at rave.iinet.net.au levsky at rave.iinet.net.au
Fri Feb 28 15:45:27 WST 2003


On Fri, Feb 28, 2003 at 03:33:12PM +0800, Daniel Pearson wrote:
> Mark,
> What about if the filesystem is mounted, is it possible? Or do you have to
> force it to do it on reboot?

You can always use the -n flag to e2fsck to stop
it from changing the filesystem, but somehow fscking
a mounted filesystem always seemed a little dodgy
to me.

Possibly an easier way is to check the Filesystem state:
flag from tune2fs output, but I'm not sure how much
use that is.

Oh - and I misunderstood your first question btw 
(again, dammit, I've got to learn to read questions
before answering them)..

tune2fs -l /dev/hda2 will show you the superblock,
and hence whether there's a journal on the disk.
Here's the output of an ext2 fs.

minerva:/home/levsky# tune2fs -l /dev/hda1
tune2fs 1.30-WIP (30-Sep-2002)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          0ca65052-d4c3-11d4-80cf-004005a30d7c
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      filetype sparse_super
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              205088
Block count:              409649
Reserved block count:     20482
Free blocks:              70993
Free inodes:              119361
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         15776
Inode blocks per group:   493
Last mount time:          Sat Dec  1 10:37:42 2001
Last write time:          Sun May 19 00:19:24 2002
Mount count:              17
Maximum mount count:      20
Last checked:             Sun Sep 16 20:52:32 2001
Check interval:           15552000 (6 months)
Next check after:         Fri Mar 15 20:52:32 2002
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128


And an ext3   --   ext3 is just an ext2 with a journal.
If you note, the ext3 filesystem has journal information
at the bottom of it.

tune2fs 1.30-WIP (30-Sep-2002)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          f24ff3fb-55ea-4a8e-8abb-0abec3ded2f6
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal filetype needs_recovery sparse_super
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              570080
Block count:              1138606
Reserved block count:     56930
Free blocks:              519166
Free inodes:              469503
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         16288
Inode blocks per group:   509
Last mount time:          Sun Feb  2 14:28:47 2003
Last write time:          Sun Feb  2 14:28:47 2003
Mount count:              3
Maximum mount count:      20
Last checked:             Sun Dec 29 20:31:33 2002
Check interval:           15552000 (6 months)
Next check after:         Fri Jun 27 20:31:33 2003
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal UUID:             <none>
Journal inode:            25
Journal device:           0x0000
First orphan inode:       345206

-- 
Old MacDonald had a form
e_i ^ e_i = 0



More information about the plug mailing list