-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Btrfs partitions with problem while using, Help! #670
Comments
Believe it or not. To recover BTRFS you can simple recreate the partition (best done under Linux usbpen) and your files should for the most part be there. There is no need to go through recovery processes which rarely work. You may still need to scrub and check the recovered partition afterwards however, but yeah, if you loose a btrfs partition, just manually recreate it, should work most times. |
Hello to Jarrard, Can you please elaborate on what I'd need to do to simply remake a btrfs partition? |
@mattw-webcv, I doubt that deleting + recreating partition somehow would touch the FS state. Recreating the partition is only helpful if the original one is gone. Have you tried steps from If not, you should probably present the actual error output from Fedora. |
Basically just delete the old one and create a new one of same size in location and it should still be there but it may not fix the FS state as sskras mentioned. I use either gnome-disk-utility or gparted. |
Hi, I'm sorry but I'm running in a live session and didn't think to take screenshots. If I knew how to post this as its' own issue, I'd do that for everyones' convenience. Summary: The short story is I didn't realise winbtrfs changed the partition info, making the drive show up as ntfs. gnome disks will let me delete the partition through a format, but I'm not convinced I want that. |
I think there is a command to mount a drive via force even with bad superblocks but I forgot how. |
In order to erase any partition, gparted also wants to format the drive too. I looked for ways to force things to mount, but I couldn't find it. |
well quick formatting shouldn't erase the data but if that is your only choice left then I dunno. There are also probably partition inspection tools that let you grab the data. Welcome to the world of BTRFS btw. Isn't it fun! |
Thanks... Empty btrfs partition. |
@mattw-webcv commented 2 hours ago:
IMO, using
Thanks for the relevant part. Writing NTFS data into Btrfs partition sounds pretty rude. This could make up a separate issue. Not sure if it's the issue of Winbtrfs itself, maybe it's issue in the Windows kernel / NTFS driver. @mattw-webcv, would you be able to reproduce that, eg. in a virtual machine? (Given enough time) |
gparted also uses mkfs.btrfs, so I had no hope. I think now I've just given up on it. I'd like to try and recover data, but I have no familiarity with how to, and all the solutions haven't been painless and smooth and intuitive for me. I could 'in theory' reproduce in VM, but the way my system is configured, I run separate drives. |
@mattw-webcv If it already did a whole-device TRIM and it's an SSD, your data is likely gone. If not, you could try Testdisk to recover data. Good luck! |
(I wanted to fork that into a separate discussion, but since Discussions are not enabled on this repo, I am continuing here) <offtopic>
@mattw-webcv commented yesterday:
... but why TRIM ?! :)
Well, at least it's another useful skill in data-recovery that you learned during that incident:
And I think of another one:
Especially when the
I just used NTFS (with the NTFS-3g driver) in past. But exFAT is probably a good match too: Especially now that it went into the Linux kernel in 2020, and even right after merging proved to be fast enough: Then 3 years later it got even faster: Only if getting more fragmentation than NTFS and longer file system checks after crashes... <End of brainstorming />
During the data recovery I discourage the use of GUI tools on Linux. On Windows they might be the only, a traditional way. But on Linux they tend to conceal a lot of important details. That's from my experience.. It requires a lot of effort to create a bulletproof and a fool-proof GUI. So "GUIs are the last measure" to me. @mattw-webcv, may you at least tell the area of your research for the interested readers, please? :) |
@lesderid commented 2 hours ago:
Good to know TestDisk added the support on Jun 27, 2012: cgsecurity/testdisk@d13df23 |
This is a demanding and awesome project, great and useful, I think.
And I've met some problems, after I installed the drivers.
Env:
The hard disk drive, ST3000NM0033(CMR).
Its part table includes two btrfs partitions, Medium_Btrfs(650GB in Linux) and Lagging_Btrfs(568GB in Linux).(No btrfs part is in other disks.)
I've created these in Debian11 with KDE partition tool.(In my mind, but maybe wrong.)
I've used, Windows(11 22631 22000, 10 19045[in most] 17763[not less before], 8.1[sometimes], 7) and Debian(11 and 12, only stable).
(I use zh-cn, Simplified Chinese in system. So maybe some words in files you can't understand.)
These are problems I've met all about:
(If you like one problem per one issue, I can alt.)
I've used btrfs scrub, last year in Debian11. Then, I restart computer to Windows 10, but Medium_Btrfs isn't able to access anymore. I tried to save it, but failed. Below, there is all archives I can found (I saved before). (Another btrfs part, was without any changed, as normal.)(Driver I've used is WinBtrfs 1.8.2 .)
(I really never had thought, a part can leave me in a moment.)
(Run btrfs scrub -- restart computer to Windows 10 -- final)(So I deduce that at most only a small amount of data has been modified. The data of the part should be safe.)
The result of scrub ran: 检查btrfs分区(显式输出)--20231112.txt
Scan the disk with Victoria (Scan for bad track of Disk)(After this event, on 2024-05-11): 扫描ST3000NM0033-结果一个警告-20240511.txt
Ran btrfs check for it: btrfs-20231113.txt
(And one more, information mixes with another, in below.)
(Lagging_Btrfs went been read only.) (In my memory)
I used uTorrent portable 3.5, downloaded files to Lagging_Btrfs. It has free space.(In my memory, I checked for this several times, in btrfs tab of its attribute.) But it was not able to been writable. I've solved this, by used btrfs check --init-extent-tree. (And it ran in two to three days.)
(A few free space of the part -- download and download -- suddenly the part went only readable)
(Lagging_Btrfs went not readable.)
(I've updated WinBtrfs driver version to 1.9 before this.) I installed Windows 8.1 in a VHDX, I wanted to do something awesome. I've found "balance" in btrfs tab of attribute of Lagging_Btrfs. I tried to make it start (balance).(For metadata and system, exclude data.) But, there was something wrong appeard.(Explorer, It lost its response, it should be.) I restated computer, to Windows10, to Debian12, but Lagging_Btrfs was not readable. I've tried all btrfs tools, in documents on Internet I've found. Oh no.(There was a few free space in Lagging_Btrfs. )
(If I can accept losing balance effect, can I fix it?)
(Start Balance for the part, start for metadata and system, exclude data, and only a few free space in the part.-- The part became not readable or mountable.)
There are for files of information for it, most by btrfs tools in Debian 12:
btrfs check _dev_sda14--Lagging_Btrfs---20240330.txt
btrfs insp dump-t -b xxx --fllow dev_sda14 --202404.txt
btrfs-find-root _dev_sda14--Lagging_Btrfs---20240405.txt
(This is hexdump for RAW data of two btrfs part:) hexdump_btrfs_part-202404.txt
At last, can you help to me fix two parts?
I wonder at least, the directory structure of Medium_Btrfs (Because there is much software in it. Many files of software can be looked for one more time, but how much software I want to know.),
to fix Lagging_Btrfs to readable and writable (Can I use sudo btrfs check --tree-root 366176223232 --repair /dev/sda14 to fix?) .
@maharmstone
If you must help each other. I've made a tip for Readme to stop btrfs driver loading while Windows starting. (To prevent BSOD, if there is Btrfs part failed to mount.) I will pull a request soon.
And, I've translate Readme to Chinese partly before. I'll translate done when I can allocate enough time for it. (I can just use Chinese and English, and I don't have friends in translate group. But I can make a post in digital forum. Have you thought of translate Readme to other languages?)
Thanks for replies.
These things before, are really bad things for me, in my memory. So, I make the issue until today.
The text was updated successfully, but these errors were encountered: