LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I mount existing Fedora LVM after new Kubuntu install? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-mount-existing-fedora-lvm-after-new-kubuntu-install-633547/)

Erik765 04-06-2008 07:27 PM

How do I mount existing Fedora LVM after new Kubuntu install?
 
Hi,
I have a 500gb hdd with xp, and fedora8 installed. There are 170+gb free space after those two. I installed Kubuntu here.

I assumed that Kubuntu would edit grub to include kubuntu, xp as well as fedora, but it only does kubuntu and xp.

Unfortunately, the Fedora8 was installed as LVM, but all my files are here and want to be able to transfer betweed the kubuntu and fedora partitions.

I tried to make sure Kubuntu wasn't touching the LVM partition during install, but when I go to kmenu> System Settings> Advanced> Disk & Filesystems It's showing what should be a Fedora LVM as a mount point of /proc. What does this mean? There's nowhere to change that and I'm not sure I want to risk it.


fdisk -l shows this:


Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xeca89011

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3187 25599546 7 HPFS/NTFS
/dev/sda2 3188 19122 127997887+ 7 HPFS/NTFS
/dev/sda3 19123 19135 104422+ 83 Linux
/dev/sda4 19136 60801 334682145 5 Extended
/dev/sda5 19136 38913 158866753+ 8e Linux LVM
/dev/sda6 38914 39423 4096543+ 82 Linux swap / Solaris
/dev/sda7 39424 60801 171718753+ 83 Linux


fstab has this (looks like my windows partitions and my optical drive.)

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda7
UUID=335ad472-2db4-4ba5-b28f-febac34f4713 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=9E4837134836EA23 /media/sda1 ntfs defaults,umask=007,gid=46 0 1
# /dev/sda2
UUID=58C0F711C0F6F45A /media/sda2 ntfs defaults,umask=007,gid=46 0 1
# /dev/sda3
UUID=a9b0ea94-7d62-4b2a-b87f-76f05598c94b /media/sda3 ext3 defaults 0 2
# /dev/sda6
UUID=0324973b-4f17-4adb-b8bd-7c10deb06028 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0


I've thought about just adding /dev/sda5 to fstab but how do I find out its UUID?

This is getting frustrating.

Help me out guys. I need those files off my LVM.

I can post grub's menu.lst from pre and post Kubuntu if needed 'cause I can kept copies before I did the install.

So far I like Anaconda LOTS better.

Any thoughts?

bhaslinux 04-12-2008 10:27 AM

Since the LVM is present as a partition, try these steps

# pvscan
# vgscan
# vgchange -a y

After this the logical volumes must be visible. Try mouting them and getting the data

After the command of vgchange, you must get some information on the numberof logical volumes which got activated.

Erik765 04-23-2008 01:35 AM

Hi!
Sorry, I've taken so long to reply.
I tried those commands. Here is what they displayed.

Quote:

pvscan
No matching physical volumes found
Quote:

vgscan
Reading all physical volumes. This may take a while...
No volume groups found
Quote:

vgchange -a y
No volume groups found
Is this because the LVM isn't in fstab?

... or am I doing something wrong?

Thanks for your help!

thanquol 05-15-2008 10:31 AM

Quote:

Originally Posted by bhaslinux (Post 3119054)
Since the LVM is present as a partition, try these steps

# pvscan
# vgscan
# vgchange -a y

After this the logical volumes must be visible. Try mouting them and getting the data

After the command of vgchange, you must get some information on the numberof logical volumes which got activated.

Thanq you!

This solved my problems. I got the following:

[root@Loke ~]# pvscan
PV /dev/sdc1 VG datadisc lvm2 [698,64 GB / 0 free]
PV /dev/sdb1 VG datadisc lvm2 [698,64 GB / 0 free]
PV /dev/dm-0 VG VolGroup00 lvm2 [148,84 GB / 32,00 MB free]
[root@Loke ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "datadisc" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
[root@Loke ~]# vgchange -a y
1 logical volume(s) in volume group "datadisc" now active
2 logical volume(s) in volume group "VolGroup00" now active

after that I mounted the device manually:
[root@Loke ~]# mount -t ext3 /dev/datadisc/LogDatadisc /home/<my home dir>/dl/

when it worked I edited /etc/fstab with the new mounting point.

nyeates1 08-03-2009 01:52 PM

not logged in as root
 
Quote:

Originally Posted by Erik765 (Post 3129933)
Hi!
Sorry, I've taken so long to reply.
I tried those commands. Here is what they displayed.

pvscan
No matching physical volumes found

Is this because the LVM isn't in fstab?

... or am I doing something wrong?

Thanks for your help!

Those commands results are what happen when you run those commands with user of not high enough privileges (root user).

Either use sudo in front of each command, or su - to login as root user.

If you want some LVM notes and tips see my wiki: http://nickyeates.com/technology/uni...filesystem_lvm

-Nick Yeates-
http://www.nickyeates.com

nyeates1 08-03-2009 01:59 PM

I got my issue solved cause of this thread!
 
Quote:

Originally Posted by thanquol (Post 3154190)
Thanq you!

This solved my problems. I got the following:

[root@Loke ~]# pvscan
PV /dev/sdc1 VG datadisc lvm2 [698,64 GB / 0 free]
PV /dev/sdb1 VG datadisc lvm2 [698,64 GB / 0 free]
PV /dev/dm-0 VG VolGroup00 lvm2 [148,84 GB / 32,00 MB free]
[root@Loke ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "datadisc" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
[root@Loke ~]# vgchange -a y
1 logical volume(s) in volume group "datadisc" now active
2 logical volume(s) in volume group "VolGroup00" now active

after that I mounted the device manually:
[root@Loke ~]# mount -t ext3 /dev/datadisc/LogDatadisc /home/<my home dir>/dl/

when it worked I edited /etc/fstab with the new mounting point.

THANKS bhaslinux and thanquol!!! You helped solve a 1.5 year long problem of data being stuck on some drives of mine. I had made the LVM2 group with EVMS a few years back, and all a sudden EVMS didnt know how to mount it anymore. EVMS was a graphical raid and LVM creation utility, that has since gone under. Luckily these commands brought it right up!

Code:

pvscan
pvdisplay (physical volume display)
vgdisplay (volume group display)
lgdisplay (logical group display)

Code:

root@lms:~# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "Media" using metadata type lvm2

root@lms:~# vgchange -a y
  1 logical volume(s) in volume group "Media" now active

Saw in file listings of /dev/Media/ and /dev/mapper/ that devices existed!

Code:

root@lms:/dev/mapper# mkdir /media/olddocuments
root@lms:/dev/mapper# mount -t ext3 /dev/Media/CargoPlane /media/olddocuments/



All times are GMT -5. The time now is 07:48 PM.