Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
writing udev rules for lvm volume groups.
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
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Sun Dec 06, 2009 9:00 pm    Post subject: writing udev rules for lvm volume groups. Reply with quote

Basically I want to do what is in this ubuntu thread:

http://ubuntuforums.org/showthread.php?t=946858

I need:
# ls /dev/vg_2t0 -ald
drwx------ 2 root root 140 Dec 5 20:33 /dev/vg_2t0

to be

drwxr-x--- 2 root disk 140 Dec 5 20:33 /dev/vg_2t0

I have written udev rules in the past but not sure what to do with lvm
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Dec 07, 2009 11:57 am    Post subject: Reply with quote

Could you use the device in /dev/mapper?
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Dec 07, 2009 2:26 pm    Post subject: Reply with quote

I believe that is an option. The purpose of this is I need to give kvm users full access to the raw lvm partition.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Dec 07, 2009 2:31 pm    Post subject: Reply with quote

how do you configure kvm to see the device?
Is there a command you run to start each kvm instance?
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Dec 07, 2009 2:35 pm    Post subject: Reply with quote

something like

Code:
qemu-system-x86_64  -smp 3 -m 3096  /dev/vg_2t0/kvm_disk -usbdevice tablet -vnc :1


There is also some need for using virtualbox with the same raw disk. So I have created a .vmdk for that.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Dec 07, 2009 2:41 pm    Post subject: Reply with quote

I take it you run that as root? or does the user run that command?
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Dec 07, 2009 2:51 pm    Post subject: Reply with quote

At first I had the problem and use sudo to get around that. Later I manually changed the permissions so I did not need sudo and that worked fine. After that I did a google search for writing udev rules for lvm but that did not turn up the answer so I asked here..
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Dec 07, 2009 2:53 pm    Post subject: Reply with quote

I believe writing a udev rule for just

/dev/mapper/vg_2t0-kvm_disk

will work and probably be a lot simpler.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
opotonil
l33t
l33t


Joined: 17 Jun 2005
Posts: 801
Location: 127.0.0.1

PostPosted: Mon Dec 07, 2009 8:19 pm    Post subject: Reply with quote

You can see a example at last post, go to link:

https://forums.gentoo.org/viewtopic-t-760709-highlight-kvm.html

Sorry for my english, bye.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Dec 07, 2009 8:36 pm    Post subject: Reply with quote

Thanks. On top of the code blocks, I actually can read some of that...

However I guarantee your English is better than my spanish.
_________________
John

My gentoo overlay
Instructons for overlay
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