You are not logged in.

#226 2013-03-27 19:34:44

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Just write a fstab rule for the partition specifying the noauto option smile
The errors happens because truecrypt partitions are handled differently from the others and ldm doesn't know how to

Offline

#227 2013-04-24 05:03:28

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: ldm - Lightweight Device Mounter

I have a problem with a NTFS based external hard drive I use for back ups. Its gets mounted by ldm. But

 sudo umount 

does nothing. Trying to unmount the drive as root also does nothing.

All the other flash drives I throw at ldm are mounted fine and I can unmount without issues. Any ideas why umount has no effect ?

Offline

#228 2013-05-15 15:46:29

doragasu
Member
Registered: 2012-03-03
Posts: 152

Re: ldm - Lightweight Device Mounter

I cannot get this to work. I have installed it, and created the config file, but it does not work:

$ id -g
100
$ id -u
1000
$ cat /etc/conf.d/ldm
USER_GID=100
USER_UID=1000
$ ldm
ldm 0.4.1
2011-2013 (C) The Lemon Man
You have to run this program as root!
$ sudo ldm
ldm 0.4.1
2011-2013 (C) The Lemon Man
You must supply your gid/uid!

Offline

#229 2013-05-15 15:54:23

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: ldm - Lightweight Device Mounter

doragasu wrote:

I cannot get this to work. I have installed it, and created the config file, but it does not work:

$ id -g
100
$ id -u
1000
$ cat /etc/conf.d/ldm
USER_GID=100
USER_UID=1000
$ ldm
ldm 0.4.1
2011-2013 (C) The Lemon Man
You have to run this program as root!
$ sudo ldm
ldm 0.4.1
2011-2013 (C) The Lemon Man
You must supply your gid/uid!

Either enable to start with the computer, which is how it's supposed to work.

# systemctl enable ldm.service
# systemctl start ldm.service

Or if you want to run it manualy do it like this

# ldm -g 100 -u 1000

Last edited by theGunslinger (2013-05-15 15:55:23)

Offline

#230 2013-05-19 11:55:28

doragasu
Member
Registered: 2012-03-03
Posts: 152

Re: ldm - Lightweight Device Mounter

That was exactly the problem, now it's working like a charm. Thanks!!!

Offline

#231 2013-05-31 02:31:52

nil
Member
Registered: 2012-10-15
Posts: 33

Re: ldm - Lightweight Device Mounter

Like a few others in this thread, I'm having trouble unmounting things (via

udisks --unmount device

or

umount /path/to/device

, since ldm automatically mounts it again right away. I've enabled it through systemd, and as a temporary workaround, I can unmount my devices by issuing

systemctl stop ldm

(which will unmount everything), then unplug my desired device, then issue

systemctl start ldm

again. Has anyone figured out a true solution?

Offline

#232 2013-05-31 10:00:22

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: ldm - Lightweight Device Mounter

I've had a quick look and can't see that I have anything set-up out of the ordinary, apart form a patch I apply to ldm to mount to /mnt rather than /media. W
hen I umount  my sd card (which is my most often and ready to hand to double check device) it doesn't automatically get remounted by ldm.

I use the following command to umount it:

sudo -A umount /mnt/dirusedbyldm

The -A option tells sudo to use a dialog to get the password.
The directory gets deleted.
The ldm service file is the standard one.

If I eject then re-insert it, it mounts again.

Not sure what other information will help?


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#233 2013-06-05 17:28:05

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

pumount / sudo umount works just fine here.

Offline

#234 2013-06-12 22:19:09

aparthia
Member
Registered: 2010-09-04
Posts: 46

Re: ldm - Lightweight Device Mounter

Would it be possible to change the mount folder away from the deprecated /media to /var/run/mount or similar?

Offline

#235 2013-06-12 23:14:08

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

oh, sure. But I'd like to know when /media was deprecated as I can't find anything about it online...

Offline

#236 2013-06-13 00:20:00

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

Re: ldm - Lightweight Device Mounter

aparthia wrote:

Would it be possible to change the mount folder away from the deprecated /media to /var/run/mount or similar?

Oh no! That's way too much typing! I could get auto-completion finger!

Offline

#237 2013-06-13 00:40:28

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:

oh, sure. But I'd like to know when /media was deprecated as I can't find anything about it online...

It isn't deprecated however it no longer available in Arch installs since filesystem 2012.11-1. You can still create the directory manually; also its created/used by udisks (1 not 2).

Offline

#238 2013-06-13 00:43:34

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

Re: ldm - Lightweight Device Mounter

anonymous_user wrote:

It isn't deprecated however it no longer available in Arch installs since filesystem 2012.11-1.

Which, incidentally, renders ldm useless until /media is created. I meant to file a bug report about this but forgot.

Offline

#239 2013-06-13 08:42:06

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: ldm - Lightweight Device Mounter

I asked about this a month or few back (see up thread - there's also a link there to the relevant ml post), and changed the code to make the dir /mnt:

--- PKGBUILD	2013-03-10 13:37:38.000000000 +0000
+++ PKGBUILD.mnt	2013-03-12 11:20:54.728163257 +0000
@@ -18,6 +18,7 @@
   export LDFLAGS=""
 
   cd ${pkgname}-${pkgver}
+  sed -i 's;/media/;/mnt/;' ldm.c
   make
 }

I'm sure my change is sub-optimum, but it's been working fine.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#240 2013-06-13 11:22:49

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

I'm fine with changing the default path. Now, what's the upstream solution? /mnt or /var/run/mount?

Offline

#241 2013-06-13 11:37:55

progandy
Member
Registered: 2012-05-17
Posts: 5,180

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:

I'm fine with changing the default path. Now, what's the upstream solution? /mnt or /var/run/mount?

In my opinion /run/media is the right place, but I like /media more.
/mnt should be for static mounts, dynamic mounts should be in a different folder. Just add the directory in the package, no code patches needed. If you use /run/..., then an entry in tmpfiles.d is required.

PS: udisks uses /media, udisks2 has /run/media/USER/


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#242 2013-06-13 20:29:05

bdjnk
Member
Registered: 2009-08-24
Posts: 78

Re: ldm - Lightweight Device Mounter

edit: I've done more testing, and the issue seems to have resolved itself.

I just set up ldm and used it to mount my first device (which has two memory unit thingies) and this was the result in qtFM

20130613124443687x464sc.png

The situation was not as bad in PCManFM

20130613132458727x321sc.png

Still, the media folder was empty before I started ldm and plugged in my device. What is all that? Is this a known issue of some kind?

# lsblk /dev/sd*
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
...
sdc      8:32   1   1.9G  0 disk /media/8765-4321_
sdd      8:48   1    13G  0 disk /media/52FC-19EB_

Last edited by bdjnk (2013-06-13 20:39:14)

Offline

#243 2013-06-13 20:37:39

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

ldm adds a trailing _ when it can't make up the mountpoint name, namely when there's already one with the same name...this is weird.
Could you post the output of udisks --dump ?

Offline

#244 2013-06-13 20:44:02

bdjnk
Member
Registered: 2009-08-24
Posts: 78

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:

ldm adds a trailing _ when it can't make up the mountpoint name, namely when there's already one with the same name...this is weird.
Could you post the output of udisks --dump ?

The issue seems to have resolved itself with more testing. At this point udisks --dump shows only good, happy data.

My theory is that I was messing around with udisks and re-configuring my automounting system, and in the course of that fiddling, during which the device was plugged in, some unexpected things occurred.

Offline

#245 2013-06-17 07:24:42

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:

pumount / sudo umount works just fine here.

sudo umount works perfectly here with any usb stick (vfat). But only briefly unmounts my NTFS drive. Using htop I watched the mounting process  /sbin/mount.ntfs get killed when I issue the sudo umount command and then a second later it starts up again.

The drive is mounted in /media and owned by users.

I did git pull of ldm today.

Offline

#246 2013-07-23 20:21:30

mvdan
Member
Registered: 2012-02-17
Posts: 11

Re: ldm - Lightweight Device Mounter

Hey everyone,

Just started using ldm today, really a blast after trying to get udisks to work properly. The only thing that bugs me is the mounting of the rootfs and the home lvm partitions. I've seen some cases like that in this thread, where you guys suggest to use "noauto". Issue is, adding that will mean that these partitions won't get mounted at boot, correct? At least man fstab says so:

noauto do not mount when "mount -a" is given (e.g., at boot time)

Other than that, it works perfecty. Oh, and by the way, /media directories are not deleted if one shuts down the machine without unmounting the devices. Is this expected behaviour?

Edit: just read about truecrypt above. I use dmcrypt, so I guess it's the same issue. Any way around this? Perhaps a duplicate fstab rule?

Last edited by mvdan (2013-07-23 20:28:50)

Offline

#247 2013-07-23 23:43:24

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Are you using the latest git version ? ldm tries as hard as it can to unmount the devices at exit but can't do much if those are locked by some process...

Offline

#248 2013-07-24 09:07:10

mvdan
Member
Registered: 2012-02-17
Posts: 11

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:

Are you using the latest git version ? ldm tries as hard as it can to unmount the devices at exit but can't do much if those are locked by some process...

I am using the git package from the aur, yes. I'm pretty sure /media/* are not locked by anything on shutdown - although they are mounted on / and /home as well. Shouldn't mean they cannot be unmounted.

Anyway, this is odd. /dev/sda1 is mounted at /boot, so ldm doesn't mount it under media. Though /dev/mapper/{home,root} are mounted in media, even though they are already mounted in the same way. I thought having a device mounted would prevent ldm from mounting it at startup, even if it's encrypted under lvm.

EDIT: Here's my mtab:

/dev/mapper/lvm-root / ext4 rw,relatime,discard,data=ordered 0 0
/dev/sda1 /boot ext2 rw,relatime 0 0
/dev/mapper/lvm-home /home ext4 rw,relatime,discard,data=ordered 0 0
/dev/mapper/lvm-root /media/dcacb5b9-ea02-48eb-a0f4-2039b2b5c438_ ext4 rw,relatime,discard,data=ordered 0 0
/dev/mapper/lvm-home /media/ecc412d5-204a-4883-a024-f34b25de3572_ ext4 rw,relatime,discard,data=ordered 0 0
/dev/mapper/lvm-home /media/ecc412d5-204a-4883-a024-f34b25de3572__ ext4 rw,relatime,discard,data=ordered 0 0

This is on a second boot after a clean setup, you can see how the original dirs from first use were not deleted. At shutdown I can briefly see two dbus socket errors. Also, home was mounted twice on top of the original mount. Odd.

Last edited by mvdan (2013-07-24 09:28:15)

Offline

#249 2013-07-25 09:41:14

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

meh the kernel won't let unmount the root/home. This problem needs to be ironed out sometime, in the meanwhile you can just put a noauto label in your fstab

Offline

#250 2013-07-25 09:50:32

mvdan
Member
Registered: 2012-02-17
Posts: 11

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:

meh the kernel won't let unmount the root/home. This problem needs to be ironed out sometime, in the meanwhile you can just put a noauto label in your fstab

noauto on root would probably be OK, but wouldn't noauto on home mean that /home would not be mounted at boot?

Offline

Board footer

Powered by FluxBB