LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2009, 02:52 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Rep: Reputation: 30
mount lvm partition


I am trying to mount a drive that has Redhat installed.
Booting machine from that drive is not working. It reports
that it cannot find the OS. I think the drive is fulled.
I am trying to mount the drive and trying to delete couple of files to see if it can fix the problem.

However, mount does not work on the /dev/sdq2 partition.
It need a partition type, which i have no clue what it is.
mounting without option does not work either.
Can someone help?

Disk /dev/sdq: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdq1 * 1 13 104391 83 Linux
/dev/sdq2 14 14593 117113850 8e Linux LVM

[root@mnt]# mount -t LVM /dev/sdq2 /mnt/linux/
mount: fs type LVM not supported by kernel
 
Old 04-02-2009, 03:08 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
LVM isn't a filesystem type, only a partition type. If you have LVM supported on whatever OS you're actually running under (which I assume is not Redhat...) then lvdisplay will show all recognised logical volumes, and it's the /dev/ entry there you'll want to mount, e.g. /dev/VolGroup/LogVol00
 
Old 04-02-2009, 03:45 PM   #3
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
I connected the drive to other system via a usb enclosure.
The lvdisplay does not show the volume on that drive. It only shows those on the local machine.
Please suggest.

Last edited by ufmale; 04-02-2009 at 04:38 PM.
 
Old 04-02-2009, 05:25 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
run lvscan to scan all disks for LVM instances.
 
Old 04-02-2009, 06:57 PM   #5
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
Here is what i got. It looks like the lvcan see only the sda drive.
The one I need is the sdb. Using lvmdiskcan see all of them, but does not tell me how to mount the drive.


Quote:
[root@mm ~]# /usr/sbin/lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [7.34 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [512.00 MB] inherit
[root@mm ~]# /usr/sbin/lvmdiskscan
/dev/ramdisk [ 16.00 MB]
/dev/root [ 7.34 GB]
/dev/ram [ 16.00 MB]
/dev/sda1 [ 101.94 MB]
/dev/VolGroup00/LogVol01 [ 512.00 MB]
/dev/ram2 [ 16.00 MB]
/dev/sda2 [ 7.90 GB] LVM physical volume
/dev/ram3 [ 16.00 MB]
/dev/ram4 [ 16.00 MB]
/dev/ram5 [ 16.00 MB]
/dev/ram6 [ 16.00 MB]
/dev/ram7 [ 16.00 MB]
/dev/ram8 [ 16.00 MB]
/dev/ram9 [ 16.00 MB]
/dev/ram10 [ 16.00 MB]
/dev/ram11 [ 16.00 MB]
/dev/ram12 [ 16.00 MB]
/dev/ram13 [ 16.00 MB]
/dev/ram14 [ 16.00 MB]
/dev/ram15 [ 16.00 MB]
/dev/sdb1 [ 101.94 MB]
/dev/sdb2 [ 111.69 GB] LVM physical volume
3 disks
17 partitions
0 LVM physical volume whole disks
2 LVM physical volumes

I then try to mount the one shown in lvscan. Mounting LogVol00 works fine. It is the sda drive.
but LogVol01 does not work

Quote:
[root@mm ~]# mount /dev/VolGroup00/LogVol01 /mnt/lv1
/dev/VolGroup00/LogVol01 looks like swapspace - not mounted
mount: you must specify the filesystem type

Now. Trying the vgcan and found two VolGroup00. I think the 2nd one is the one
from sdb disk. How do I activate that 2nd group then?

Quote:
[root@mm ~]# /usr/sbin/vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2

Last edited by ufmale; 04-02-2009 at 07:08 PM.
 
Old 04-03-2009, 01:43 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
I believe you'd need to rename it to somethign else, you can't have two LVM's with the same name.
 
Old 04-06-2009, 09:36 PM   #7
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
Found the way to do it.

First trying to rename it directly. Ofcourse.. it does not work.
Fortunately, my system shows a warning of duplicate Volgroup with UUID (i think that what it is called) of the 2nd system.

So I use

Quote:
$ vgrename GhQnCM-fg992-xxxx-xxxx-xxx-xxxx-xxxxx VolGroup01.
Then call $ vgscan.

Now my 2nd disk or the VolGroup01 shows up with "inactive" status. Then I activate it with

Quote:
$ vgchange -ay VolGroup01
2 logical volume(s) in volume group "VolGroup01" now active
Now.. I just mount it with regular mount cmd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I mount LVM partition in ubuntu? yesglass Fedora 12 10-24-2013 10:10 AM
How to mount a LVM partition using a live cd brazilian_user Linux - General 4 06-16-2009 02:11 AM
How do you mount an LVM partition with a liveCD? Thaidog Linux - General 1 01-13-2009 11:34 PM
can't mount lvm partition alris Linux - General 2 12-19-2007 04:33 PM
mount a LVM partition pavi Linux - General 1 10-29-2005 11:56 AM


All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration