linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: linux-nilfs@vger.kernel.org
Subject: Creating up a snapshot and mounting after filesystem error on NILFS2
Date: Sat, 4 May 2024 13:57:35 +0200	[thread overview]
Message-ID: <CAJUT6o6xhy+o=iiWv-h-8UeVx1WCvEmu2NVAb3X6xTvQt8XKBQ@mail.gmail.com> (raw)

A forced reboot left filesystem in inconsistent state (possibly
consumer grade SSD issue). It would mount r/w but exhibited runtime
errors: some recently modified were malformed; attempted writes were
rejected:
>NILFS (sdb2): vblocknr = 101945318 has abnormal lifetime: start cno (= 534472) > current cno (= 534431)
>NILFS error (device sdb2): nilfs_bmap_propagate: broken bmap (inode number=4)
>Remounting filesystem read-only

I tried creating a snapshot from recent checkpoint to read recent good
verison of files, but that was also rejected with the above error
message, and the snapshot reverted to checkpoint upon subsequent
mount. Turns out there's a short (~5 seconds) window after "chcp ss
..." when the snapshot can be mounted - about 5 seconds, before the fs
driver attempts to create a new checkpoint, ending up in error
condition.

$ umount /dev/sdb2; mount /dev/sdb2 /mnt/test # to clear out error condition
$ chcp ss /dev/sdb2 534430; mount /dev/sdb2 -o ro,cp=534430
/mnt/recover # set up snapshot and immediately mount

Hope this helps somebody, maybe even me, in the future.

Thanks,
--
dx

                 reply	other threads:[~2024-05-04 11:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJUT6o6xhy+o=iiWv-h-8UeVx1WCvEmu2NVAb3X6xTvQt8XKBQ@mail.gmail.com' \
    --to=dexen.devries@gmail.com \
    --cc=linux-nilfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).