Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nvme controller is down
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lekto
n00b
n00b


Joined: 20 Sep 2014
Posts: 35
Location: Mexico of Europe

PostPosted: Sat Feb 02, 2019 1:17 pm    Post subject: nvme controller is down Reply with quote

Hi, I have a problem with my nvme (Apacer z280 120GB). Two days ago linux freezed, after restart freezed moment after login, after another restart PC stuck before booting and nvme wasn't shown in uefi. I removed nvme, take off heatsing and I didn't seen any damages. Now I can boot pc from gentoo installation pendrive and gentoo detected nvme. I try to make copy of whole disk, but dd end after while (few handred MB or few GB) with error in dmesg and I need restart PC to make nvme detected again. Is there any chances to recover data from it now?

Error in dmesg:
>nvme nvme0: controller is down; will reset; CSTS=0xffffffff, PCI_STATUS=0xffff
>nvme 0000:01:00.0: enabling device (0000 -> 0002)
>nvme nvme0: Removing after probe failure status: -19
>nvme0n1: detected capacity change from 120034123776 to 0
>print_req_error: I/O error, dev nvme0n1, sector 786144
>print_req_error: I/O error, dev nvme0n1, sector 785888
>nvme nvme0: failed to set APST feature (-19)
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 824

PostPosted: Sat Feb 02, 2019 2:09 pm    Post subject: Reply with quote

Quote:
Is there any chances to recover data from it now?

there is a chance, but i wouldn't try it too often.

i suggest you use ddrescue instead of plain dd. it does not fail in case of errors and it should be on systemrescuecd et al. depending on the data you are trying to rescue it might be better to rescue single partitions because it is (much) easier to extract data from the resulting files and the mbr/partition table might not be as valuable.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7328
Location: Saint Amant, Acadiana

PostPosted: Sat Feb 02, 2019 2:37 pm    Post subject: Reply with quote

I'd use 'cp -a' instead. ddrescue tries to read all blocks and it seems the device goes offline when an I/O error occurs. With cp there is a chance bad sectors won't be read.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
lekto
n00b
n00b


Joined: 20 Sep 2014
Posts: 35
Location: Mexico of Europe

PostPosted: Sat Feb 02, 2019 2:38 pm    Post subject: Reply with quote

I don't tried ddrescue since it wasn't on install image, I will download full iso and give it a try. I can't recover any partition other than /boot/ since root is on crypted lvm and nvme die while using cryptsetup luksOpen. I was thinking about dd it part by part, but I'm not realy sure how to manage it.

Code:
#dd if=/dev/nvme0n1 of=/dev/sda
x1+0 record in
x1+0 record out
<restart>
#dd if=/dev/nvme0n1 of=/dev/sda seek=x1 skip=x1
x2+0 record in
x2+0 record out
<restart>
#dd if=/dev/vnme0n1 of=/dev/sda seek=x1+x2 skip=x1+x2

Is this way valid?

You mean cp -a on /dev/nvme0p1?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14382

PostPosted: Sat Feb 02, 2019 5:04 pm    Post subject: Reply with quote

No, use cp -a (or equivalent) on the files you need to save, not on the device as a whole. If possible, try to save only the files that have changed since your last backup (and plan on restoring the backup for everything else), since this will reduce the number of reads required on the failing drive.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum