You are not logged in.

#1 2017-07-06 06:17:33

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

[SOLVED] Live USB can't read HDD with LVM

I am using a live persistent USB stick on a system which is already running BL with LVM enabled. Is it because LVM is enabled that I am not able to read the contents of the HDD? This is how it appears on File Manager.

500 GB hard disk shows are 255 MB volume - http://en.zimagez.com/zimage/2017-07-06 … 4scrot.php

Contens after opening the volume - http://en.zimagez.com/zimage/2017-07-06 … 4scrot.php

Gparted from the live USB stick showing the HDD - http://en.zimagez.com/zimage/2017-07-06 … 4scrot.php

Last edited by linux_user (2017-08-16 07:33:23)


"Blind faith to authority is the greatest enemy of truth."

Offline

#2 2017-07-06 07:03:40

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: [SOLVED] Live USB can't read HDD with LVM

Offline

#3 2017-07-11 09:22:29

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] Live USB can't read HDD with LVM

The page says, "As long as you have the LVM tools installed on the distro you are booting, you can mount LVM partitions from any disk." I am not sure if the live USB stick is made with LVM. I created it using this method.

sudo vgscan gives the following output -

sudo: vgscan: command not found

Last edited by linux_user (2017-07-11 18:16:25)


"Blind faith to authority is the greatest enemy of truth."

Offline

#4 2017-07-11 19:28:26

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: [SOLVED] Live USB can't read HDD with LVM

So try:

sudo apt install lvm2

We should probably add that package to the ISO image so thanks for bringing this up.

Offline

#5 2017-07-19 06:44:52

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] Live USB can't read HDD with LVM

Head_on_a_Stick wrote:

So try:

sudo apt install lvm2

We should probably add that package to the ISO image so thanks for bringing this up.

Ok, LVM installed.

user@debian:~$ sudo vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "linux-vg" using metadata type lvm2
user@debian:~$ sudo vgchange -a y
  3 logical volume(s) in volume group "linux-vg" now active

Now according to the article, "all the partitions should have devices created in the form /dev/volumegroup/logicalvolume, which you can then mount in the usual way:"

user@debian:~$ sudo mount /dev/volumegroup/logicalvolume /mnt
mount: special device /dev/volumegroup/logicalvolume does not exist

How do I find these partitions? They should be having an identifier for each. Fdisk -l doesn't help me, nor is there the folder volumegroup inside /dev.


"Blind faith to authority is the greatest enemy of truth."

Offline

#6 2017-07-19 08:05:00

devnull
Member
Registered: 2017-06-29
Posts: 69

Re: [SOLVED] Live USB can't read HDD with LVM

try wth lsblk or df -h to find ou what partitions are there and where are they currently mounted

Last edited by devnull (2018-01-08 23:19:03)

Offline

#7 2017-07-20 17:54:04

cloverskull
Member
Registered: 2015-10-01
Posts: 348

Re: [SOLVED] Live USB can't read HDD with LVM

Head_on_a_Stick wrote:

So try:

sudo apt install lvm2

We should probably add that package to the ISO image so thanks for bringing this up.

This is a good idea. I've used the live ISO a few times to try rescue operations and have had to manually install lvm2 each time.

Offline

#8 2017-08-16 07:26:40

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] Live USB can't read HDD with LVM

devnull wrote:

try wth lsblik or df -h to find ou what partitions are there and where are they currently mounted

user@debian:~$ sudo lsblk
NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0 465.8G  0 disk 
├─sda1            8:1    0   243M  0 part 
├─sda2            8:2    0     1K  0 part 
└─sda5            8:5    0 465.5G  0 part 
  ├─linux--vg-root
                254:0    0   9.3G  0 lvm  
  ├─linux--vg-swap_1
                254:1    0     8G  0 lvm  
  └─linux--vg-home
                254:2    0 448.3G  0 lvm  
sdb               8:16   1   7.5G  0 disk 
├─sdb1            8:17   1     1G  0 part /lib/live/mount/persistence/sdb1
└─sdb2            8:18   1   6.5G  0 part /lib/live/mount/persistence/sdb2
sr0              11:0    1  1024M  0 rom  
loop0             7:0    0   706M  1 loop /lib/live/mount/rootfs/filesystem.squashfs

So, I tried to mount sda5 using the following commands,

user@debian:~$ sudo mount /dev/sda5 /mnt
mount: unknown filesystem type 'LVM2_member'
user@debian:~$ sudo mount /dev/sda5/linux--vg-home /mnt
mount: special device /dev/sda5/linux--vg-home does not exist (a path prefix is not a directory)
user@debian:~$ sudo mount /dev/sda5/linux--vg-root /mnt
mount: special device /dev/sda5/linux--vg-root does not exist (a path prefix is not a directory)

I then finally tried,

user@debian:~$ sudo mount /dev/sda1 /mnt
user@debian:~$ 

481GB drive is mounted (the home volume), and another 10GB drive is also mounted (the root volume). Screenshot here.

Seems everything is fine. Thanks to all. Marking it as solved.

Last edited by linux_user (2017-08-16 07:27:43)


"Blind faith to authority is the greatest enemy of truth."

Offline

Board footer

Powered by FluxBB