Debian Bug report logs - #454926
e2fsprogs: get "primary superblock features different from backup at each check/reboot

version graph

Package: e2fsprogs; Maintainer for e2fsprogs is Theodore Y. Ts'o <tytso@mit.edu>; Source for e2fsprogs is src:e2fsprogs.

Reported by: giggz <giggzounet@gmail.com>

Date: Sat, 8 Dec 2007 11:30:01 UTC

Severity: normal

Found in version e2fsprogs/1.40.3-1

Fixed in version e2fsprogs/1.40.4-1

Done: tytso@mit.edu (Theodore Y. Ts'o)

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to giggz <giggzounet@gmail.com>:
New Bug report received and forwarded. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: giggz <giggzounet@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Sat, 08 Dec 2007 12:27:00 +0100
Package: e2fsprogs
Version: 1.40.3-1
Severity: normal

Hi,

Since the yesterday upgrade of e2fs* i get this message when the pc
checks my filesystem :
"primary superblock features different from backup, check forced" 
This appear on all the ext partitions that I check.

What can I do to avoid that ?
Is there a bug or is it because my system comes from woody and I
change 2 flags of my partitions by myself with tune2fs ?

Regards,
Guillaume

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.9-3 (PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages e2fsprogs depends on:
ii  e2fslibs                      1.40.3-1   ext2 filesystem libraries
ii  libblkid1                     1.40.3-1   block device id library
ii  libc6                         2.7-4      GNU C Library: Shared libraries
ii  libcomerr2                    1.40.3-1   common error description library
ii  libss2                        1.40.3-1   command-line interface parsing lib
ii  libuuid1                      1.40.3-1   universally unique id library

e2fsprogs recommends no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #10 received at 454926@bugs.debian.org (full text, mbox):

From: Theodore Tso <tytso@mit.edu>
To: giggz <giggzounet@gmail.com>, 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Sat, 8 Dec 2007 13:02:49 -0500
On Sat, Dec 08, 2007 at 12:27:00PM +0100, giggz wrote:
> Package: e2fsprogs
> Version: 1.40.3-1
> Severity: normal
> 
> Since the yesterday upgrade of e2fs* i get this message when the pc
> checks my filesystem :
> "primary superblock features different from backup, check forced" 
> This appear on all the ext partitions that I check.
> 
> What can I do to avoid that ?
> Is there a bug or is it because my system comes from woody and I
> change 2 flags of my partitions by myself with tune2fs ?

This is a one-time occurence.  In order to make the usage of the
backup superblocks more robust, we now make sure that when the primary
superblock values change, that they get backed up in the backup
superblocks.  

This become especially a problem with the usage of online resize
operations, which change the number of blocks in the filesystem in the
primary superblock, but *not* in the backup superblocks.  However, I
didn't want to just automatically backup the data to the primary
superblock to the backup superblocks, since the information in the
primary superblock could be incorrect, and you don't want to blow away
the information in the backup superblocks in that case.

Hence, in the situation where the primary and superblocks contain
different values for certain key configuration parameters for the
filesystem (i.e., the filesystmem features bitmasks, the number of
blocks and number of inodes, etc.), e2fsck forces a check, and then
once it is sure everything is clean, it will copy the changes to the
backup superblock.

So it should only do this *once*; after that, the backup superblocks
will be in synch with the primary superblock, and then you shouldn't
see that message again.

Are you seeing more than once, after a filesystem check has been
successfully completed?  If you are that's a bug, and it would be good
if you could send me the output of these two commands:

dumpe2fs -h /dev/sdXXX
	 (to print out the information of the primary superblock)

dumpe2fs -ob32768 -oB4096 -h /dev/sdXXX
	 (to print out the information of the backup superblock)

(or if you have a 1k block filesystem, replace the first two arguments
with "-ob8193 -oB1024"; and of course, replace /dev/sdXXX with the
device on which your filesystem is stored).

If you are only seeing that message once, then it's normal operation
and there is no bug.

Regards,

						- Ted




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to giggzounet <giggzounet@gmail.com>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #15 received at 454926@bugs.debian.org (full text, mbox):

From: giggzounet <giggzounet@gmail.com>
To: Theodore Tso <tytso@mit.edu>
Cc: 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Sat, 08 Dec 2007 19:33:28 +0100

Theodore Tso a écrit :
> On Sat, Dec 08, 2007 at 12:27:00PM +0100, giggz wrote:
>> Package: e2fsprogs
>> Version: 1.40.3-1
>> Severity: normal
>>
>> Since the yesterday upgrade of e2fs* i get this message when the pc
>> checks my filesystem :
>> "primary superblock features different from backup, check forced" 
>> This appear on all the ext partitions that I check.
>>
>> What can I do to avoid that ?
>> Is there a bug or is it because my system comes from woody and I
>> change 2 flags of my partitions by myself with tune2fs ?
> 
> This is a one-time occurence.  In order to make the usage of the
> backup superblocks more robust, we now make sure that when the primary
> superblock values change, that they get backed up in the backup
> superblocks.  
> 
> This become especially a problem with the usage of online resize
> operations, which change the number of blocks in the filesystem in the
> primary superblock, but *not* in the backup superblocks.  However, I
> didn't want to just automatically backup the data to the primary
> superblock to the backup superblocks, since the information in the
> primary superblock could be incorrect, and you don't want to blow away
> the information in the backup superblocks in that case.
> 
> Hence, in the situation where the primary and superblocks contain
> different values for certain key configuration parameters for the
> filesystem (i.e., the filesystmem features bitmasks, the number of
> blocks and number of inodes, etc.), e2fsck forces a check, and then
> once it is sure everything is clean, it will copy the changes to the
> backup superblock.
> 
> So it should only do this *once*; after that, the backup superblocks
> will be in synch with the primary superblock, and then you shouldn't
> see that message again.
> 

Yes after a forced check it doesn't appear anymore. But I change the
number of count with 'tune2fs -C' to force a check after a reboot and in
this case I see the message again. If I change the max count to 2 or 3,
and then I reboot several time I don't see any message again. So it is a
normal behavior.

> Are you seeing more than once, after a filesystem check has been
> successfully completed?  If you are that's a bug, and it would be good
> if you could send me the output of these two commands:
> 
> dumpe2fs -h /dev/sdXXX
> 	 (to print out the information of the primary superblock)
> 
> dumpe2fs -ob32768 -oB4096 -h /dev/sdXXX
> 	 (to print out the information of the backup superblock)
> 
> (or if you have a 1k block filesystem, replace the first two arguments
> with "-ob8193 -oB1024"; and of course, replace /dev/sdXXX with the
> device on which your filesystem is stored).

I don't give the results of these 2 command lines because (as you
explain to me) it's not a bug. So you can close the bug also.

> 
> If you are only seeing that message once, then it's normal operation
> and there is no bug.
> 
> Regards,
> 

Cheers,
Guillaume

> 						- Ted
> 




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #20 received at 454926@bugs.debian.org (full text, mbox):

From: Theodore Tso <tytso@mit.edu>
To: giggzounet <giggzounet@gmail.com>
Cc: 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Sun, 9 Dec 2007 19:36:17 -0500
On Sat, Dec 08, 2007 at 07:33:28PM +0100, giggzounet wrote:
> Yes after a forced check it doesn't appear anymore. But I change the
> number of count with 'tune2fs -C' to force a check after a reboot and in
> this case I see the message again. If I change the max count to 2 or 3,
> and then I reboot several time I don't see any message again. So it is a
> normal behavior.

Huh?  Really?   This is what I see:

<tytso.root@closure> {/home/tytso}, level 2  
541# tune2fs -C 100 /dev/sda1
tune2fs 1.40.3 (05-Dec-2007)
Setting current mount count to 100
<tytso.root@closure> {/home/tytso}, level 2  
542# e2fsck -p /dev/sda1
/dev/sda1 has been mounted 100 times without being checked, check forced.
/dev/sda1: 53/122624 files (15.1% non-contiguous), 84162/244983 blocks

You're seeing the "XXX times without being checked" message, not the
"primary superblock features different from backup superblock"
message, right?

						- Ted




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Giggz <giggzounet@gmail.com>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #25 received at 454926@bugs.debian.org (full text, mbox):

From: Giggz <giggzounet@gmail.com>
To: Theodore Tso <tytso@mit.edu>
Cc: 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Mon, 10 Dec 2007 10:14:31 +0100
Theodore Tso a écrit :
> On Sat, Dec 08, 2007 at 07:33:28PM +0100, giggzounet wrote:
>   
>> Yes after a forced check it doesn't appear anymore. But I change the
>> number of count with 'tune2fs -C' to force a check after a reboot and in
>> this case I see the message again. If I change the max count to 2 or 3,
>> and then I reboot several time I don't see any message again. So it is a
>> normal behavior.
>>     
>
> Huh?  Really?   This is what I see:
>
> <tytso.root@closure> {/home/tytso}, level 2  
> 541# tune2fs -C 100 /dev/sda1
> tune2fs 1.40.3 (05-Dec-2007)
> Setting current mount count to 100
> <tytso.root@closure> {/home/tytso}, level 2  
> 542# e2fsck -p /dev/sda1
> /dev/sda1 has been mounted 100 times without being checked, check forced.
> /dev/sda1: 53/122624 files (15.1% non-contiguous), 84162/244983 blocks
>
> You're seeing the "XXX times without being checked" message, not the
> "primary superblock features different from backup superblock"
> message, right?
>
> 						- Ted
>
>   
I'm at work. I can't test it. But if I remember correctly, when I do 
'tune2fs -C 100 /dev/hda1', then I reboot I get the "primary superblock 
features different from backup superblock" message ( :( ). Then fsck 
died with exit 1 . So in the case of root the computer reboot and I 
don't see the message again. For others partitions fsck died with error 
1 too and the boot continues. Than at next reboot I don't see anything 
again.

I will test it again at night to verify and to give you more 
informations if it is necessary.

Thx for your attention
Regards,
Guillaume




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #30 received at 454926@bugs.debian.org (full text, mbox):

From: Theodore Tso <tytso@mit.edu>
To: Giggz <giggzounet@gmail.com>
Cc: 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Mon, 10 Dec 2007 07:44:54 -0500
On Mon, Dec 10, 2007 at 10:14:31AM +0100, Giggz wrote:
> I'm at work. I can't test it. But if I remember correctly, when I do 
> 'tune2fs -C 100 /dev/hda1', then I reboot I get the "primary superblock 
> features different from backup superblock" message ( :( ). Then fsck died 
> with exit 1.

Fsck "dieing" with exit 1 is normal.  That just means that the
filesystem has been modified ("filesystem errors are corrected") and
this isn't an error condition.  Note also that the logs from the
current boot are available at /var/log/fsck/checkfs and
/var/log/fsck/checkroot.  So you can see what happened at the last reboot.

Unfortunately the init scripts are buggy here.  When fsck exits with
an exit code of 1 or 3, it shouldn't use usb the init script helper
function log_action_end_msg (since it prints a red "failed") message.
Instead they should use log_warning_msg to indicate that a full
filesystem check had happened and some non-trivial change (such
backing up the filesystem superblock) had taken place.

I've checked again, though, and both experimentally and by looking at
the sources, if the *only* change you had made was changing the mount
count via tune2fs -C, you shouldn't be seeing the change.  The only
things which will trigger a superblock backup are changes in the
superblock feature bitmaps (i.e., tune2fs -O, tune2fs -j, or tune2fs
-s), or changing the number of blocks or inodes (doing an on-line
resize), or changing the uuid (via tune2fs -U).

						 Ted




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to giggzounet <giggzounet@gmail.com>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #35 received at 454926@bugs.debian.org (full text, mbox):

From: giggzounet <giggzounet@gmail.com>
To: Theodore Tso <tytso@mit.edu>
Cc: 454926@bugs.debian.org
Subject: Re: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Mon, 10 Dec 2007 19:10:19 +0100
Hi,

Theodore Tso a écrit :
> On Mon, Dec 10, 2007 at 10:14:31AM +0100, Giggz wrote:
>> I'm at work. I can't test it. But if I remember correctly, when I do 
>> 'tune2fs -C 100 /dev/hda1', then I reboot I get the "primary superblock 
>> features different from backup superblock" message ( :( ). Then fsck died 
>> with exit 1.
> 
> Fsck "dieing" with exit 1 is normal.  That just means that the
> filesystem has been modified ("filesystem errors are corrected") and
> this isn't an error condition.  Note also that the logs from the
> current boot are available at /var/log/fsck/checkfs and
> /var/log/fsck/checkroot.  So you can see what happened at the last reboot.
> 
> Unfortunately the init scripts are buggy here.  When fsck exits with
> an exit code of 1 or 3, it shouldn't use usb the init script helper
> function log_action_end_msg (since it prints a red "failed") message.
> Instead they should use log_warning_msg to indicate that a full
> filesystem check had happened and some non-trivial change (such
> backing up the filesystem superblock) had taken place.
> 
> I've checked again, though, and both experimentally and by looking at
> the sources, if the *only* change you had made was changing the mount
> count via tune2fs -C, you shouldn't be seeing the change.  The only
> things which will trigger a superblock backup are changes in the
> superblock feature bitmaps (i.e., tune2fs -O, tune2fs -j, or tune2fs
> -s), or changing the number of blocks or inodes (doing an on-line
> resize), or changing the uuid (via tune2fs -U).
> 
> 						 Ted
> 


I'm at home and I have tested (there is a problem):

so I'm under X I do (/dev/hda6 is mounted, it's my home):
18:54 root@debian /home/giggz/Aide # tune2fs -l /dev/hda6
tune2fs 1.40.3 (05-Dec-2007)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          a514636f-6d5d-4709-8b7e-cb632bca6aa1
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal dir_index filetype needs_recovery
sparse_super
Filesystem flags:         signed directory hash
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              524288
Block count:              1024135
Reserved block count:     30724
Free blocks:              559580
Free inodes:              471505
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         16384
Inode blocks per group:   512
Filesystem created:       Mon Sep 27 19:16:54 2004
Last mount time:          Mon Dec 10 18:41:59 2007
Last write time:          Mon Dec 10 18:41:59 2007
Mount count:              9
Maximum mount count:      20
Last checked:             Sat Dec  8 19:52:47 2007
Check interval:           15552000 (6 months)
Next check after:         Thu Jun  5 20:52:47 2008
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:		  128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      ed5a0da0-92b5-41db-9616-a60f12d2fc8c
Journal backup:           inode blocks


So I change the maximum count :
18:59 root@debian /home/giggz/Aide # tune2fs -C 100 /dev/hda6
tune2fs 1.40.3 (05-Dec-2007)
Initialisation du nombre courant de montages à 100

then I do a 'tune2fs -l /dev/hda6' to verify.
18:59 root@debian /home/giggz/Aide # tune2fs -l /dev/hda6
tune2fs 1.40.3 (05-Dec-2007)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          a514636f-6d5d-4709-8b7e-cb632bca6aa1
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal dir_index filetype needs_recovery
sparse_super
Filesystem flags:         signed directory hash
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              524288
Block count:              1024135
Reserved block count:     30724
Free blocks:              559578
Free inodes:              471503
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         16384
Inode blocks per group:   512
Filesystem created:       Mon Sep 27 19:16:54 2004
Last mount time:          Mon Dec 10 18:41:59 2007
Last write time:          Mon Dec 10 18:59:14 2007
Mount count:              100
Maximum mount count:      20
Last checked:             Sat Dec  8 19:52:47 2007
Check interval:           15552000 (6 months)
Next check after:         Thu Jun  5 20:52:47 2008
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:		  128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      ed5a0da0-92b5-41db-9616-a60f12d2fc8c
Journal backup:           inode blocks

And I reboot. And I get that :
19:04 giggz@debian ~ % cat /var/log/fsck/checkfs
Log of fsck -C -V -R -A -a
Mon Dec 10 19:01:31 2007

fsck 1.40.3 (05-Dec-2007)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /home] fsck.ext3 -a -C0 /dev/hda6
/dev/hda6 primary superblock features different from backup, check forced.
/dev/hda6: 52781/524288 files (4.7% non-contiguous), 464551/1024135 blocks
[/sbin/fsck.ext3 (1) -- /donnees] fsck.ext3 -a -C0 /dev/hda4
DONNEES: clean, 6768/3071168 files, 1643181/3070423 blocks
fsck died with exit status 1

Mon Dec 10 19:01:58 2007
----------------

So there is a problem. After this, If I reboot I don't have any problem.


My system is quite old. I'm under SID since woody. Last yest I did this
changes on my partitions because I read that this flag was enabled yet
by default :
tune2fs -O dir_index /dev/hda6
fsck -fD -C0 /dev/hda6

Could this change have a relation with my problem ?

Thx a lot
Guillaume




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to "Matthias Richter" <matthias.richter@gmail.com>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #40 received at 454926@bugs.debian.org (full text, mbox):

From: "Matthias Richter" <matthias.richter@gmail.com>
To: 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Tue, 11 Dec 2007 09:08:59 +0100
Unfortunately the problem doesn't occur only once here and fsck dies
with exit code 3.
I can boot normally _once_ afterwards, but the filesystem is marked as
"needs_recovery"and on the next reboot the check will be forced again.

# diff dump_orig dump_backup
6c6
< Filesystem features:      has_journal filetype needs_recovery sparse_super
---
> Filesystem features:      has_journal filetype sparse_super
8c8
< Filesystem state:         clean
---
> Filesystem state:         not clean
24,26c24,26
< Last mount time:          Tue Dec 11 08:41:18 2007
< Last write time:          Tue Dec 11 08:41:18 2007
< Mount count:              1
---
> Last mount time:          Mon Dec 10 20:26:13 2007
> Last write time:          Tue Dec 11 08:36:17 2007
> Mount count:              0
36d35
< First orphan inode:       821409

So, obviously, something doesn't get updated here and things loop: The
check is forced, fsck dies, I boot normally once, the check is forced,
fsck dies ...

Matthias




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #45 received at 454926@bugs.debian.org (full text, mbox):

From: Theodore Tso <tytso@mit.edu>
To: Matthias Richter <matthias.richter@gmail.com>, 454926@bugs.debian.org
Subject: Re: Bug#454926: e2fsprogs: get "primary superblock features different from backup at each check/reboot
Date: Tue, 11 Dec 2007 08:40:29 -0500
On Tue, Dec 11, 2007 at 09:08:59AM +0100, Matthias Richter wrote:
> Unfortunately the problem doesn't occur only once here and fsck dies
> with exit code 3.

Exit code 3 is normal.  Read the man page; that just means that the
filesystem was modified and it was the root filesystem, so the system
should reboot.  So that part is OK....

> I can boot normally _once_ afterwards, but the filesystem is marked as
> "needs_recovery"and on the next reboot the check will be forced again.

Ah, OK.  So you're not doing a clean shutdown (hence the "heeds
recovery") and that's confusing e2fsck into thinking it needs to do a
full check so it can backup the superblock.  Oops.  That's a bug.
I'll take a look at it, and get a fix out quickly.

					- Ted




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Alun <auj@aber.ac.uk>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #50 received at 454926@bugs.debian.org (full text, mbox):

From: Alun <auj@aber.ac.uk>
To: 454926@bugs.debian.org
Subject: How to reproduce the problem...
Date: Wed, 12 Dec 2007 12:35:58 +0000
Hi,

I just came across this bug report after googling for the same error 
message. I am trying to do "online" fsck using dm-snapshot. The procedure
is:

take a snapshot of a live filesystem
"e2fsck -fn" the snapshot
if the fsck reports clean then "tune2fs -C0 -Tnow" the live filesystem.

When I do this, the next time I try to fsck the original filesystem
(offline) I get the error message.

In the past I've never had problems running tune2fs on live filesystems,
but it seems that the new checks don't like it. It looks like 
tune2fs is only modifying the first superblock, which sounds wrong to
me.

Cheers,
Alun.

-- 
Alun Jones                       auj@aber.ac.uk
Systems Support,                 (01970) 62 2494
Information Services,
University of Wales, Aberystwyth




Information forwarded to debian-bugs-dist@lists.debian.org, tytso@mit.edu (Theodore Y. Ts'o):
Bug#454926; Package e2fsprogs. Full text and rfc822 format available.

Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to tytso@mit.edu (Theodore Y. Ts'o). Full text and rfc822 format available.

Message #55 received at 454926@bugs.debian.org (full text, mbox):

From: Theodore Tso <tytso@mit.edu>
To: Alun <auj@aber.ac.uk>, 454926@bugs.debian.org
Cc: Matthias Richter <matthias.richter@gmail.com>, giggzounet <giggzounet@gmail.com>
Subject: Re: Bug#454926: How to reproduce the problem...
Date: Sat, 15 Dec 2007 20:47:40 -0500
tags 454926 +pending
thanks

On Wed, Dec 12, 2007 at 12:35:58PM +0000, Alun wrote:
> In the past I've never had problems running tune2fs on live filesystems,
> but it seems that the new checks don't like it. It looks like 
> tune2fs is only modifying the first superblock, which sounds wrong to
> me.

Actually tune2fs was modifying all of the superblocks, but the problem
was it was writing the NEEDS_RECOVERY (which is treated as an incompat
feature flag) to all of the superblocks, since the filesystem was
mounted at the time.  Later on, the NEEDS_RECOVERY flag is getting
cleared when the filesystem cleanly unmounted, or when the journal is
replayed.  But then the primary superblock's feature set looks
different from the backup's, and this triggers e2fsck to do a full
backup followed the superblock backup.

The fix is to never write out the NEEDS_RECOVERY flag to the backup
superblock.

						- Ted

commit 9a083af71a2388ae47252f8af2b796f9055f4af7
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Sat Dec 15 19:39:37 2007 -0500

    ext2fs_flushfs: Remove the NEEDS_RECOVERY from the backup superblocks
    
    Now that e2fsck tries to backup the primary superblock to the backups
    when the feature sets ar different, it's important when tune2fs writes
    out a changed superblock, that we filter out the
    EXT3_FEATURE_INCOMPAT_RECOVER feature to the backup superblocks, since
    it will be removed from the primary superblock either when the
    filesystem is mounted uncleanly or when journal is replayed.
    
    Addresses-Debian-Bug: #454926
    
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index f3fe533..88c515a 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -208,6 +208,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
 	dgrp_t		i,j;
 	errcode_t	retval;
 	unsigned long	fs_state;
+	__u32		feature_incompat;
 	struct ext2_super_block *super_shadow = 0;
 	struct ext2_group_desc *group_shadow = 0;
 	struct ext2_group_desc *s, *t;
@@ -217,6 +218,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
 	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
 
 	fs_state = fs->super->s_state;
+	feature_incompat = fs->super->s_feature_incompat;
 
 	fs->super->s_wtime = fs->now ? fs->now : time(NULL);
 	fs->super->s_block_group_nr = 0;
@@ -254,6 +256,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
 	 * we write out the backup superblocks.)
 	 */
 	fs->super->s_state &= ~EXT2_VALID_FS;
+	fs->super->s_feature_incompat &= ~EXT3_FEATURE_INCOMPAT_RECOVER;
 #ifdef EXT2FS_ENABLE_SWAPFS
 	if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
 		*super_shadow = *fs->super;
@@ -332,6 +335,7 @@ write_primary_superblock_only:
 
 	fs->super->s_block_group_nr = 0;
 	fs->super->s_state = fs_state;
+	fs->super->s_feature_incompat = feature_incompat;
 #ifdef EXT2FS_ENABLE_SWAPFS
 	if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
 		*super_shadow = *fs->super;




Tags added: pending Request was from "Theodore Ts'o" <tytso@mit.edu> to control@bugs.debian.org. (Tue, 01 Jan 2008 04:42:01 GMT) Full text and rfc822 format available.

Reply sent to tytso@mit.edu (Theodore Y. Ts'o):
You have taken responsibility. Full text and rfc822 format available.

Notification sent to giggz <giggzounet@gmail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #62 received at 454926-close@bugs.debian.org (full text, mbox):

From: tytso@mit.edu (Theodore Y. Ts'o)
To: 454926-close@bugs.debian.org
Subject: Bug#454926: fixed in e2fsprogs 1.40.4-1
Date: Sat, 05 Jan 2008 17:35:00 +0000
Source: e2fsprogs
Source-Version: 1.40.4-1

We believe that the bug you reported is fixed in the latest version of
e2fsprogs, which is due to be installed in the Debian FTP archive:

comerr-dev_2.1-1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/comerr-dev_2.1-1.40.4-1_i386.deb
e2fsck-static_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/e2fsck-static_1.40.4-1_i386.deb
e2fslibs-dev_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/e2fslibs-dev_1.40.4-1_i386.deb
e2fslibs_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/e2fslibs_1.40.4-1_i386.deb
e2fsprogs-udeb_1.40.4-1_i386.udeb
  to pool/main/e/e2fsprogs/e2fsprogs-udeb_1.40.4-1_i386.udeb
e2fsprogs_1.40.4-1.diff.gz
  to pool/main/e/e2fsprogs/e2fsprogs_1.40.4-1.diff.gz
e2fsprogs_1.40.4-1.dsc
  to pool/main/e/e2fsprogs/e2fsprogs_1.40.4-1.dsc
e2fsprogs_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/e2fsprogs_1.40.4-1_i386.deb
e2fsprogs_1.40.4.orig.tar.gz
  to pool/main/e/e2fsprogs/e2fsprogs_1.40.4.orig.tar.gz
libblkid-dev_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/libblkid-dev_1.40.4-1_i386.deb
libblkid1-udeb_1.40.4-1_i386.udeb
  to pool/main/e/e2fsprogs/libblkid1-udeb_1.40.4-1_i386.udeb
libblkid1_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/libblkid1_1.40.4-1_i386.deb
libcomerr2_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/libcomerr2_1.40.4-1_i386.deb
libss2_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/libss2_1.40.4-1_i386.deb
libuuid1-udeb_1.40.4-1_i386.udeb
  to pool/main/e/e2fsprogs/libuuid1-udeb_1.40.4-1_i386.udeb
libuuid1_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/libuuid1_1.40.4-1_i386.deb
ss-dev_2.0-1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/ss-dev_2.0-1.40.4-1_i386.deb
uuid-dev_1.2-1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/uuid-dev_1.2-1.40.4-1_i386.deb
uuid-runtime_1.40.4-1_i386.deb
  to pool/main/e/e2fsprogs/uuid-runtime_1.40.4-1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 454926@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Theodore Y. Ts'o <tytso@mit.edu> (supplier of updated e2fsprogs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 31 Dec 2007 22:40:42 -0500
Source: e2fsprogs
Binary: e2fslibs-dev libblkid1-udeb libblkid1 comerr-dev libuuid1 ss-dev uuid-runtime uuid-dev e2fslibs e2fsck-static e2fsprogs-udeb libuuid1-udeb e2fsprogs libblkid-dev libcomerr2 libss2
Architecture: source i386
Version: 1.40.4-1
Distribution: unstable
Urgency: low
Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
Changed-By: Theodore Y. Ts'o <tytso@mit.edu>
Description: 
 comerr-dev - common error description library - headers and static libraries
 e2fsck-static - statically-linked version of the ext2 filesystem checker
 e2fslibs   - ext2 filesystem libraries
 e2fslibs-dev - ext2 filesystem libraries - headers and static libraries
 e2fsprogs  - ext2 file system utilities and libraries
 e2fsprogs-udeb - stripped-down versions of e2fsprogs, for debian-installer
 e2fsprogs-udeb - stripped-down versions of e2fsprogs, for debian-installer (udeb)
 libblkid-dev - block device id library - headers and static libraries
 libblkid1  - block device id library
 libblkid1-udeb - block device id library
 libblkid1-udeb - block device id library (udeb)
 libcomerr2 - common error description library
 libss2     - command-line interface parsing library
 libuuid1   - universally unique id library
 libuuid1-udeb - universally unique id library
 libuuid1-udeb - universally unique id library (udeb)
 ss-dev     - command-line interface parsing library - headers and static libra
 uuid-dev   - universally unique id library - headers and static libraries
 uuid-runtime - universally unique id library
Closes: 437720 441872 444883 451172 454926 458017
Changes: 
 e2fsprogs (1.40.4-1) unstable; urgency=low
 .
   * Make sure that programs like tune2fs, when modifying a mounted
       filesystem do not write the backup superblocks with the
       NEEDS_RECOVERY flag, to avoid e2fsck from needlessly forcing a
       full fsck because it thinks the feature flags need to be backed up
       from the master to the backup superblocks.  (Closes: #454926)
   * Improve time-based UUID generation to guarantee uniqueness even when
       UUID's are being generated at very high rates on SMP systems.  To
       do this we use an optional setuid helper daemon (uuidd) which is
       started by libuuid when it is needed.  The uuidd daemon is
       packaged in the (new) uuid-runtime package, which now also includes
       the uuidgen program (which had been previously been included as
       part of the e2fsprogs package).
   * Fix fsck to only treat '#' characters at the beginning of /etc/fstab
       lines as starting a comment.  This avoids spurious warnings printed
       for filesystems such as fuse that often use '#' as part of the
       filesystem specifier (i.e., wdfs#https://dav.hoster.com/foo).
   * Enhance the blkid program to pretty-print control and meta
       characters to avoid garbage filesystem labels from screwing up the
       user's terminal
   * Fix potential integer overflows passed to malloc() in resize2fs
   * Update Dutch, Polish, and Vietnamese translations from the
       Translation Project.  Remove the Rwandan translation upon advice
       of the Translation Project.
   * Fix cross-compilation support for non-Linux architectures
         (Closes: #451172, #437720)
   * Clarified and improved man pages (Closes: #444883, #441872)
   * Fix potential divide by zero error when libblkid tried probing an
       invalid FAT filesystem.
   * Make error_message() in libcom_err DTRT when when a 64-bit sign-extended
       error code is passed to it.
   * Build the e2fsck-static package so that e2fsck.static will not use
       TLS and hence will run correctly on back-level Debian systems
       using a 2.4 Linux kernel.  (Closes: #458017)
Files: 
 330cdeb515e88f9d8e05e639e14305c0 1037 admin required e2fsprogs_1.40.4-1.dsc
 124d744bdf9d443591eb8193c085944b 4048867 admin required e2fsprogs_1.40.4.orig.tar.gz
 b450d294313d75c1853a2b85e4e18a0e 459 admin required e2fsprogs_1.40.4-1.diff.gz
 77c711280798240883988c50e4ccc54e 159554 admin optional e2fsck-static_1.40.4-1_i386.deb
 60185417a684a7ff014f480bfecf6989 34998 libs required libcomerr2_1.40.4-1_i386.deb
 6614f6925491647f453696fa378003ef 40404 libs required libss2_1.40.4-1_i386.deb
 5f9d7d1dbc47153cecbe7444b4090b7a 38570 libs required libuuid1_1.40.4-1_i386.deb
 00a28aac2e89b40afca5c4ab1f9913c4 41724 libs optional uuid-runtime_1.40.4-1_i386.deb
 625e681b1d94c9d02bcde1ad883f6834 48178 libs required libblkid1_1.40.4-1_i386.deb
 b1f3a061c633d9de66a12bb7d478cee5 21400 libdevel extra libblkid-dev_1.40.4-1_i386.deb
 be75abd0c652ca0066bbbf64d68438ab 107350 libs required e2fslibs_1.40.4-1_i386.deb
 1de92ddb4246dfcf2c4a9c38196596c4 151944 libdevel extra e2fslibs-dev_1.40.4-1_i386.deb
 ba97d196ab00557a2c0d9bb1055a1257 622288 admin required e2fsprogs_1.40.4-1_i386.deb
 3643fd569a34a1f96e024ab8f4461be2 41498 libdevel extra comerr-dev_2.1-1.40.4-1_i386.deb
 9af72d3565943c7d87815772ecba939d 16812 libdevel extra ss-dev_2.0-1.40.4-1_i386.deb
 8439bee47995adcb9c9c90671be3df8c 53230 libdevel extra uuid-dev_1.2-1.40.4-1_i386.deb
 4ea93f98cd7c69c1eb2ff58fbe16a709 179896 debian-installer optional e2fsprogs-udeb_1.40.4-1_i386.udeb
 c5bab3bf3dc033b627086fd927092f24 15540 debian-installer optional libblkid1-udeb_1.40.4-1_i386.udeb
 c16c8297e671f50b51a0cab8047e1b5e 6120 debian-installer optional libuuid1-udeb_1.40.4-1_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHeere7To545NnTEARAsOxAKD12HZ0FREHcmrzw3fFx/L9r1/CogCeNlPH
sUDLGcZ6ty2VNrjLapevOKI=
=jtWF
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 14 Aug 2008 07:27:50 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 08:46:27 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.