All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: John Kehayias <john.kehayias@protonmail.com>
Cc: "Linux-f2fs-devel@lists.sourceforge.net"
	<Linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] How to recover from "Wrong valid_user_blocks"?
Date: Fri, 12 Aug 2022 11:13:20 -0700	[thread overview]
Message-ID: <YvaYQI4/ZJgOW6sb@google.com> (raw)
In-Reply-To: <FzLKsvvLk49Fv4JSwZzQkszOSWRKa1nO9bzhwRApQHDtjmz-qYPvdMHOA2KQa1sMod4oFZfYHXE-WSokABljrpT_9UY6pD6NzY5rVGAoGLQ=@protonmail.com>

On 08/12, John Kehayias via Linux-f2fs-devel wrote:
> Hello again,
> 
> As this is the main disk for a homeserver, I was anxious to get it working again. After reading about what seemed like the same exact problem here: https://old.reddit.com/r/linuxquestions/comments/whomdc/expanded_f2fs_cant_mount/ I thought using a newer f2fs-tools would help (I think I ended up with latest git commit). As I reported earlier though, resize won't do anything (already resized). So I thought about shrinking, though it might be risky.
> 
> First, I tested with a disk image, made with dd and mounted with sudo udisksctl loop-setup -f disk.img. Then I could operate on the loop device with that partition, /dev/loop0p2 in my case. So I tried shrinking, bolstered by the good experiences reported in https://www.mail-archive.com/linux-f2fs-devel@lists.sourceforge.net/msg23214.html Since the size was something like twice the data on it, I didn't worry too much about how much smaller I made it. That was then mountable! So I resized back to the full size, and that still worked. Bonus: working on the disk image was much faster on my SSD than the original memory card.
> 
> I made another fresh image for backup and then repeated these steps on the actual disk (memory card): resize.f2fs to shrink slightly (with -t <some sector amount less than max>) and then resize it fully. Everything worked!
> 
> I have logs of the resizes and fscks happy to share though I know this has been reported and seems fixed in current versions.

Ah, so the recent f2fs-tools addressed your problem, right?

> 
> John
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2022-08-12 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  4:12 [f2fs-dev] How to recover from "Wrong valid_user_blocks"? John Kehayias via Linux-f2fs-devel
2022-08-12  6:27 ` John Kehayias via Linux-f2fs-devel
2022-08-12 18:13   ` Jaegeuk Kim [this message]
2022-08-18 20:55     ` John Kehayias via Linux-f2fs-devel
2022-08-12 18:09 ` Jaegeuk Kim

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=YvaYQI4/ZJgOW6sb@google.com \
    --to=jaegeuk@kernel.org \
    --cc=Linux-f2fs-devel@lists.sourceforge.net \
    --cc=john.kehayias@protonmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.