You are not logged in.
Pages: 1
Hey, I tried to resize a btrfs (almost 550gb used) from 1tb to 800gb, but I accidentally used "btrfs filesystem resize -800g" instead of "btrfs filesystem resize 800g", now "btrfs filesystem show" says "devid 1 size 131.51GiB used 552.03GiB", all (I hope) my files are there, but I can't resize it anymore. What can I do?
Last edited by pedrofleck (2014-11-08 18:33:56)
Offline
Sounds like a bug to me. What error do you get when you try to resize it? Can you mount the filesystem? Is a btrfs device add ; btrfs filesystem balance a possibility? btrfs-rescue(8) might be of help here, or even btrfsck(8) (not recommended). btrfs-scrub ; btrfs-filesystem repair might also help. btrfs-restore(8) might be able to retreive some files if the filesystem is damaged (or before it becomes damaged as a result of using the commands above). You do have a backup of this filesystem, right?
Further reading:
When will Btrfs have a fsck-like tool?
Btrfs Tips: Btrfs Scrub and Btrfs Filesystem Repair
btrfs-restore
Offline
I'm thinking in doing a bug report later. Actually, doesn't had any errors. I can mount but when I try to balance it says the balance wasn't necessary. I don't have any backup, but the files are accessible and I can transfer anything to another drive (but I just have a pendrive and a 128gb SSD). In another forum, they recommended using dd to save the files and then recreate the partition table. Is it safe to use these commands or it's better to wait my external HD to arrive (yes, I bought one because of this)?
Offline
I'm thinking in doing a bug report later.
Before you make any more changes, consider saving the relevant information in case you do decide to file a bug report. For example,
uname -a
btrfs --version
btrfs fi show
btrfs fi df /home # Replace /home with the mount point of your btrfs-filesystem
dmesg > dmesg.log
btrfs filesystem show ...
btrfs-debug-tree ... #Warning! May contain confidential information.
btrfs filesystem balance ...You might also consider posting your issue on the Btrfs mailing list, as those people are much more familiar with btrfs than the majority of the Arch forum.
Actually, doesn't had any errors. I can mount but when I try to balance it says the balance wasn't necessary.
btrfs-balance(8) has a -f option: "force reducing of metadata integrity"
In another forum, they recommended using dd to save the files and then recreate the partition table.
I'm not sure that will work, since the filesystem itself was resized. The filesystem saves its size in its own header (superblock); it's not determined by the MBR/GPT partition size. So if you dd the partition to a backup file, recreate the partition in the same place, and restore the partition, you're likely to end up with the same problem. But anything can happen, so it's worth a try.
I don't have any backup, but the files are accessible and I can transfer anything to another drive (but I just have a pendrive and a 128gb SSD). Is it safe to use these commands or it's better to wait my external HD to arrive (yes, I bought one because of this)?
It comes down to how important your data is. Personally, I keep all of my important files backed up on at least two different drives, preferably one offline, and I always update them before I go messing around with filesystem/partition/disk tools. If you want to be sure your data will be intact, wait until you have a backup to do anything else. On the other hand, if you need the filesystem back up and running before that, you can use the backup storage you have and try your luck with the commands above.
If you do reach a solution, consider posting it here (obviously), the Problem FAQ on the Btrfs wiki, their mailing list, and/or Btrfs#Troubleshooting on the Arch wiki, as this sounds like an interesting edge case.
Offline
Pages: 1