Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* Btrfs restore error
@ 2017-11-17  3:56 Jay
  2017-11-17  5:38 ` Qu Wenruo
  0 siblings, 1 reply; 3+ messages in thread
From: Jay @ 2017-11-17  3:56 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I thought I should report something since there was little information
on this error. The situation is I have 2 external hard drives on
Xubuntu. One is not working and I need to move the data over to the
other. I used 'sudo btrfs restore -v /dev/sde1 /mnt/Old4TB' and
received 'Error mkdiring /mnt/Old4TB/Jayda TV:2'. I found one forum
post that said I needed to make the destination folder manually, then
restore. That did not work. looking at your code 2(%d) is a kernel
message? not sure what to make of it. I decided to enter a root
environment with 'sudo su' and the restore worked(the folder still
existed from previous troubleshoot step). The console is showing files
being restored. I tried a dry run first which did not show an error.
Just some feedback and reference.

uname -a

Linux emb 4.10.0-38-generic #42-16.04.1-Ubuntu SMP Tue Oct 10 16:21:20
UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

btrfs --version

btrfs-progs v4.4

Thank you,

Jayotis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Btrfs restore error
  2017-11-17  3:56 Btrfs restore error Jay
@ 2017-11-17  5:38 ` Qu Wenruo
  2017-11-17 15:20   ` Jay
  0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2017-11-17  5:38 UTC (permalink / raw)
  To: Jay, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 1854 bytes --]



On 2017年11月17日 11:56, Jay wrote:
> Hello,
> 
> I thought I should report something since there was little information
> on this error. The situation is I have 2 external hard drives on
> Xubuntu. One is not working and I need to move the data over to the
> other.

"btrfs replace" should be your first option, not "btrfs restore", unless
it's totally damaged and you want to salvage as much as possible.


> I used 'sudo btrfs restore -v /dev/sde1 /mnt/Old4TB' and
> received 'Error mkdiring /mnt/Old4TB/Jayda TV:2'.

No extra info like something restored succefully? Just 'Error mkdiring
/mnt/Old4TB/Jayda TV:2'?

At least it's ENOENT, checking mkdir(3p) should gives your the reason:
---
       ENOENT A  component  of the path prefix specified by path does
not name
              an existing directory or path is an empty string.

---

Did the dir "/mnt/Old4TB" exists in first place?

Thanks,
Qu

> I found one forum
> post that said I needed to make the destination folder manually, then
> restore. That did not work. looking at your code 2(%d) is a kernel
> message? not sure what to make of it. I decided to enter a root
> environment with 'sudo su' and the restore worked(the folder still
> existed from previous troubleshoot step). The console is showing files
> being restored. I tried a dry run first which did not show an error.
> Just some feedback and reference.
> 
> uname -a
> 
> Linux emb 4.10.0-38-generic #42-16.04.1-Ubuntu SMP Tue Oct 10 16:21:20
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> 
> btrfs --version
> 
> btrfs-progs v4.4
> 
> Thank you,
> 
> Jayotis
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Btrfs restore error
  2017-11-17  5:38 ` Qu Wenruo
@ 2017-11-17 15:20   ` Jay
  0 siblings, 0 replies; 3+ messages in thread
From: Jay @ 2017-11-17 15:20 UTC (permalink / raw)
  To: Qu Wenruo, linux-btrfs



On 2017-11-16 10:38 PM, Qu Wenruo wrote:
> 
> 
> On 2017年11月17日 11:56, Jay wrote:
>> Hello,
>>
>> I thought I should report something since there was little information
>> on this error. The situation is I have 2 external hard drives on
>> Xubuntu. One is not working and I need to move the data over to the
>> other.
> 
> "btrfs replace" should be your first option, not "btrfs restore", unless
> it's totally damaged and you want to salvage as much as possible.

OK, thank you.

>> I used 'sudo btrfs restore -v /dev/sde1 /mnt/Old4TB' and
>> received 'Error mkdiring /mnt/Old4TB/Jayda TV:2'.
> 
> No extra info like something restored succefully? Just 'Error mkdiring
> /mnt/Old4TB/Jayda TV:2'?

Correct, the program just exited.

> At least it's ENOENT, checking mkdir(3p) should gives your the reason:
> ---
>         ENOENT A  component  of the path prefix specified by path does
> not name
>                an existing directory or path is an empty string.
> 
> ---
> 
> Did the dir "/mnt/Old4TB" exists in first place?

I see, errno was set to 2; ENOENT.  Thank you. Yes, Old4TB is a drive 
that is auto mounted on boot to that permanent mount point.  I was able 
to create a folder on that drive using both mkdir and sudo mkdir.  Maybe 
the btrfs-progs Ubuntu package is not configured correctly... although 
the forum post shows at lest one other person has had this same error. 
I am not sure what distro they were using.

> Thanks,
> Qu
> 
>> I found one forum
>> post that said I needed to make the destination folder manually, then
>> restore. That did not work. looking at your code 2(%d) is a kernel
>> message? not sure what to make of it. I decided to enter a root
>> environment with 'sudo su' and the restore worked(the folder still
>> existed from previous troubleshoot step). The console is showing files
>> being restored. I tried a dry run first which did not show an error.
>> Just some feedback and reference.
>>
>> uname -a
>>
>> Linux emb 4.10.0-38-generic #42-16.04.1-Ubuntu SMP Tue Oct 10 16:21:20
>> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>>
>> btrfs --version
>>
>> btrfs-progs v4.4
>>
>> Thank you,
>>
>> Jayotis
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-17 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17  3:56 Btrfs restore error Jay
2017-11-17  5:38 ` Qu Wenruo
2017-11-17 15:20   ` Jay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox