Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM2 partitions can't mount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
_mikec_
Guru
Guru


Joined: 22 May 2004
Posts: 386

PostPosted: Fri Oct 13, 2006 7:44 pm    Post subject: LVM2 partitions can't mount Reply with quote

seems to be an easy one to fix yet i couldn't find an answer to my problem.. i am trying to fix a gentoo installation after trying to apply a splash boot to the kernel using genkernel..

command i did on a LVM partitioned hard disk..

Quote:
genkernel --gensplash=killer initrd


i forgot --lvm2 and now my system wont boot.. see pics..

Pic 1 - Pic 2 - Pic 3 - Pic 4

now, using my gentoo livecd i am trying to fix this problem

mount -t 8e /dev/hda3/ /mnt/gentoo
Quote:

mount: unknown filesystem type '8e'


initializing LVM partitions

pvscan
Quote:
PV /dev/hda3 VG VolGroup00 lvm2 [60.50 GB / 32.00 MB free]
Total: 1 [60.50 GB] / in use: 1 [60.50 GB] / in no VG: 0 [0 ]


pvcreate --ff /dev/hda3
Quote:
/dev/cdrom: open failed: Read-only file system
Attempt to close device '/dev/cdrom' which is not open.
Really INITIALIZE physical volume "/dev/hda3" of volume group "VolGroup00" [y/n]? y
Can't open /dev/hda3 exclusively. Mounted filesystem?


mount -l
Quote:
/dev/ROOT on / type xfs (rw,noatime)
/dev/hdd on /mnt/cdrom type iso9660 (ro,noexec,nosuid,nodev)
/dev/loop0 on /mnt/livecd type squashfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
none on /dev/shm type tmpfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /mnt/livecd/usr/portage type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
none on /mnt/livecd/usr/kde/3.5/share/config/kdm type tmpfs (rw)
none on /mnt/livecd/usr/NX/home/nx type tmpfs (rw)
none on /mnt/livecd/usr/NX/var/db type tmpfs (rw)
none on /mnt/livecd/usr/portage type tmpfs (rw)
none on /mnt/livecd/opt/anaconda/usr/lib/anaconda type tmpfs (rw)
none on /mnt/livecd/usr/share/X11/xkb type tmpfs (rw)


/dev/hda3 does not seem to be mounted, what can i do now?
_________________
(8 Mars 2005 - 07:52:46)
(18 September 2017 - 11:25:35)
Back to top
View user's profile Send private message
dmartinsca
Guru
Guru


Joined: 09 Dec 2005
Posts: 303
Location: Ontario, Canada

PostPosted: Fri Oct 13, 2006 11:43 pm    Post subject: Re: LVM2 partitions can't mount Reply with quote

Ok, a few things I see wrong here when you are trying to get your partitions mounted while booted from the livecd. I don't use genkernel, splash image, or have my root partition as LVM so I can't help with those bits, however..

Quote:
mount -t 8e /dev/hda3/ /mnt/gentoo

This isn't right. For one, 8e is a partition type, not a filesystem type which is what the mount command wants. (ext2,ext3,nfs,smbfs,xfs,etc..) Also, if /dev/hda3 is a physical lvm volume then it should never be mounted directly, you just can't do it.

Quote:
pvscan
Quote:

PV /dev/hda3 VG VolGroup00 lvm2 [60.50 GB / 32.00 MB free]
Total: 1 [60.50 GB] / in use: 1 [60.50 GB] / in no VG: 0 [0 ]


This looks fine, it's basically saying you have one physical volume (/dev/hda3) which is part of volume group "VolGroup00".
Quote:

pvcreate --ff /dev/hda3

Quote:
/dev/cdrom: open failed: Read-only file system
Attempt to close device '/dev/cdrom' which is not open.
Really INITIALIZE physical volume "/dev/hda3" of volume group "VolGroup00" [y/n]? y
Can't open /dev/hda3 exclusively. Mounted filesystem?


Damn.. that may have destroyed everything.. /dev/hda3 was already a physical volume which was a part of VolGroup00, which probably contained your logical volumes containing your filesystems which contained your data.. 8O

Basically the problem here was that you should have tried to mount /dev/VolGroup00/<logical volume name> as your root partition.
Run 'lvscan' this should list the path of the files in /dev you need to mount as your partitions, hopefully :)

Post the output of the following if you're stuck:
pvscan
vgscan
lvscan
Back to top
View user's profile Send private message
_mikec_
Guru
Guru


Joined: 22 May 2004
Posts: 386

PostPosted: Sat Oct 14, 2006 11:37 am    Post subject: Reply with quote

Quote:
mount -t lvm /dev/VolGroup00/LogVol00 /mnt/gentoo
mount: unknown filesystem type 'lvm'

Quote:
mount -t lvm2 /dev/VolGroup00/LogVol00 /mnt/gentoo
mount: unknown filesystem type 'lvm2'



lvscan
Quote:
inactive '/dev/VolGroup00/LogVol00' [59.47 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [1.00 GB] inherit


pvscan
Quote:
PV /dev/hda3 VG VolGroup00 lvm2 [60.50 GB / 32.00 MB free]
Total: 1 [60.50 GB] / in use: 1 [60.50 GB] / in no VG: 0 [0 ]


vgscan
Quote:
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2


ps.. i will never use LVM partitions ever again :x
_________________
(8 Mars 2005 - 07:52:46)
(18 September 2017 - 11:25:35)
Back to top
View user's profile Send private message
_mikec_
Guru
Guru


Joined: 22 May 2004
Posts: 386

PostPosted: Sat Oct 14, 2006 11:53 am    Post subject: Reply with quote

well i finaly was able to mount the dam partition..

#change the volumes that exist to active
vgchange -ay
Quote:
2 logical volume(s) in volume group "VolGroup00" now active

#mount the logical partition
mount /dev/VolGroup00/LogVol00 /mnt/gentoo

thank you for your help.
cheers
_________________
(8 Mars 2005 - 07:52:46)
(18 September 2017 - 11:25:35)
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sat Oct 14, 2006 4:38 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Other Things Gentoo.
Not about getting gentoo installed, so moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum