{"id":369,"date":"2017-03-13T14:07:23","date_gmt":"2017-03-13T11:07:23","guid":{"rendered":"http:\/\/ustinych.net\/wordpress\/?p=369"},"modified":"2017-03-21T15:15:11","modified_gmt":"2017-03-21T12:15:11","slug":"tutorial-how-to-access-dsms-data-system-partitions","status":"publish","type":"post","link":"https:\/\/ustinych.net\/wordpress\/?p=369","title":{"rendered":"Tutorial: How to access DSM&#8217;s Data &#038; System partitions"},"content":{"rendered":"<p>If you can&#8217;t access your Xpenology box but you still wish to try and &#8216;fix&#8217; some configuration files or perhaps your wish to finally make that backup that you should have done before fiddling with the root user, then you can access the content of the system partition and data partitions through a Live Ubuntu CD (or whatever unix flavoured OS you so desire). Here is how to:<\/p>\n<p>1 &#8212; Make a\u00a0<a class=\"postlink\" href=\"https:\/\/www.ubuntu.com\/download\/desktop\/create-a-usb-stick-on-windows\">Live Ubuntu USB drive<\/a>. Ideally it is more convenient to make a persistent Live Ubuntu USB drive but that&#8217;s not required for this tutorial and it would just complicate things unnecessarily.<\/p>\n<p>2 &#8212; Once you&#8217;re done burning Ubuntu on the USB flash drive, go plug it in your Xpenology box and boot from it.<\/p>\n<p>3 &#8212; Once in Ubuntu, launch Terminal. You will then need to install\u00a0mdadm\u00a0and\u00a0lvm2\u00a0by typing the following command in Terminal:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n \tapt-get install mdadm lvm2\r\n<\/pre>\n<p>If you wish to mount the data partition alone then proceed with the following command.<\/p>\n<p>4 &#8212; To mount the data partition, simply issue this command and you are done:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n \tmdadm -Asf &amp;&amp; vgchange -ay\r\n<\/pre>\n<p>If you also wish to mount the system partition then proceed with the following commands. (Adapt to your case accordingly)<\/p>\n<p>5 &#8212; Then you need to check your raid array and partitioning of your drives:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n \tfdisk -l | grep \/dev\/sd\r\n<\/pre>\n<p>In my case I see this. Note I only have 2 drives\u00a0\/dev\/sda\u00a0and\u00a0\/dev\/sdb<\/p>\n<p>System partitions are the ones labeled\u00a0sda1,\u00a0sdb1. If you have more drives in the aray, subsequent system partitions will probably be called\u00a0sdc1,\u00a0sdd1\u00a0so on and so forth. You get the point.<\/p>\n<p>6 &#8212; Once you figured out all system partitions, then issue (this is for my case, with 2 drives):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n \tmdadm -Ee0.swap \/dev\/sda1 \/dev\/sdb1\r\n<\/pre>\n<p>if you have 3 drives then you add\u00a0\/dev\/sdc1. You get the idea.<\/p>\n<p>7 &#8212; Finally, assemble the array and fix the byte order (this is for my case, with 2 drives):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n \tmdadm -AU byteorder \/dev\/md0 \/dev\/sda1 \/dev\/sdb1\r\n<\/pre>\n<p>Same comment as previous command; add any additional system partitions that you may have. Beware of the\u00a0\/dev\/md0. It&#8217;s normal, not a mistake.<br \/>\nYour system partition should now be mounted and you can navigate through the system files. Simply shutdown the machine when you are done. If for some reason you need to reboot and want to access the partition again then you will need to re-install\u00a0mdadm\u00a0and\u00a0lvm2\u00a0because the Live Ubuntu USB is not persistent.<\/p>\n<p>&#8212;&#8212;&#8212;<br \/>\nReference:<br \/>\n<a class=\"postlink\" href=\"https:\/\/www.synology.com\/en-global\/knowledgebase\/DSM\/tutorial\/Storage\/How_can_I_recover_data_from_my_DiskStation_using_a_PC\">https:\/\/www.synology.com\/en-global\/knowledgebase\/DSM\/tutorial\/Storage\/How_can_I_recover_data_from_my_DiskStation_using_a_PC<\/a><br \/>\n<a class=\"postlink\" href=\"http:\/\/xpenology.com\/forum\/viewtopic.php?f=2&amp;t=22100&amp;p=83631&amp;hilit=version#p83631\">http:\/\/xpenology.com\/forum\/viewtopic.php?f=2&amp;t=22100&amp;p=83631&amp;hilit=version#p83631<\/a><br \/>\n<a class=\"postlink\" href=\"http:\/\/xpenology.com\/forum\/viewtopic.php?f=2&amp;t=20216&amp;p=74659&amp;hilit=mdadm#p74659\">http:\/\/xpenology.com\/forum\/viewtopic.php?f=2&amp;t=20216&amp;p=74659&amp;hilit=mdadm#p74659<\/a><\/p>\n<p>Thanks to Jun<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you can&#8217;t access your Xpenology box but you still wish to try and &#8216;fix&#8217; some configuration files or perhaps your wish to finally make that backup that you should have done before fiddling with the root user, then you can access the content of the system partition and data partitions through a Live Ubuntu\u2026 <span class=\"read-more\"><a href=\"https:\/\/ustinych.net\/wordpress\/?p=369\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,32],"tags":[],"class_list":["post-369","post","type-post","status-publish","format-standard","hentry","category-hp-gen8","category-synology"],"_links":{"self":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369"}],"version-history":[{"count":5,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}