{"id":25,"date":"2005-06-07T08:43:29","date_gmt":"2005-06-07T08:43:29","guid":{"rendered":"http:\/\/blog.bananasplit.info\/?p=25"},"modified":"2005-06-07T08:46:02","modified_gmt":"2005-06-07T08:46:02","slug":"moving-filesystems","status":"publish","type":"post","link":"https:\/\/blog.stmellion.org\/?p=25","title":{"rendered":"Moving Filesystems"},"content":{"rendered":"<p>Just some commands to remind me how to move non-raid filesystems to mdadm raid1<\/p>\n<p>Use fdisk to create two identical partitions of type fd &#8211; raid autodetect<\/p>\n<p><b>Create the new array<\/b><br \/>\nmdadm &#8211;create &#8211;verbose \/dev\/md0 &#8211;level raid1 &#8211;raid-disks 2 \/dev\/hda1 \/dev\/hdb2<\/p>\n<p><b>Mount the new filesystem<\/b><br \/>\nmkdir \/mnt\/newdisk<br \/>\nmount \/dev\/md0 \/mnt\/newdisk<\/p>\n<p><b>Copy a filesystem to it<\/b><br \/>\ncp -ax \/var \/mnt\/newdisk<\/p>\n<p>After this, don&#8217;t forget to edit \/etc\/fstab so the system mounts the new filesystem on boot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just some commands to remind me how to move non-raid filesystems to mdadm raid1 Use fdisk to create two identical partitions of type fd &#8211; raid autodetect Create the new array mdadm &#8211;create &#8211;verbose \/dev\/md0 &#8211;level raid1 &#8211;raid-disks 2 \/dev\/hda1 \/dev\/hdb2 Mount the new filesystem mkdir \/mnt\/newdisk mount \/dev\/md0 \/mnt\/newdisk Copy a filesystem to it&hellip; <a class=\"more-link\" href=\"https:\/\/blog.stmellion.org\/?p=25\">Continue reading <span class=\"screen-reader-text\">Moving Filesystems<\/span><\/a><\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-debian","entry"],"_links":{"self":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25"}],"version-history":[{"count":0,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/25\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}