How to resolve btrfs errors? copying from btrfs to another partition?
Clash Royale CLAN TAG#URR8PPP
I had a working system that was running out of space. So I added space to the end of the disk.
Boot from gparted ISO
launched gparted moved partition 3 of 3 to the right. Went to resize partition 2 of 3 to claim unused space.
Error: About 100 files have csum errors.
btrfs check --repair /dev/sda2
Errors persist
Ok so clean out the crc --init-csum-tree
Errors persist, and can't extend partition
Question how should I have resolved this?
So I added a hard drive, made a new partition, and used cp -r -p /source/* /destination/
(the actually name of the mounted folder doesn't matter)
Since repairing the original partition failed, and I thought I had backed everything up I formatted the source partition.
Now after the partition repaired, put data back.
cp -r -p /destination/* /source
Had to resolve some grub errors and the UUID in fstab.
So it boot, but with errors complaining about /usr/local and several other locations.
Research shows that these locations are subvolumes.
Most of them were relatively harmless, as in I can just re-install them. However, var had some mysql databases in it.
Is my data gone? Why didn't cp copy it? Most importantly how do I copy all files to another partition so I can format(file system damaged beyond --repair) the original, and copy the files back without losing data due to subvolumes or etc?
opensuse file-copy btrfs
add a comment |
I had a working system that was running out of space. So I added space to the end of the disk.
Boot from gparted ISO
launched gparted moved partition 3 of 3 to the right. Went to resize partition 2 of 3 to claim unused space.
Error: About 100 files have csum errors.
btrfs check --repair /dev/sda2
Errors persist
Ok so clean out the crc --init-csum-tree
Errors persist, and can't extend partition
Question how should I have resolved this?
So I added a hard drive, made a new partition, and used cp -r -p /source/* /destination/
(the actually name of the mounted folder doesn't matter)
Since repairing the original partition failed, and I thought I had backed everything up I formatted the source partition.
Now after the partition repaired, put data back.
cp -r -p /destination/* /source
Had to resolve some grub errors and the UUID in fstab.
So it boot, but with errors complaining about /usr/local and several other locations.
Research shows that these locations are subvolumes.
Most of them were relatively harmless, as in I can just re-install them. However, var had some mysql databases in it.
Is my data gone? Why didn't cp copy it? Most importantly how do I copy all files to another partition so I can format(file system damaged beyond --repair) the original, and copy the files back without losing data due to subvolumes or etc?
opensuse file-copy btrfs
add a comment |
I had a working system that was running out of space. So I added space to the end of the disk.
Boot from gparted ISO
launched gparted moved partition 3 of 3 to the right. Went to resize partition 2 of 3 to claim unused space.
Error: About 100 files have csum errors.
btrfs check --repair /dev/sda2
Errors persist
Ok so clean out the crc --init-csum-tree
Errors persist, and can't extend partition
Question how should I have resolved this?
So I added a hard drive, made a new partition, and used cp -r -p /source/* /destination/
(the actually name of the mounted folder doesn't matter)
Since repairing the original partition failed, and I thought I had backed everything up I formatted the source partition.
Now after the partition repaired, put data back.
cp -r -p /destination/* /source
Had to resolve some grub errors and the UUID in fstab.
So it boot, but with errors complaining about /usr/local and several other locations.
Research shows that these locations are subvolumes.
Most of them were relatively harmless, as in I can just re-install them. However, var had some mysql databases in it.
Is my data gone? Why didn't cp copy it? Most importantly how do I copy all files to another partition so I can format(file system damaged beyond --repair) the original, and copy the files back without losing data due to subvolumes or etc?
opensuse file-copy btrfs
I had a working system that was running out of space. So I added space to the end of the disk.
Boot from gparted ISO
launched gparted moved partition 3 of 3 to the right. Went to resize partition 2 of 3 to claim unused space.
Error: About 100 files have csum errors.
btrfs check --repair /dev/sda2
Errors persist
Ok so clean out the crc --init-csum-tree
Errors persist, and can't extend partition
Question how should I have resolved this?
So I added a hard drive, made a new partition, and used cp -r -p /source/* /destination/
(the actually name of the mounted folder doesn't matter)
Since repairing the original partition failed, and I thought I had backed everything up I formatted the source partition.
Now after the partition repaired, put data back.
cp -r -p /destination/* /source
Had to resolve some grub errors and the UUID in fstab.
So it boot, but with errors complaining about /usr/local and several other locations.
Research shows that these locations are subvolumes.
Most of them were relatively harmless, as in I can just re-install them. However, var had some mysql databases in it.
Is my data gone? Why didn't cp copy it? Most importantly how do I copy all files to another partition so I can format(file system damaged beyond --repair) the original, and copy the files back without losing data due to subvolumes or etc?
opensuse file-copy btrfs
opensuse file-copy btrfs
asked Feb 25 at 19:13
cybernardcybernard
1356
1356
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
My heart stopped the moment you moved a partition.
Such disk operations are DANGEROUS. Particularly if you don't have a validated backup.
The checksum errors is BTRFS's way of telling you that your files are corrupted. Attempting to convince BTRFS that the files are OK is probably not what you want.
cp
does not copy subvolumes. Instead it copies them as directories. I don't know how you backed everything up, but it sounds like it did not backup your subvolumes. I recommend using btrfs-send
and btrfs-receive
to make backups.
As for your databases, given you formatted the source partition, I'd consider them gone, unfortunately.
TIP. If you're going to use BTRFS, reading the BTRFS wiki is a must. It's no ordinary filesystem. You must become intimate with it's functionality in order to use it effectively: https://btrfs.wiki.kernel.org/
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502973%2fhow-to-resolve-btrfs-errors-copying-from-btrfs-to-another-partition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My heart stopped the moment you moved a partition.
Such disk operations are DANGEROUS. Particularly if you don't have a validated backup.
The checksum errors is BTRFS's way of telling you that your files are corrupted. Attempting to convince BTRFS that the files are OK is probably not what you want.
cp
does not copy subvolumes. Instead it copies them as directories. I don't know how you backed everything up, but it sounds like it did not backup your subvolumes. I recommend using btrfs-send
and btrfs-receive
to make backups.
As for your databases, given you formatted the source partition, I'd consider them gone, unfortunately.
TIP. If you're going to use BTRFS, reading the BTRFS wiki is a must. It's no ordinary filesystem. You must become intimate with it's functionality in order to use it effectively: https://btrfs.wiki.kernel.org/
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
add a comment |
My heart stopped the moment you moved a partition.
Such disk operations are DANGEROUS. Particularly if you don't have a validated backup.
The checksum errors is BTRFS's way of telling you that your files are corrupted. Attempting to convince BTRFS that the files are OK is probably not what you want.
cp
does not copy subvolumes. Instead it copies them as directories. I don't know how you backed everything up, but it sounds like it did not backup your subvolumes. I recommend using btrfs-send
and btrfs-receive
to make backups.
As for your databases, given you formatted the source partition, I'd consider them gone, unfortunately.
TIP. If you're going to use BTRFS, reading the BTRFS wiki is a must. It's no ordinary filesystem. You must become intimate with it's functionality in order to use it effectively: https://btrfs.wiki.kernel.org/
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
add a comment |
My heart stopped the moment you moved a partition.
Such disk operations are DANGEROUS. Particularly if you don't have a validated backup.
The checksum errors is BTRFS's way of telling you that your files are corrupted. Attempting to convince BTRFS that the files are OK is probably not what you want.
cp
does not copy subvolumes. Instead it copies them as directories. I don't know how you backed everything up, but it sounds like it did not backup your subvolumes. I recommend using btrfs-send
and btrfs-receive
to make backups.
As for your databases, given you formatted the source partition, I'd consider them gone, unfortunately.
TIP. If you're going to use BTRFS, reading the BTRFS wiki is a must. It's no ordinary filesystem. You must become intimate with it's functionality in order to use it effectively: https://btrfs.wiki.kernel.org/
My heart stopped the moment you moved a partition.
Such disk operations are DANGEROUS. Particularly if you don't have a validated backup.
The checksum errors is BTRFS's way of telling you that your files are corrupted. Attempting to convince BTRFS that the files are OK is probably not what you want.
cp
does not copy subvolumes. Instead it copies them as directories. I don't know how you backed everything up, but it sounds like it did not backup your subvolumes. I recommend using btrfs-send
and btrfs-receive
to make backups.
As for your databases, given you formatted the source partition, I'd consider them gone, unfortunately.
TIP. If you're going to use BTRFS, reading the BTRFS wiki is a must. It's no ordinary filesystem. You must become intimate with it's functionality in order to use it effectively: https://btrfs.wiki.kernel.org/
answered Feb 25 at 22:50
Emmanuel RosaEmmanuel Rosa
3,3301612
3,3301612
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
add a comment |
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
I have moved dozens of partitions of times in the past without issue. This time was no scarier. Luckily, my most important data, is on other non btrfs file system that were untouched by this problem. It would be nice to have it back, but most of it can rebuilt, it will just take time I prefer not to spend on it if I don't have to.
– cybernard
Feb 25 at 22:58
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502973%2fhow-to-resolve-btrfs-errors-copying-from-btrfs-to-another-partition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown