LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   The file system F2FS is broken (https://www.linuxquestions.org/questions/linux-newbie-8/the-file-system-f2fs-is-broken-4175666043/)

ForumLiker 12-16-2019 05:42 AM

The file system F2FS is broken
 
Hello everybody. There was a need to create a swap. There was no free partition, so I decided to create a swap in the file. I did everything according to the instructions https://wiki.archlinux.org/index.php/Swap As a result, it was done:
Code:

dd if=/dev/zero of=/swapfile bs=1M count=4096
chmod 600 /swapfile
mkswap /swapfile
swapon --discard /swapfile

Also added an entry to fstab. swap immediately determined. After a couple of minutes of work, the kde plasma crash. I tried to turn off / restart the PC through the terminal, to which I received that the argument of any of the commands is incorrect. Made a hard reset. After starting the PC I get:
Code:

...
:: Loading keymap...done
:: mounting '/dev/sdb2' on real root
[ 3.279565] F2FS-fs (sbd2): Can't find valid F2FS filesystem in 2th superblock
[ 3.299279] F2FS-fs (sbd2): SIT is corrupted node# 174191 vs 586513
[ 3.299312] F2FS-fs (sbd2): Failed to initialize F2FS segment manager (-117)
mount: /new_root: mount(2) system call failed: Structure needs cleaning.
...
[rootfs ]#_

I tried to run fsck.f2fs /dev/sdb2 through the Linux Mint live mode. What did I get a huge list of damaged blocks for, after which I asked whether to restore files from ./lost_find? Answered Yes. As a result, the recovery failed. I hope there is an opportunity to save my FS.
upd: When asked whether to restore files, answered no, after asking whether to restore the partition - answered yes, then asked whether to restore files - answered no. Posted by Done. The partition is still not mounted, but at startup it now writes:
Code:

...
[ 3.277440] F2FS-fs (sbd2): Can't find valid F2FS filesystem in 2th superblock
[ 3.370489] F2FS-fs (sbd2): Failed to read root inode
....


berndbausch 12-17-2019 06:46 PM

Swapping to a NAND card is a bad idea. It seems obvious that you broke your filesystem beyond repair.

If there is no backup, I would use something like photorec to recover whatever useful data can be found on the card, throw the card away and reinstall the system on a new one. If your computer requires swapping, use an external disk or a computer with more RAM.

My story: My file server used to run regular Centos 6 from a USB key. It took about a year to break similarly to yours. Now I use an old spinning laptop disk I had lying around. No issues for years.

syg00 12-18-2019 02:04 AM

Looks like only (very) recently has f2fs supported native swap. As in 5.3 kernels.

If your data isn't worth backing up prior to you messing around, it isn't worth anything.

ForumLiker 12-18-2019 02:20 AM

Thanks for answers. testdisk destroyed all partitions of the disk, because it does not understand f2fs. reinstalled the system on a new one on btrfs with support for creating snapshots


All times are GMT -5. The time now is 03:15 PM.