linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* UBI, udev and systemd
@ 2013-04-08 13:17 Ricard Wanderlof
  2013-05-10 14:32 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Ricard Wanderlof @ 2013-04-08 13:17 UTC (permalink / raw)
  To: Linux mtd


Hi,

I've got a problem when using systemd and UBI. The problem manifests 
itself as systemd waiting for a given UBI device to become ready so it can 
perform a mount operation listed in /etc/fstab.

More specifically, /etc/fstab contains a line of the form:

/dev/ubi0_25         /usr/local         ubifs      defaults           0 0

and /dev/ubi0_25 is created by the kernel when it attaches /dev/mtd2 to 
/dev/ubi0 . We use devtmpfs, and it can be seen that /dev/ubi0_25 appears 
just after devtmpfs is mounted.

However, when systemd then comes to mount /usr/local, it times out, 
claiming that /dev/ubi0_25 never becomes ready. Normally, the kernel 
would notify udev which in turn would notify systemd that the device 
exists.

The device node does exist, and ubinfo says the corresponding volume is 
present in /dev/ubi0.

(In the actual case, /dev/ubi0_25 is symlink and not a hard coded devices; 
however, I've crystalized the problem down to occurring also with hard 
coded device names to try and narrow it down).

I know this might be a more systemd-related issue, however, it seems that 
there might be something about the way UBI reports device state changes to 
udev etc, or that just someone using UBI and systemd on their system has 
had a similar problem and solved it.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: UBI, udev and systemd
  2013-04-08 13:17 UBI, udev and systemd Ricard Wanderlof
@ 2013-05-10 14:32 ` Artem Bityutskiy
  2013-05-13  7:50   ` Ricard Wanderlof
  0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2013-05-10 14:32 UTC (permalink / raw)
  To: Ricard Wanderlof; +Cc: Linux mtd

On Mon, 2013-04-08 at 15:17 +0200, Ricard Wanderlof wrote:
> I know this might be a more systemd-related issue, however, it seems
> that 
> there might be something about the way UBI reports device state
> changes to 
> udev etc, or that just someone using UBI and systemd on their system
> has 
> had a similar problem and solved it.

I do not think UBI is doing anything special, it uses standard Linux
infrastructure API for creating the devices, and deleting them.

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: UBI, udev and systemd
  2013-05-10 14:32 ` Artem Bityutskiy
@ 2013-05-13  7:50   ` Ricard Wanderlof
  2013-05-13  8:06     ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Ricard Wanderlof @ 2013-05-13  7:50 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Linux mtd


On Fri, 10 May 2013, Artem Bityutskiy wrote:

> On Mon, 2013-04-08 at 15:17 +0200, Ricard Wanderlof wrote:
>> I know this might be a more systemd-related issue, however, it seems
>> that
>> there might be something about the way UBI reports device state
>> changes to
>> udev etc, or that just someone using UBI and systemd on their system
>> has
>> had a similar problem and solved it.
>
> I do not think UBI is doing anything special, it uses standard Linux
> infrastructure API for creating the devices, and deleting them.

I never followed this up on the list because there were no other responses 
so I figured there was no other interest.

You are right, there's nothing special about UBI, except that for udev it 
comes up as its own subsystem type "ubi". There are lots of default rules 
for disk devices which place them under systemd control, but nothing for 
UBI, at least not in the build I was working on. Adding the line

SUBSYSTEM=="ubi", GROUP="disk", TAG+="systemd"

to the appropriate rules file allowed systemd to receive UBI subsystem 
updates, and all was well.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: UBI, udev and systemd
  2013-05-13  7:50   ` Ricard Wanderlof
@ 2013-05-13  8:06     ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2013-05-13  8:06 UTC (permalink / raw)
  To: Ricard Wanderlof; +Cc: Linux mtd

On Mon, 2013-05-13 at 09:50 +0200, Ricard Wanderlof wrote:
> On Fri, 10 May 2013, Artem Bityutskiy wrote:
> 
> > On Mon, 2013-04-08 at 15:17 +0200, Ricard Wanderlof wrote:
> >> I know this might be a more systemd-related issue, however, it seems
> >> that
> >> there might be something about the way UBI reports device state
> >> changes to
> >> udev etc, or that just someone using UBI and systemd on their system
> >> has
> >> had a similar problem and solved it.
> >
> > I do not think UBI is doing anything special, it uses standard Linux
> > infrastructure API for creating the devices, and deleting them.
> 
> I never followed this up on the list because there were no other responses 
> so I figured there was no other interest.
> 
> You are right, there's nothing special about UBI, except that for udev it 
> comes up as its own subsystem type "ubi". There are lots of default rules 
> for disk devices which place them under systemd control, but nothing for 
> UBI, at least not in the build I was working on. Adding the line
> 
> SUBSYSTEM=="ubi", GROUP="disk", TAG+="systemd"
> 
> to the appropriate rules file allowed systemd to receive UBI subsystem 
> updates, and all was well.

Hi Ricard, thanks for the information, it is useful to know and
appreciated. You could submit a patch to the systemd project, I guess.

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-13  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 13:17 UBI, udev and systemd Ricard Wanderlof
2013-05-10 14:32 ` Artem Bityutskiy
2013-05-13  7:50   ` Ricard Wanderlof
2013-05-13  8:06     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).