{"id":219,"date":"2017-03-22T09:52:33","date_gmt":"2017-03-22T08:52:33","guid":{"rendered":"http:\/\/owncloud.gonscak.sk\/?p=219"},"modified":"2017-03-22T09:52:33","modified_gmt":"2017-03-22T08:52:33","slug":"rescue-disk-with-bad-blocks-from-ubuntu-by-ddrescue","status":"publish","type":"post","link":"https:\/\/www.gonscak.sk\/?p=219","title":{"rendered":"Rescue disk with ddrescue from ubuntu"},"content":{"rendered":"<p>I have a broken disk, partially working. This is part of dmesg after plug-in USB removable 2,5&#8243; disk, and list from fdisk:<\/p>\n<pre>[1448.206941] blk_update_request: I\/O error, dev sdb, sector 6293504\nfdisk -l \/dev\/sdb\nDisk \/dev\/sdb: 931,5 GiB, 1000170586112 bytes, 1953458176 sectors\n......\nDevice\u00a0\u00a0\u00a0\u00a0 Boot Start\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 End\u00a0\u00a0\u00a0 Sectors\u00a0\u00a0 Size Id Type\n\/dev\/sdb1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2048 1953458175 1953456128 931,5G\u00a0 7 HPFS\/NTFS\/exFAT<\/pre>\n<p>So I will try to rescue some data from it. I will use a gddrescue program:<\/p>\n<pre>apt-get install gddrescue<\/pre>\n<p>And now, I have mounted a big 3TB nfs storage, where I will save image of this disk:<\/p>\n<pre>ddrescue -r1 -v -d \/dev\/sdb \/mnt\/nfs\/sdb.img \/mnt\/nfs\/sdb.log<\/pre>\n<ul>\n<li>-r1\u00a0 means, that ddrescue will try read every block one time before giving it up on this block (reading from it)<\/li>\n<li>-v\u00a0 means verbose mode<\/li>\n<li>-d means, that ddrescue use direct disk access and ignore kernel&#8217;s cache<\/li>\n<li>\/dev\/sdb is the failing drive<\/li>\n<li>\/mnt\/nfs\/sdb.img is the destination image, where we save any data<\/li>\n<li>\/mnt\/nfs\/sdb.log is the log file, where is written every bad block and actual position of ddrescue. We can brake this rescue at any time and continue it later with the same command. When ddrescue finish, we can repeat this check only on bad blocks with more retries<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>22.3.2017 &#8211; it was stared. post will continue after it finished \ud83d\ude00 maybe it take 3 days to finish, maybe more \ud83d\ude42 This operation takes a long time to finish&#8230;<\/li>\n<\/ul>\n ","protected":false},"excerpt":{"rendered":"<p>I have a broken disk, partially working. This is part of dmesg after plug-in USB removable 2,5&#8243; disk, and list from fdisk: [1448.206941] blk_update_request: I\/O error, dev sdb, sector 6293504 fdisk -l \/dev\/sdb Disk \/dev\/sdb: 931,5 GiB, 1000170586112 bytes, 1953458176 sectors &#8230;&#8230; Device\u00a0\u00a0\u00a0\u00a0 Boot Start\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 End\u00a0\u00a0\u00a0 Sectors\u00a0\u00a0 Size Id Type \/dev\/sdb1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2048 1953458175 1953456128 931,5G\u00a0 &hellip; <a href=\"https:\/\/www.gonscak.sk\/?p=219\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Rescue disk with ddrescue from ubuntu<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[57,58,16,60],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-ubuntu","tag-bad-blocks","tag-ddrescue","tag-disk","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":0,"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gonscak.sk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}