{"id":190,"date":"2016-09-04T20:56:39","date_gmt":"2016-09-05T01:56:39","guid":{"rendered":"https:\/\/servertricks.com\/?p=190"},"modified":"2016-09-04T21:02:18","modified_gmt":"2016-09-05T02:02:18","slug":"mount-lvm-volume-on-ubuntu-live","status":"publish","type":"post","link":"https:\/\/servertricks.com\/index.php\/2016\/09\/04\/mount-lvm-volume-on-ubuntu-live\/","title":{"rendered":"Mount LVM volume on Ubuntu Live"},"content":{"rendered":"<p>Mounting LVM Disk using Ubuntu livecd<br \/>\nMounting is an easy process to do, provided the filesystem type you are using is supported. What happen when you have an LVM formatted disk, and you need to mount it because the disk cannot be booted and a hell lot of valuable data kept inside?? Do not worry, because the solution is here&#8230;<\/p>\n<p>Get a live cd, for example, Ubuntu. For this article, I use Ubuntu 6.06 (I cannot find any latest version of ubuntu at my place)<\/p>\n<p>Boot using the live cd. Search for these tools: lvm2. If the cd do not have it, install it.<\/p>\n<p><code>$ sudo apt-get install lvm2<\/code><\/p>\n<p>To make sure the harddisk is recognised, you can use fdisk<\/p>\n<p><code>$ fdisk -lu<\/code><\/p>\n<p>Once installed, run pvscan to scan all disks for physical volume. this to make sure your LVM harddisk is detected by Ubuntu<\/p>\n<p><code>$ pvscan<\/code><\/p>\n<pre>PV \/dev\/sda2 VG VolGroup00 lvm2 [74.41 GB \/ 32.00 MB free]\r\nTotal: 1 [74.41 GB] \/ in use: 1 [74.41 GB] \/ in no VG: 0 [0 ]<\/pre>\n<p>After that run vgscan to scan disks for volume groups.<\/p>\n<p><code>$ vgscan <\/code><\/p>\n<pre>Reading all physical volumes. This may take a while...\r\nFound volume group \"VolGroup00\" using metadata type lvm2<\/pre>\n<p>Activate all volume groups available.<\/p>\n<p><code>$ vgchange -a y<\/code><\/p>\n<pre>2 logical volume(s) in volume group \"VolGroup00\" now active<\/pre>\n<p>Run lvscan to scan all disks for logical volume. You can see partitions inside the hard disk now active.<\/p>\n<p><code>$ lvscan<\/code><\/p>\n<pre>ACTIVE '\/dev\/VolGroup00\/LogVol00' [72.44 GB] inherit\r\nACTIVE '\/dev\/VolGroup00\/LogVol01' [1.94 GB] inherit<\/pre>\n<p>Mount the partition to any directory you want, usually to \/mnt<\/p>\n<p><code>$ mount \/dev\/VolGroup00\/LogVol00 \/mnt<\/code><\/p>\n<p>You can access the partition in the \/mnt directory and can backup your data<\/p>\n<p>Or if you want to reset a password run:<\/p>\n<p><code>$ sudo chroot \/mnt<\/code><\/p>\n<p>then run the following<\/p>\n<p><code>$ passwd username<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mounting LVM Disk using Ubuntu livecd Mounting is an easy process to do, provided the filesystem type you are using is supported. What happen when you have an LVM formatted disk, and you need to mount it because the disk cannot be booted and a hell lot of valuable data kept inside?? Do not worry, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[11,10],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-ubuntu","tag-14-04","tag-16-04"],"_links":{"self":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":6,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/190\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}