You are not logged in.

#1 2009-12-30 12:53:59

rggjan
Member
Registered: 2007-01-06
Posts: 69

automount usb-lvm

I have an LVM over multiple usb drives, and I would like them to be automounted.

Right now, I have the following lines in my rc.local:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
sleep 10 && \
vgchange -ay && \
mount /dev/data/movies /export/movies && \
mount /dev/data/public /export/public && \
mount /dev/data/photo /export/photo && \
mount /dev/data/music /export/music && \
mount /dev/data/projects /export/projects &

what works quite well for mounting everything at startup. But when the usb drives are not plugged in at startup, this does not work. I would like the drives to be automounted, too, when the computer has already started and I plug them in later on...

Any ideas?

Thanks already...

Offline

#2 2009-12-31 01:31:05

Gauvenator
Member
Registered: 2008-04-03
Posts: 172

Re: automount usb-lvm

you'll probably have to mess around with hal rules...unfortunately i dont have much experience with that but there is info on it if you google

Offline

#3 2009-12-31 09:47:16

rggjan
Member
Registered: 2007-01-06
Posts: 69

Re: automount usb-lvm

Actually, I'm not using hal at all. I thought about something like udev, but is there no easyer way?

Offline

#4 2009-12-31 19:10:01

Gauvenator
Member
Registered: 2008-04-03
Posts: 172

Re: automount usb-lvm

that's true you probably could make udev rules, but I can't remember if those rules work in realtime or only when 'udevadm trigger && udevadm settle' is issued

Offline

#5 2010-01-02 11:03:01

rggjan
Member
Registered: 2007-01-06
Posts: 69

Re: automount usb-lvm

No, I think it should work. I did something similar to automagically start a backup when I plug in a certain drive.

But it is cumbersome to do it for so many different drives...

Offline

Board footer

Powered by FluxBB