On 4/10/25 15:08, Juhyung Park wrote:
> On Thu, Apr 10, 2025 at 12:00 AM Chao Yu <c...@kernel.org> wrote:
>>
>> On 4/10/25 13:57, Juhyung Park wrote:
>>> Hi Chao,
>>>
>>> On Wed, Apr 9, 2025 at 10:52 PM Chao Yu <c...@kernel.org> wrote:
>>>>
>>>> On 4/6/25 16:30, Juhyung Park wrote:
>>>>> Hi all,
>>>>>
>>>>> I also encountered something similar a while back with resizing but
>>>>> didn't report it and just manually migrated the files.
>>>>
>>>> Hi Juhyung,
>>>>
>>>> Did you develop an individual tool to migrate specified inode to target
>>>> block address?
>>>
>>> Nope. And neither did @uplinkr use any custom tools to mess around the
>>> f2fs partition.
>>
>> Oh, so how did you migrate files manually?
> 
> You remember the extended node bitmap fiasco :)

Oh, yes, luckily, you reported that bug so quickly, so that we can fix
that in time, thank you!

> After that, whenever I run fsck (or in this case, resize), I wrap the
> entire raw block device to a dm-snapshot so that original stays intact
> and run if on top of the dm, so that I don't run into corner cases.

I think it's a good habit to always make important data being backuped.

> 
> When I was migrating my personal f2fs setup to another SSD, I had
> similar resize/fsck warnings/errors. (I should've reported this back
> then, sorry.)

Alright, anyway, I'd like to say please feel free to report any bugs of
f2fs you encounter later, will be appreciate for that. :)

> So I decided to just rsync the whole partition after mounting it and
> migrate under VFS and not risk the potential corner case.
> 
> So for my case, it was before the damage was done (with dm-snapshot)
> unlike @uplinkr.

Okay, got it, thanks for the details.

Thanks,

> 
>>
>>>
>>>>
>>>>> I assisted him to ensure using the latest kernel/f2fs-tools, but his
>>>>> metadata seems pretty bad right now and I suggested him to ask the
>>>>> mailing list directly.
>>>>
>>>> I checked the log, I guess it actually seems pretty bad... I guess we
>>>> need to find out those file which has not been migrated correctly, and
>>>> try to correct them, may be w/ a new tool.
>>>
>>> Yeah, having fsck.f2fs segfault mid-way post resize won't help either.
>>>
>>>>
>>>> To Jaegeuk, any thoughts about this problem?
>>>>
>>>>>
>>>>> The URL there should be https://arter97.com/.f2fs-20250406/fsck.log ,
>>>>> a little typo there.
>>>>
>>>> Thanks, I didn't notice this previously.
>>>>
>>>>>
>>>>> Can we have some sort of CI/automated testing for the resizing as well?
>>>>
>>>> Agreed, will work on some testcases for resize.f2fs when I get some free
>>>> slots.
>>>
>>> Should we mark this experimental for the time being?
>>
>> Agreed.
>>
>> Thanks,
>>
>>>
>>> Thanks.
>>>
>>>>
>>>> Thanks,
>>>>
>>>>>
>>>>> Thanks.
>>>>>
>>>>> On Sun, Apr 6, 2025 at 1:26 AM uplinkr--- via Linux-f2fs-devel
>>>>> <linux-f2fs-devel@lists.sourceforge.net> wrote:
>>>>>>
>>>>>> Hello everyone,
>>>>>>
>>>>>> I am having trouble with F2FS. Specifically, I believe metadata got
>>>>>> corrupted when I resized it. I have a 512 GB drive. My F2FS partition
>>>>>> was approximately located on 369-497 GB (128 GB size). Using GParted, I
>>>>>> resized it to 0.5-497 GB. While the partition resizing went through
>>>>>> successfully, filesystem resizing initially failed with "Mount unclean
>>>>>> image to replay log". I have done that and retried resizing.
>>>>>>
>>>>>> Afterwards, however, fsck started giving out a lot of errors, at one
>>>>>> point it asked if I wished to restore lost data, which I agreed to. Logs
>>>>>> specified a lot of my files (which I could tell by filenames) and
>>>>>> mid-way through the process, it segfaulted. Now, when I run fsck, no
>>>>>> files are asked to be restored, and it completes successfully. However,
>>>>>> when I attempt to mount it, I get an error saying "Structure needs
>>>>>> cleaning".
>>>>>>
>>>>>> Could someone help me restore my metadata (at least, long enough to
>>>>>> extract my files)? Thanks.
>>>>>>
>>>>>> dmesg logs:
>>>>>>
>>>>>> [   96.184127] F2FS-fs (nvme0n1p5): Mismatch valid blocks 769 vs. 68
>>>>>> [   96.188050] F2FS-fs (nvme0n1p5): Failed to initialize F2FS segment
>>>>>> manager (-117)
>>>>>>
>>>>>> fsck.f2fs --dry-run -d 3 logs: https://arter.com/.f2fs-20250406/fsck.log
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>
>>



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

Reply via email to