LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-19-2022, 01:58 PM   #1
fkwilczek
LQ Newbie
 
Registered: Jan 2022
Distribution: Fedora
Posts: 9

Rep: Reputation: 1
Broken drive partitions after resize and move with kde partition manager


I broke my btrfs partition after moving and resizing it with kde partition manager. I tried to move my partition and shrink it. This process was uninterrupted. I tried fixing partitions using testdisk but it failed.

Code:
Disk /dev/nvme0n1 - 2000 GB / 1863 GiB - CHS 1907729 64 32

The harddisk (2000 GB / 1863 GiB) seems too small! (< 2167 GB / 2019 GiB)
Check the harddisk size: HD jumper settings, BIOS detection...

The following partition can't be recovered:
     Partition               Start        End    Size in sectors
>  Linux filesys. data    330485632 4234186623 3903700992 [fedora_localhost-live]

[ Continue ]
btrfs blocksize=4096 Backup superblock, 1998 GB / 1861 GiB
Repairing by using btrfs also failed.
However when i tried using photorec i was able to recover uncorrupted files.
Is it possible to recover my btrfs partition?

lsblk command:
Code:
[root@localhost-live liveuser]# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0   2.1G  1 loop 
loop1         7:1    0   7.3G  1 loop 
├─live-rw   253:0    0   7.3G  0 dm   /
└─live-base 253:1    0   7.3G  1 dm   
loop2         7:2    0    32G  0 loop 
└─live-rw   253:0    0   7.3G  0 dm   /
sda           8:0    1   7.6G  0 disk 
├─sda1        8:1    1   2.2G  0 part /run/initramfs/live
├─sda2        8:2    1   9.9M  0 part 
└─sda3        8:3    1   300K  0 part 
zram0       252:0    0     8G  0 disk [SWAP]
nvme0n1     259:0    0   1.8T  0 disk 
└─nvme0n1p3 259:4    0   1.8T  0 part 
nvme1n1     259:2    0 476.9G  0 disk 
└─nvme1n1p1 259:1    0 476.9G  0 part /run/media/liveuser/7b9cdf1f-7d32-477e-bb6a-0aaffbde72b3
 
Old 12-19-2022, 06:47 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,817
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Quote:
Originally Posted by fkwilczek View Post
Is it possible to recover my btrfs partition?
I seriously doubt it. Managing BTRFS's multiple devices requires unique care. Did you read any instructions before opening the KDE partitioner? Try reading these and see what you think.
 
Old 12-19-2022, 08:13 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I too would vote no (without having tried). I'm surprised something as mature as KDE would let you even try.

I have long been a proponent of btrfs, but I never use it for my root filesystem - I manage backup/restore for that myself. For data, I find snapshot irreplacable.
 
Old 12-19-2022, 08:38 PM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
BTRFS is not nearly as mature as most other file systems used on linux. Most users are not familiar with management and tools that work well on other file systems often work poorly or not at all with btrfs.

As stated above, I still use LVM and EXT4 for my file systems since that technology is mature and stable. Maybe when btrfs has matured more I will consider it but so far I avoid it like the plague for my critical machines.
 
Old 12-19-2022, 10:07 PM   #5
fkwilczek
LQ Newbie
 
Registered: Jan 2022
Distribution: Fedora
Posts: 9

Original Poster
Rep: Reputation: 1
My problem is that I need help with data recovery.

Last edited by fkwilczek; 12-19-2022 at 10:08 PM.
 
Old 12-20-2022, 01:19 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I would think you should consider yourself fortunate to have managed to recover what you have since btrfs isn't specifically listed as supported by photorec.
If testdisk can't help with the partition recovery, I'd reckon your chances using FOSS tools are diminishingly small.
 
Old 12-21-2022, 05:30 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,354

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Maybe recreating the original btrfs partitions with fdisk and run btrfs-scan and btrfs-check on the partitions will allow recovering of data.
 
Old 12-21-2022, 10:03 AM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by colorpurple21859 View Post
Maybe recreating the original btrfs partitions with fdisk and run btrfs-scan and btrfs-check on the partitions will allow recovering of data.
This may or may not work since btrfs normally is used with a volume in the partition and subvolumes within the file system (root volume) on that partition.


The fact that the OP was able to recover files is good and I would rather suggest that he reinstall; then in the future never use tools that are not designed for btrfs on a btrfs file system.

Last edited by computersavvy; 12-21-2022 at 10:04 AM.
 
Old 12-21-2022, 12:23 PM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,354

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
This may or may not work
I agree it is a shot in the dark.
 
Old 12-22-2022, 02:24 PM   #10
fkwilczek
LQ Newbie
 
Registered: Jan 2022
Distribution: Fedora
Posts: 9

Original Poster
Rep: Reputation: 1
I gave up on trying to recover partition and I reinstalled system. But I still have img of drive so I'm open for ideas.
 
Old 12-22-2022, 02:39 PM   #11
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by fkwilczek View Post
I gave up on trying to recover partition and I reinstalled system. But I still have img of drive so I'm open for ideas.
Try different things and if something works then let us know what happened.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restructuring disk partitions - move /resize ALL partitions. jan128 Linux - Software 5 03-10-2021 03:29 PM
move and resize SSD partitions - with OS on it bennypr0fane Linux - Hardware 8 01-21-2021 01:34 PM
LXer: Essential System Tools: GParted – resize, copy, and move partitions without data loss LXer Syndicated Linux News 0 12-21-2018 07:40 AM
[SOLVED] Is it safe to resize my Slackware partitions after removing my Mint 10 partitions? Robert.Thompson Slackware 19 02-18-2011 11:47 AM
How to do this: move image1, resize image1, move image2, resize image2, etc xmrkite Linux - Software 14 10-05-2006 01:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration