Re: [systemd-devel] systemd vs udev automount

2017-10-09 Thread Reindl Harald



Am 09.10.2017 um 20:00 schrieb Paul D. DeRocco:

From: Mantas Mikulenas [mailto:graw...@gmail.com]

Just configure "/dev/disk/by-label/FOOBAR" (or possibly
"LABEL=FOOBAR") as the mount source.


Duh. I never noticed LABEL in the fstab man page. Pretty simple. Thanks


LABEL was used for many years before UUID became common
hence commands like e2label

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd vs udev automount

2017-10-09 Thread Paul D. DeRocco
> From: Mantas Mikulenas [mailto:graw...@gmail.com] 
> 
> Just configure "/dev/disk/by-label/FOOBAR" (or possibly 
> "LABEL=FOOBAR") as the mount source.

Duh. I never noticed LABEL in the fstab man page. Pretty simple. Thanks.

-- 

Ciao,   Paul D. DeRocco
Paulmailto:pdero...@ix.netcom.com

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd vs udev automount

2017-10-08 Thread Mantas Mikulėnas
On Sun, Oct 8, 2017 at 9:43 PM, Paul D. DeRocco 
wrote:

> > From: Zbigniew Jedrzejewski-Szmek [mailto:zbys...@in.waw.pl]
> >
> > I don't see why you'd need to use automounting for a partition on the
> > main disk. Just put it in /etc/fstab in the usual manner, and it'll
> > get mounted very early in boot.
>
> As I recall, I added udev-extraconf a couple of years ago when I wanted
> one of my systems to be portable to different motherboards or different
> mass storage devices. I didn't want the user to have to edit fstab somehow
> before putting the system together. If I get rid of udev-extraconf, is
> there a way to use a mount unit to specify a partition by some sttributes,
> e.g., a FAT file system with a volume name of FOOBAR? Or is there a way to
> do this directly with a udev rule?
>

Just configure "/dev/disk/by-label/FOOBAR" (or possibly "LABEL=FOOBAR") as
the mount source.

-- 
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd vs udev automount

2017-10-08 Thread Paul D. DeRocco
> From: Zbigniew Jedrzejewski-Szmek [mailto:zbys...@in.waw.pl] 
> 
> I don't see why you'd need to use automounting for a partition on the
> main disk. Just put it in /etc/fstab in the usual manner, and it'll
> get mounted very early in boot.

As I recall, I added udev-extraconf a couple of years ago when I wanted
one of my systems to be portable to different motherboards or different
mass storage devices. I didn't want the user to have to edit fstab somehow
before putting the system together. If I get rid of udev-extraconf, is
there a way to use a mount unit to specify a partition by some sttributes,
e.g., a FAT file system with a volume name of FOOBAR? Or is there a way to
do this directly with a udev rule?

-- 

Ciao,   Paul D. DeRocco
Paulmailto:pdero...@ix.netcom.com

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd vs udev automount

2017-10-08 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Oct 08, 2017 at 12:16:33AM -0700, Paul D. DeRocco wrote:
> I've got a system (actually two similar systems) built with Yocto that use
> systemd, but also have the udev-extraconf package, which includes a udev
> rule and associated mount.sh script for automounting. It's doing strange
> things, like mounting an additional partition on my main disk (which is
> good), and then quietly unmounting it unless it is also listed in
> /etc/fstab (which is bad). When it works, I see systemd messages in
> journalctl about automounting, in addition to the messages generated by
> the udev mount.sh, making me think these two systems are fighting with
> each other. Is it possible that after mount.sh mounts it, systemd kicks
> in, finds it's not in fstab, and unmounts it without logging anything?

systemd will not umount things mounted externally, in general.
In previous systemd versions there were some bugs in this area, and
things did get unmounted; all those bugs have been fixed a while back.
It's hard to say anything more without even knowing what systemd version
you're using, what downstream patches, etc.
udev-extraconf is not a systemd project, so you're probably better off
asking the maintainers of that package.
 
> But if I have systemd, should I even be using the udev automount rules in
> the first place, or should I just create mount and automount units and
> ditch udev-extraconf entirely? (Or are the autonet rules important?) My
> ultimate goal is to have this additional partition on my main disk to be
> automounted as early in the boot process as possible. I don't need (or
> want) removable drives to be automounted anyway.

I don't see why you'd need to use automounting for a partition on the
main disk. Just put it in /etc/fstab in the usual manner, and it'll
get mounted very early in boot.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel