LinuxQuestions.org
Review your favorite Linux distribution.
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 03-22-2004, 02:19 PM   #1
dworkin
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: desktop = mandrake 10 / laptop = mandrake 9.1
Posts: 34

Rep: Reputation: 15
LVM problems, device-mapper missing


Im attempting to turn an old pc of mine into a pvr useing MythTV. I have madrake 10.0 installed on it.

Currently I have limited disk space so in following the mythtv how-to, Im attempting to set up a logical vloume useing LVM2 so when I can afford to add more disk space later, it will be easier?

so after some head scratching, doc searching, man page reading, I figured out fdisk and created a partition useing type 8e for LVM. used pvcreate on it succesfully and then vgcreate, though I got a strange error msg about my cdrom?

[root@localhost /]# vgcreate VGforMyth -s 64m /dev/hdb1
/dev/cdrom: open failed: Read-only file system
Volume group "VGforMyth" successfully created
[root@localhost /]#

so the next step in the MythTV how-to was to use lvcreate. but I got the following errors.

[root@localhost /]# lvcreate --name video --size 3G VGforMyth
/dev/cdrom: open failed: Read-only file system
/dev/mapper/control: open failed: No such file or directory
Is device-mapper driver missing from kernel?
Failed to activate new LV.
[root@localhost /]#

So I dug around a bit searching for answers, i found a dev mapper package, i forget the exact name, installed it. tried the lvcreate again.

[root@localhost /]# lvcreate --name video --size 3G VGforMyth
/dev/cdrom: open failed: Read-only file system
Logical volume "video" already exists in volume group "VGforMyth"
[root@localhost /]#

thinking the device-mapper error was just an anomaly simmilare to the cd rom messages, I thought I was ready to move on so I tried to put a file system on my logical volume.

[root@localhost /]# mkreiserfs /dev/VGforMyth/video
mkreiserfs 3.6.11
stat failed: No such file or directory
[root@localhost /]#

searching around some more, I found this in a LVM faq.

Quote:
4.1.2. I get errors about /dev/mapper/control when I try to use the LVM 2 tools. What's going on?

The primary cause of this is not having run the devmap_mknod.sh script after rebooting into a dm capable kernel. This script generates the control node for device mapper.
I don't seem to have the devmap_mknode.sh script though so this did not help yet.

I tried removing my logical volume.

[root@localhost dev]# lvremove /dev/VGforMyth/video
/dev/cdrom: open failed: Read-only file system
/dev/mapper/control: open failed: No such file or directory
Is device-mapper driver missing from kernel?
Unable to deactivate logical volume "video"
[root@localhost dev]#

then I tried to add it back but got the same error that it already exists still.

Sorry for the long post, I wasn't sure how to state my exact problem with out examples. again Im running mandrake 10.0.

so my questions,
1. How do I install a device mapper?
2. why are the LVM tools trying to open my cdrom?
3. (somewhat related) my /etc/fstab file still has mappings to mount the partions I erased with fdisk, will I need to erase them and add one for my new logical volume if I ever get it created?

Thanks for any tips or advice you can give this confused linux newb.

dworkin
 
Old 03-22-2004, 04:20 PM   #2
dworkin
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: desktop = mandrake 10 / laptop = mandrake 9.1
Posts: 34

Original Poster
Rep: Reputation: 15
Well amazingly enough, a reboot fixed me up. apparently that mapper rpm I installed needed a reboot to get it working.

I still get the can't write to CD errors for some reason useing various LVM commands even though I specify hdb and not hdc?

and as par for the course, I solve one issue and another springs up. Now Im having trouble mounting my new logical partition. I used mkreiserfs on it ok but when I try to mount it ...

[root@localhost etc]# mount /dev/VGforMyth/video /var/video
mount: mount point /var/video does not exist
[root@localhost etc]#

I'm guessing I either need to reboot again after running mkreiserfs or I need to put an entry in my /etc/fstab file. Im a little leary of mesing with that fstab file though so any tips will still be appreciated.

dworkin

incase your curious, heres my new logical drive info.

[root@localhost etc]# vgdisplay -v
Finding all volume groups
/dev/cdrom: open failed: Read-only file system
Finding volume group "VGforMyth"
--- Volume group ---
VG Name VGforMyth
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 255
Cur LV 1
Open LV 0
Max PV 255
Cur PV 1
Act PV 1
VG Size 3.00 GB
PE Size 64.00 MB
Total PE 48
Alloc PE / Size 48 / 3.00 GB
Free PE / Size 0 / 0
VG UUID tfsAz6-rHFn-YrQK-XUoz-ZSqP-8In9-7jwRZa

--- Logical volume ---
LV Name /dev/VGforMyth/video
VG Name VGforMyth
LV UUID 5GvQuD-G9kc-GJRp-upwI-4l4p-06TA-TBzBVK
LV Write Access read/write
LV Status available
# open 0
LV Size 3.00 GB
Current LE 48
Segments 1
Allocation next free (default)
Read ahead sectors 0
Block device 254:0

--- Physical volumes ---
PV Name /dev/hdb1
PV UUID OHwSEh-S19V-kiXl-o2t7-MZeo-IVcF-WtZynG
PV Status allocatable
Total PE / Free PE 48 / 0

[root@localhost etc]#
 
Old 03-22-2004, 04:21 PM   #3
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
last time I checked, /dev/cdrom was a read only filesystem , namely iso9660 according to mount.

cant you create an LVM on an anolog media, like a hard drive.
 
Old 03-22-2004, 04:54 PM   #4
dworkin
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: desktop = mandrake 10 / laptop = mandrake 9.1
Posts: 34

Original Poster
Rep: Reputation: 15
AutOPSY,

I did create the LVM on a hard drive. Thats why im curious as to why it keeps trying to open my cdrom drive. My guess is that its just searching all my media to see if an LVM already exists and when it hits the cdrom it spits out that error.
 
  


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
Custom kernel - lilo complains device-mapper missing donni Linux - Software 3 07-26-2010 12:47 PM
Does Mandrake 10.1 has device mapper? edccorp Mandriva 2 03-20-2005 08:51 AM
installing device-mapper aaronj Linux - Software 1 10-02-2004 02:00 AM
lvm 2 device-mapper Kroenecker Linux - Newbie 4 12-29-2003 11:19 AM
LVM and device-mapper instalation- Help zick Linux - General 0 10-29-2003 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:26 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
Open Source Consulting | Domain Registration