Re: [dwm] skvm - suckless lightweight volume manager
thankyou all guys :) i'll think i wanna stay with thunar to mount/umount usb's On 5/4/09, bill lam wrote: > On Sun, 03 May 2009, Leandro Chescotta wrote: >> http://github.com/dimigon/skvm/tree/master >> >> Well, by far im lovin' it, I started the daemon and pluged in a usb >> drive and i now have the drive mounted in /media with the name gived >> by /dev/sdX[n] device name, the thing is that i dont know how to >> umount a drive, or just plugin the usb drive off is sufficient? >> without umounting? because it's not mentioned in the readme. > > I don't know bcz I've never used it. However I know it is possible to > mount usb with sync option so that the write cache is always flushed > and the daemon umount the usb /after/ it received the signal that the > usb has been unplugged. > > -- > regards, > > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > 唐詩149 司空曙 賊平後送人北歸 > 世亂同南去 時清獨北還 他鄉生白髮 舊國見青山 > 曉月過殘壘 繁星宿故關 寒禽與衰草 處處伴愁顏 > > -- - http://aleyscha.spaces.live.com/ ""El lugar mas peligroso de todos es el cielo... En el, cada pensamiento se hace realidad... sea bueno o malo... creas tu paraiso o tu infierno""
Re: [dwm] skvm - suckless lightweight volume manager
On Sun, 03 May 2009, Leandro Chescotta wrote: > http://github.com/dimigon/skvm/tree/master > > Well, by far im lovin' it, I started the daemon and pluged in a usb > drive and i now have the drive mounted in /media with the name gived > by /dev/sdX[n] device name, the thing is that i dont know how to > umount a drive, or just plugin the usb drive off is sufficient? > without umounting? because it's not mentioned in the readme. I don't know bcz I've never used it. However I know it is possible to mount usb with sync option so that the write cache is always flushed and the daemon umount the usb /after/ it received the signal that the usb has been unplugged. -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩149 司空曙 賊平後送人北歸 世亂同南去 時清獨北還 他鄉生白髮 舊國見青山 曉月過殘壘 繁星宿故關 寒禽與衰草 處處伴愁顏
Re: [dwm] skvm - suckless lightweight volume manager
On Mon, May 04, 2009 at 08:33:11AM +0800, bill lam wrote:
> On Sun, 03 May 2009, Leandro Chescotta wrote:
> > yes, i dont know how to mount as user instead of root with skvm too, i
> > think a sudo umount /dev/sdX[n] with be ok, but i really like the
> > devices to be mounted as my user
>
> I only use one dvd drive and use one usb at a time. I use pmount but I
> think that you still have to add yourself to a particular group before
> you can use pmount.
i used something similar but with simple mount.
> static const char *mountusb[] = { "pmount", "/dev/sda1", NULL };
> { MODKEY, XK_F2, spawn, {.v =
> mountusb } },
on my system i need to add something like
hirobonsai=NOPASSWD:/sbin/mount
to my /etc/sudoers and then i can bind
$ sudo /sbin/mount -o uid=1000 /dev/sda1 /mnt/usb
to keystrokes (my user has user id 1000).
regards, y0shi
Re: [dwm] skvm - suckless lightweight volume manager
On Sun, 03 May 2009, Leandro Chescotta wrote:
> yes, i dont know how to mount as user instead of root with skvm too, i
> think a sudo umount /dev/sdX[n] with be ok, but i really like the
> devices to be mounted as my user
I only use one dvd drive and use one usb at a time. I use pmount but I
think that you still have to add yourself to a particular group before
you can use pmount.
extract of my config.h
static const char *mountcdrom[] = { "pmount", "/dev/cdrom", NULL };
static const char *umountcdrom[] = { "pumount", "/dev/cdrom", NULL };
static const char *mountusb[] = { "pmount", "/dev/sda1", NULL };
static const char *umountusb[] = { "pumount", "/dev/sda1", NULL };
.
static Key keys[] = {
..
{ MODKEY, XK_F1, spawn, {.v =
mountcdrom } },
{ MODKEY|ShiftMask, XK_F1, spawn, {.v =
umountcdrom } },
{ MODKEY, XK_F2, spawn, {.v =
mountusb } },
{ MODKEY|ShiftMask, XK_F2, spawn, {.v =
umountusb } },
Mount points will be created and removed automatically under /media
of my debian.
--
regards,
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩191 杜甫 詠懷古跡五首之二
搖落深知宋玉悲 風流儒雅亦吾師 悵望千秋一灑淚 蕭條異代不同時
江山故宅空文藻 雲雨荒臺豈夢思 最是楚宮俱泯滅 舟人指點到今疑
Re: [dwm] skvm - suckless lightweight volume manager
yes, i dont know how to mount as user instead of root with skvm too, i think a sudo umount /dev/sdX[n] with be ok, but i really like the devices to be mounted as my user I think i'll be using thunar for the time being... On 5/3/09, Preben Randhol wrote: > On Sun, 3 May 2009 12:21:58 -0300 > Leandro Chescotta wrote: > >> Well, by far im lovin' it, I started the daemon and pluged in a usb >> drive and i now have the drive mounted in /media with the name gived >> by /dev/sdX[n] device name, the thing is that i dont know how to >> umount a drive, or just plugin the usb drive off is sufficient? >> without umounting? because it's not mentioned in the readme. > > No. I have experience corrupted fs due to removing the usb too soon. > Now, I use thunar for mounting/unmounting usbs and transfer files (I > don't like automount). > > Good luck > > Preben > > -- - http://aleyscha.spaces.live.com/ ""El lugar mas peligroso de todos es el cielo... En el, cada pensamiento se hace realidad... sea bueno o malo... creas tu paraiso o tu infierno""
Re: [dwm] skvm - suckless lightweight volume manager
On Sun, 3 May 2009 12:21:58 -0300 Leandro Chescotta wrote: > Well, by far im lovin' it, I started the daemon and pluged in a usb > drive and i now have the drive mounted in /media with the name gived > by /dev/sdX[n] device name, the thing is that i dont know how to > umount a drive, or just plugin the usb drive off is sufficient? > without umounting? because it's not mentioned in the readme. No. I have experience corrupted fs due to removing the usb too soon. Now, I use thunar for mounting/unmounting usbs and transfer files (I don't like automount). Good luck Preben
Re: [dwm] skvm - suckless lightweight volume manager
I use a simple script, the only requirement is that the usb drive must
has a label.
to mount new usb drives: usbmount
to umount a usb drive: pumount /media/label
to umount all the usb drives: usbmount -u
# usbmount
#!/bin/sh
label="/dev/disk/by-label/"
options="--noatime"
usb_disk=`ls $label`
mounted=`df | grep "media" | awk '{ print $6 }' `
for name in $usb_disk
do
if [ "$1" != "-u" ]
then
echo $mounted | grep "/media/$name" > /dev/null
if [ $? -eq 1 ]
then
pmount "$options" "$label""$name" "/media/$name"
echo "$name mounted"
fi
else
echo $mounted | grep "/media/$name" > /dev/null
if [ $? -eq 0 ]
then
pumount "/media/$name"
echo "$name umounted"
fi
fi
done
On Sun, May 3, 2009 at 5:21 PM, Leandro Chescotta
wrote:
> http://github.com/dimigon/skvm/tree/master
>
> Well, by far im lovin' it, I started the daemon and pluged in a usb
> drive and i now have the drive mounted in /media with the name gived
> by /dev/sdX[n] device name, the thing is that i dont know how to
> umount a drive, or just plugin the usb drive off is sufficient?
> without umounting? because it's not mentioned in the readme.
>
> --
>
> -
> http://aleyscha.spaces.live.com/
>
> ""El lugar mas peligroso de todos es el cielo... En el, cada
> pensamiento se hace realidad... sea bueno o malo... creas tu paraiso o
> tu infierno""
>
>
[dwm] skvm - suckless lightweight volume manager
http://github.com/dimigon/skvm/tree/master Well, by far im lovin' it, I started the daemon and pluged in a usb drive and i now have the drive mounted in /media with the name gived by /dev/sdX[n] device name, the thing is that i dont know how to umount a drive, or just plugin the usb drive off is sufficient? without umounting? because it's not mentioned in the readme. -- - http://aleyscha.spaces.live.com/ ""El lugar mas peligroso de todos es el cielo... En el, cada pensamiento se hace realidad... sea bueno o malo... creas tu paraiso o tu infierno""
