{"id":700,"date":"2021-05-04T13:42:55","date_gmt":"2021-05-04T18:42:55","guid":{"rendered":"http:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=700"},"modified":"2021-05-04T13:42:55","modified_gmt":"2021-05-04T18:42:55","slug":"recovering-lvm-from-disk-image","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=700","title":{"rendered":"Recovering LVM from disk image"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">For a RAID NAS box, when the NAS box dies, the data on the drives are still intact.  They can be retrieved in the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>dd disks containing LVM to hard drive; # create images of hard drives<\/li><li>losetup \/dev\/loopx disks.img; # make images appear as loop devices on OS<\/li><li>partx -v -add \/dev\/loopx; # make partitions on the loopback devices available to OS<\/li><li>vgscan, vgimport -a;  # to import Virtual Groups<\/li><li>vgdisplay; # showing imported VG names<\/li><li>vgchange -a y vgname; # to activate VG<\/li><li>fsck \/dev\/mapper\/vgname; # to check file system of VG<\/li><li>fuseext2 -o ro -o sync_read \/dev\/mapper\/vgname \/mounting_point; # to mount the VG<\/li><li>rsync -av &#8211;progress \/mounting_point\/ \/destination\/<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Then you will get everything at your destination, and then you can safely remove the images.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a RAID NAS box, when the NAS box dies, the data on the drives are still intact. They can be retrieved in the following steps: dd disks containing LVM to hard drive; # create images of hard drives losetup \/dev\/loopx disks.img; # make images appear as loop devices on OS partx -v -add \/dev\/loopx; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=700"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions"}],"predecessor-version":[{"id":701,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions\/701"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}