You are not logged in.
Hello everyone, I've hacked together a simple lightweight volume manager simply because I am using wmii and I did not want to use any gnome-related mounting daemons. It is meant to be short, simple and straight to the point. It works as expected with cdroms/dvds/usb devices/cameras etc. I hope it can be of use to anyone who is in similar needs. Feedback and requests are highly appreciated.
*edit*
To clone the latest development snapshot use hg clone http://code.suckless.org/hg/skvm
http://aur.archlinux.org/packages.php?ID=26195
Last edited by dimigon (2009-05-21 10:34:03)
Offline
hi dimigon.
this is _exactly_ what i've been looking for. i'll try it out and report back later!
thanks for the work you've done!
Offline
I liked it very much.
Some comments:
- a bit strange that the mount folder sometimes is named by the UID
- very little documentation, deps? version?
made a PKGBUILD(but it's not correct as I don't know the package ver. and deps(including hal and dbus because they are obvious):
pkgname=skvm
pkgver=1
pkgrel=1
pkgdesc="Lightweight volume manager"
arch=(i686 x86_64)
depends=('hal' 'dbus')
source=(http://www.macs.hw.ac.uk/~dp69/skvm.tar.bz2)
md5sums=('c18fcc9ac17df364a2bf29a532afd3ca')
license=('GPL')
build() {
cd "${srcdir}/${pkgname}"
make || return 1
mkdir ${startdir}/pkg/usr/
mkdir ${startdir}/pkg/usr/bin/
mkdir ${startdir}/pkg/etc/
mkdir ${startdir}/pkg/etc/rc.d/
install -m 755 ${srcdir}/${pkgname}/skvm ${startdir}/pkg/usr/bin/skvm
install -m 755 ${srcdir}/${pkgname}/skvm_init ${startdir}/pkg/etc/rc.d/skvm_init
}
Offline
Brilliant, too brilliant... It works like a charm. However (nagging mode on), I have some stuff I'd like to have mounted according to /etc/fstab. I haven't really tested it, but is that supported? Or would that be too hard? :s
My coding blog (or an attempt at it)
Archer start page (or an attempt at it)
Offline
Sorry for askin, do I need to add skvm to daemons in rc.conf? (probably a stupid question)
box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle
Offline
I liked it very much.
Some comments:
- a bit strange that the mount folder sometimes is named by the UID
- very little documentation, deps? version?made a PKGBUILD(but it's not correct as I don't know the package ver. and deps(including hal and dbus because they are obvious):
pkgname=skvm pkgver=1 pkgrel=1 pkgdesc="Lightweight volume manager" arch=(i686 x86_64) depends=('hal' 'dbus') source=(http://www.macs.hw.ac.uk/~dp69/skvm.tar.bz2) md5sums=('c18fcc9ac17df364a2bf29a532afd3ca') license=('GPL') build() { cd "${srcdir}/${pkgname}" make || return 1 mkdir ${startdir}/pkg/usr/ mkdir ${startdir}/pkg/usr/bin/ mkdir ${startdir}/pkg/etc/ mkdir ${startdir}/pkg/etc/rc.d/ install -m 755 ${srcdir}/${pkgname}/skvm ${startdir}/pkg/usr/bin/skvm install -m 755 ${srcdir}/${pkgname}/skvm_init ${startdir}/pkg/etc/rc.d/skvm_init }
Hello! Thanks for the PKGBUILD! To answer your questions, it does use the uuid in case there is a folder with the same name as the usb's label or when the label is blank. This can easily be changed to something more practical. I shall make some documentation and I will post it here as an update.
Last edited by dimigon (2009-04-04 01:53:10)
Offline
Sorry for askin, do I need to add skvm to daemons in rc.conf? (probably a stupid question)
Yes add it at the end of the daemons part in your rc.conf Make sure HAL and DBUS are there as well.
Last edited by dimigon (2009-04-04 01:38:03)
Offline
Brilliant, too brilliant... It works like a charm. However (nagging mode on), I have some stuff I'd like to have mounted according to /etc/fstab. I haven't really tested it, but is that supported? Or would that be too hard? :s
I've already thought about using /etc/fstab to establish mount points. It is not supported at the moment and no it is not too hard to implement. I will post an update once I've got some time to work on that.
Last edited by dimigon (2009-04-04 01:38:32)
Offline
@ dimigon, I thought it would be a nice place for skvm to be. Just to be assured
I used PKGBUILD (thanks jerryluc), all good, going to test period, check back with results later.
box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle
Offline
hi dimigon.
i just tried your daemon and it is in fact really brilliant. also thanks for providing PKGBUILD to jerryluc!
the only comment so far would be to use something like sdX as mount mounts instead of the uuids, but that's really something that should not be too difficult to change. fstab support would be awesome.
one question, though: is possible to mount LUKS-crypted partitions as well? that would really rock!
keep up the good work!
Offline
About the naming: +1 for the naming after sdX,
it does use the uuid in case there is a folder with the same name as the usb's label or when the label is blank.
this is probably ok, but it's not working perfect. skvm mounted my external disk "WD \Passport" the first time, but since skvm created that folder the next time it mounted it by uid.
Another thing: skvm did mount my ntfs external disk, but only with read permissions for root.
Offline
hi dimigon.
i just tried your daemon and it is in fact really brilliant. also thanks for providing PKGBUILD to jerryluc!
the only comment so far would be to use something like sdX as mount mounts instead of the uuids, but that's really something that should not be too difficult to change. fstab support would be awesome.
one question, though: is possible to mount LUKS-crypted partitions as well? that would really rock!
keep up the good work!
It is not possible to mount crypted partitions yet, but that can be added quite easily. I'll look into that as well. Fstab support is almost underway.
About the naming: +1 for the naming after sdX,
it does use the uuid in case there is a folder with the same name as the usb's label or when the label is blank.
this is probably ok, but it's not working perfect. skvm mounted my external disk "WD \Passport" the first time, but since skvm created that folder the next time it mounted it by uid.
Another thing: skvm did mount my ntfs external disk, but only with read permissions for root.
Normally when you insert a device and it mounts it the first time, then if you umount it and remove it, it removes the folder with that name so no further collisions take place. I have not tried any ntfs drives so far, but I usually have a problem when I use mount as well. Ntfs-3g might actually do the trick.
Last edited by dimigon (2009-04-04 12:00:34)
Offline
Awesome app! I did something similiar with Perl, but I like your idea of using label names.
Any plans on putting this up on github or the like so we can track the development?
Thanks! Great job!
Neoxic
http://digital-drip.com
Offline
Awesome app! I did something similiar with Perl, but I like your idea of using label names.
Any plans on putting this up on github or the like so we can track the development?
Thanks! Great job!
Sure, that would be awesome! I will post the details soon.
Last edited by dimigon (2009-04-04 12:57:46)
Offline
tried the PKGBUILD but failed with "One or more files did not pass the validity check!" is that md5sum no longer valid? can i have the new one? thanks, looking forward to this it's just what i've been looking for.
//github/
Offline
tried the PKGBUILD but failed with "One or more files did not pass the validity check!" is that md5sum no longer valid? can i have the new one? thanks, looking forward to this it's just what i've been looking for.
The md5sum is not valid as I keep updating the original archive. The best way to try it out is to follow the instructions outlined in the README file or change the md5 in the PKGBUILD file. Keep in mind this program is still in development. Once I've settled with a final stable release I am just gonna use AUR to distribute it.
Last edited by dimigon (2009-04-04 19:48:44)
Offline
Incredible, this is exactly what I was looking for. Works like a charm.
Offline
Thanks for starting a repo! Looking great!
Neoxic
http://digital-drip.com
Offline
And here's PKGBUILD for the git version:
# Contributor: Ondrej Martinak <omartinak@gmail.com>
pkgname=skvm-git
pkgver=20090415
pkgrel=1
pkgdesc="Lightweight volume manager"
arch=('i686' 'x86_64')
url="http://github.com/dimigon/skvm/tree/master"
license=('GPL')
depends=('hal' 'dbus')
makedepends=('git')
conflicts=('skvm')
provides=('skvm')
_gitroot="git://github.com/dimigon/skvm.git"
_gitname="skvm"
build() {
cd ${srcdir}
msg "Connecting to GIT server..."
if [ -d $_gitname ]; then
cd $_gitname && git pull origin
cd ..
msg "The local files are updated."
else
git clone $_gitroot
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf $_gitname-build
cp -r $_gitname $_gitname-build
cd $_gitname-build
make || return 1
mkdir -p ${startdir}/pkg/usr/bin
mkdir -p ${startdir}/pkg/etc/rc.d
install -m 755 skvm ${startdir}/pkg/usr/bin/skvm
install -m 755 init/skvm ${startdir}/pkg/etc/rc.d/skvm
}
Btw thanks for the app, it's pretty cool .
ARCH64 | i3
I laugh in the face of kernel errors. -haxit
Offline
It works just perfect! I no longer have to open Thunar just to mount my external drives. Thank
you so much, I've been looking for something like this ever since I became a xmonad addict.
My Configs @ Github
Offline
It works just perfect! I no longer have to open Thunar just to mount my external drives. Thank
you so much, I've been looking for something like this ever since I became a xmonad addict.
Of course, "thunar --daemon" would have also worked for you, had you known about it.
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
[final edit]scratch all that, i'm a liar.. it was a fat16 formatted thumb drive with no LABEL, reformatted fat32 with LABEL and your program worked fine. in any case, you might like to know if you use your daemon with a fat16 labeless drive you get this...[/edit]
it mounted it to /mnt/backup_monthly where i already had a 320G backup drive mounted. clobberred some files (but only some), nothing important luckily. any idea why it would do this?
edit: hmm maybe the thumb drive didn't have a label. and it's UID seems odd (3B36-6393) is that a fat16 UID? pcmanfm mounts it to /media/disk when i click on it. your program for some reason chose to use an existing mountpoint? here's the fstab line for the drive it over-mounted. maybe it's just a corner case that confused it.
LABEL=320G /mnt/backup_monthly ext3 defaults 0 0
edit2: tried it with a more 'normal' thumb drive, worked great. i must've messed up that flash drive somehow. it was my fault, but still seems an odd way to handle the error, to overmount an existing drive.
anyways, really useful program thanks for writing it.
Last edited by brisbin33 (2009-04-16 00:32:40)
//github/
Offline
I like the idea of a lightweight volume manager, but I can't seem to figure out skvm. I have skvm run as a daemon, and it mounts external hdd/flash sticks by label or uuid. But why do I need /usr/bin/skvm for? And you(dimigon) said that it deleted the directory when it was unmounted, is that when you unmount with skvm in some way I haven't figured out?
edit: figured out why I needed /usr/bin/skvm. But still don't get the unmount and deletion of directories part?
Last edited by jerryluc (2009-04-16 10:11:35)
Offline
And here's PKGBUILD for the git version:
# Contributor: Ondrej Martinak <omartinak@gmail.com> pkgname=skvm-git pkgver=20090415 pkgrel=1 pkgdesc="Lightweight volume manager" arch=('i686' 'x86_64') url="http://github.com/dimigon/skvm/tree/master" license=('GPL') depends=('hal' 'dbus') makedepends=('git') conflicts=('skvm') provides=('skvm') _gitroot="git://github.com/dimigon/skvm.git" _gitname="skvm" build() { cd ${srcdir} msg "Connecting to GIT server..." if [ -d $_gitname ]; then cd $_gitname && git pull origin cd .. msg "The local files are updated." else git clone $_gitroot fi msg "GIT checkout done or server timeout" msg "Starting make..." rm -rf $_gitname-build cp -r $_gitname $_gitname-build cd $_gitname-build make || return 1 mkdir -p ${startdir}/pkg/usr/bin mkdir -p ${startdir}/pkg/etc/rc.d install -m 755 skvm ${startdir}/pkg/usr/bin/skvm install -m 755 init/skvm ${startdir}/pkg/etc/rc.d/skvm }
Btw thanks for the app, it's pretty cool .
I've added the PKGBUILD to the repository. Thanks for the contribution.
[final edit]scratch all that, i'm a liar.. it was a fat16 formatted thumb drive with no LABEL, reformatted fat32 with LABEL and your program worked fine. in any case, you might like to know if you use your daemon with a fat16 labeless drive you get this...[/edit]
it mounted it to /mnt/backup_monthly where i already had a 320G backup drive mounted. clobberred some files (but only some), nothing important luckily. any idea why it would do this?
edit: hmm maybe the thumb drive didn't have a label. and it's UID seems odd (3B36-6393) is that a fat16 UID? pcmanfm mounts it to /media/disk when i click on it. your program for some reason chose to use an existing mountpoint? here's the fstab line for the drive it over-mounted. maybe it's just a corner case that confused it.
LABEL=320G /mnt/backup_monthly ext3 defaults 0 0
edit2: tried it with a more 'normal' thumb drive, worked great. i must've messed up that flash drive somehow. it was my fault, but still seems an odd way to handle the error, to overmount an existing drive.
anyways, really useful program thanks for writing it.
I will look into that.
I like the idea of a lightweight volume manager, but I can't seem to figure out skvm. I have skvm run as a daemon, and it mounts external hdd/flash sticks by label or uuid. But why do I need /usr/bin/skvm for? And you(dimigon) said that it deleted the directory when it was unmounted, is that when you unmount with skvm in some way I haven't figured out?
edit: figured out why I needed /usr/bin/skvm. But still don't get the unmount and deletion of directories part?
The latest development snapshot does not use the UUID anymore as a directory name for the mount point, instead it uses the associated device file. When you insert the device, skvm mounts it at some directory, then before you remove the device you unmount it manually like you do using umount(8) and then you remove the device from the computer. When you unplug the device, skvm will delete the mount point (the directory). In the rare case where two devices have the same label and there is an entry in /etc/fstab for that label, then there will be stacked as they will be mounted under the same directory. So when you unplug the last one, the directory will not be removed because it is used by the first device still. When you unplug the first device, it will be removed. Hope its clear now
Last edited by dimigon (2009-04-17 11:48:20)
Offline
This seems like it will fit what I've been trying do. I'll try it when I get home (posting just so I can be sure to find this later).
mu @ freenode - Last.fm
Offline