You are not logged in.

#126 2010-05-23 14:24:39

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: A very lightweight volume manager

orschiro wrote:

Udev currently only works for usb devices but not for internal dvd drives.

Hence my question.

Uncomment the dvd and cd lines fstab.

Offline

#127 2010-05-23 14:36:30

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: A very lightweight volume manager

^skottish.

Tried that and deactivated skvm daemon for testing but it isn't working with plain udev.

Here my fstab

[orschiro@thinkpad dvd]$ cat /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0

/dev/mapper/main-home /home ext4 defaults 0 1
/dev/mapper/main-root / ext4 defaults 0 1
/dev/mapper/main-swap swap swap defaults 0 0
/dev/sda1 /boot ext4 defaults 0 1

and here the udev-rule from the wiki which I'm using successfully for usb devices:

[orschiro@thinkpad rules.d]$ cat 11-media-by-label-auto-mount.rules 
KERNEL!="sd[a-z]*", GOTO="media_by_label_auto_mount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="media_by_label_auto_mount_end"
# Do not mount devices on boot because otherwise fsck may fail
ACTION=="add", PROGRAM!="/bin/grep ' / / rw[, ]' /proc/self/mountinfo", GOTO="media_by_label_auto_mount_end"

# Open luks partition if necessary
PROGRAM=="/sbin/blkid -o value -s TYPE %N", RESULT=="crypto_LUKS", ENV{crypto}="mapper/", ENV{device}="/dev/mapper/%k"
ENV{crypto}!="?*", ENV{device}="%N"
ACTION=="add", ENV{crypto}=="?*", PROGRAM=="/usr/bin/xterm -display :0.0 -e 'echo Password for /dev/%k; /usr/sbin/cryptsetup luksOpen %N %k'"
ACTION=="add", ENV{crypto}=="?*", TEST!="/dev/mapper/%k", GOTO="media_by_label_auto_mount_end"

# Global mount options
ACTION=="add", ENV{mount_options}="noatime,users"
# Filesystem specific options
ACTION=="add", PROGRAM=="/sbin/blkid -o value -s TYPE %E{device}", RESULT=="vfat|ntfs", ENV{mount_options}="%E{mount_options},utf8,gid=100,umask=002"

# Get label
ACTION=="add", PROGRAM=="/sbin/blkid -o value -s LABEL %E{device}", ENV{dir_name}="%c"
# Use basename to correctly handle labels such as ../mnt/foo
ACTION=="add", PROGRAM=="/usr/bin/basename '%E{dir_name}'", ENV{dir_name}="%c"
ACTION=="add", ENV{dir_name}!="?*", ENV{dir_name}="usbhd-%k"

ACTION=="add", ENV{dir_name}=="?*", RUN+="/bin/mkdir -p '/media/%E{dir_name}'", RUN+="/bin/mount -o %E{mount_options} /dev/%E{crypto}%k '/media/%E{dir_name}'"
ACTION=="remove", ENV{dir_name}=="?*", RUN+="/bin/umount -l '/media/%E{dir_name}'"
ACTION=="remove", ENV{crypto}=="?*", RUN+="/usr/sbin/cryptsetup luksClose %k"
ACTION=="remove", ENV{dir_name}=="?*", RUN+="/bin/rmdir '/media/%E{dir_name}'"
LABEL="media_by_label_auto_mount_end"

Offline

#128 2010-05-23 14:42:40

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: A very lightweight volume manager

Uncomment the dvd and cd lines.

Offline

#129 2010-05-23 14:53:39

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: A very lightweight volume manager

Ah now I understand. For some people uncomment means comment them out. This is what I did. So I had them always "uncommented" but it still didn't work in the past.

May I see your udev rule or are you using the same one?

Last edited by orschiro (2010-05-23 14:54:11)

Offline

#130 2010-05-23 14:55:35

Axis
Member
Registered: 2007-05-13
Posts: 60

Re: A very lightweight volume manager

Works perfectly! Great job!

Offline

#131 2010-05-23 14:59:41

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: A very lightweight volume manager

@orschiro

quite easy, actually wink

uncomment - unkommentiert
comment out - auskommentieren

Last edited by hokasch (2010-05-23 15:00:03)

Offline

#132 2010-05-23 20:56:51

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: A very lightweight volume manager

^hokasch,

allright I hope I'll remember this crib. tongue

/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
/dev/fd0               /media/fl   auto    user,noauto             0      0

But as I wrote above, nor it's working with uncommented entries.

Offline

#133 2010-05-23 22:09:16

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: A very lightweight volume manager

orschiro wrote:

^hokasch,

allright I hope I'll remember this crib. tongue

/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
/dev/fd0               /media/fl   auto    user,noauto             0      0

But as I wrote above, nor it's working with uncommented entries.

Well, it doesn't work because I was wrong. This thread is about skvm, so we should move this discussion elsewhere...

http://bbs.archlinux.org/viewtopic.php?id=97689

Offline

#134 2010-05-26 11:05:47

dimigon
Member
Registered: 2009-03-07
Posts: 139
Website

Re: A very lightweight volume manager

orschiro wrote:

Hello dimigon,

is there also a hal independent version of skvm possible since hal is more or less deprecated?

Regards

Hi, at some point I might rewrite skvm to use DeviceKit. I am not sure when though.

Offline

#135 2010-05-26 20:05:37

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: A very lightweight volume manager

^dimigon,

thanks for that clarification. Glad to hear from you again with another update of skvm. wink

Regards

Offline

#136 2010-07-06 13:44:33

dauerbaustelle
Member
Registered: 2010-02-07
Posts: 62

Re: A very lightweight volume manager

Any plans for a skvm version that drops hal? (and uses devicekit or something else)

Would be great to ban hal from the system. wink

Offline

#137 2010-07-06 13:47:40

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: A very lightweight volume manager

dauerbaustelle wrote:

Any plans for a skvm version that drops hal? (and uses devicekit or something else)

Would be great to ban hal from the system. wink

Look at 2 posts up from yours

Last edited by jac (2010-07-06 13:47:50)

Offline

Board footer

Powered by FluxBB