FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 09-25-2012, 07:24 PM
walt
 
Default systemd question

I just installed and booted with systemd and most services are working
normally, except syslog.service and remote-fs.service. Both of those
failed on bootup with a "No such file or directory" error.

I can't figure out how to make systemd tell me which files it can't
find. Any ideas?
 
Old 09-25-2012, 09:42 PM
Canek Peláez Valdés
 
Default systemd question

On Tue, Sep 25, 2012 at 2:24 PM, walt <w41ter@gmail.com> wrote:
> I just installed and booted with systemd and most services are working
> normally, except syslog.service and remote-fs.service. Both of those
> failed on bootup with a "No such file or directory" error.
>
> I can't figure out how to make systemd tell me which files it can't
> find. Any ideas?

The syslog.service works as a place-holder for whatever syslog you
have installed (or not). So, if you have syslog-ng, you do

ln -s /usr/lib/systemd/system/syslog-ng.service
/etc/systemd/system/syslog.service

If you have rsyslog, you do:

ln -s /usr/lib/systemd/system/rsyslog.service /etc/systemd/system/syslog.service

If you (like me) don't have any syslog because you want to use journald, you do:

ln -s /dev/null /etc/systemd/system/syslog.service

That is the common way to "mask" services in systemd. If you don't
need remote filesystems (NFS, cifs shares, etc.) mounted at boot time,
mask remote-fs.service:

ln -s /dev/null /etc/systemd/system/remote-fs.service

I do however have the remote-fs.service (systemd-191, out of the
oven), I don't know why it isn't installed in your case. Which version
are you using.

Regards
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
 
Old 09-25-2012, 11:56 PM
walt
 
Default systemd question

On 09/25/2012 02:42 PM, Canek Peláez Valdés wrote:

On Tue, Sep 25, 2012 at 2:24 PM, walt <w41ter@gmail.com> wrote:

I just installed and booted with systemd and most services are working
normally, except syslog.service and remote-fs.service. Both of those
failed on bootup with a "No such file or directory" error.

I can't figure out how to make systemd tell me which files it can't
find. Any ideas?


The syslog.service works as a place-holder for whatever syslog you
have installed (or not). So, if you have syslog-ng, you do

ln -s /usr/lib/systemd/system/syslog-ng.service
/etc/systemd/system/syslog.service


My problem is that I don't have syslog-ng.service in /usr/lib/systemd.
Neither systemd nor syslog-ng installed it. Do I write it myself?



I do however have the remote-fs.service (systemd-191, out of the
oven), I don't know why it isn't installed in your case. Which version
are you using.


Same: 191. I do have syslog.target and remote-fs.target installed, but
not the corresponding *.system files. Maybe the useflags determine this?
 
Old 09-26-2012, 03:21 AM
Canek Peláez Valdés
 
Default systemd question

On Tue, Sep 25, 2012 at 6:56 PM, walt <w41ter@gmail.com> wrote:
> On 09/25/2012 02:42 PM, Canek Peláez Valdés wrote:
>>
>> On Tue, Sep 25, 2012 at 2:24 PM, walt <w41ter@gmail.com> wrote:
>>>
>>> I just installed and booted with systemd and most services are working
>>> normally, except syslog.service and remote-fs.service. Both of those
>>> failed on bootup with a "No such file or directory" error.
>>>
>>> I can't figure out how to make systemd tell me which files it can't
>>> find. Any ideas?
>>
>>
>> The syslog.service works as a place-holder for whatever syslog you
>> have installed (or not). So, if you have syslog-ng, you do
>>
>> ln -s /usr/lib/systemd/system/syslog-ng.service
>> /etc/systemd/system/syslog.service
>
>
> My problem is that I don't have syslog-ng.service in /usr/lib/systemd.
> Neither systemd nor syslog-ng installed it. Do I write it myself?

No, I suppose is in syslog-ng sources, but the ebuilds in Gentoo
disables systemd support (at least for 3.3.5):

# grep -n systemd /usr/portage/app-admin/syslog-ng/syslog-ng-3.3.5-r1.ebuild
68: --disable-systemd

So you can fill a bug in Gentoo to get systemd support in syslog-ng,
or just take the unit file from the source and put it in
/etc/systemd/system. I don't know why it is diabled, though.

>> I do however have the remote-fs.service (systemd-191, out of the
>> oven), I don't know why it isn't installed in your case. Which version
>> are you using.
>
> Same: 191. I do have syslog.target and remote-fs.target installed, but
> not the corresponding *.system files. Maybe the useflags determine this?

Sorry: I meant remote-fs.target; I don't think there is
remote-fs.service, it is a target (and one of the special ones). Do
you need remote filesystem support? If not, then don't worry about it;
but if you want to find the problem, send the output from systemctl
status remote-fs.target. Mine is:

# systemctl status remote-fs.target
remote-fs.target - Remote File Systems
Loaded: loaded (/usr/lib64/systemd/system/remote-fs.target; enabled)
Active: active since Mon, 24 Sep 2012 18:33:09 -0500; 1 day and 3h ago
Docs: man:systemd.special(7)

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
 
Old 09-26-2012, 01:11 PM
walt
 
Default systemd question

On 09/25/2012 08:21 PM, Canek Peláez Valdés wrote:


Do
you need remote filesystem support? If not, then don't worry about it;
but if you want to find the problem, send the output from systemctl
status remote-fs.target. Mine is:

# systemctl status remote-fs.target
remote-fs.target - Remote File Systems
Loaded: loaded (/usr/lib64/systemd/system/remote-fs.target; enabled)
Active: active since Mon, 24 Sep 2012 18:33:09 -0500; 1 day and 3h ago
Docs: man:systemd.special(7)


I mount /usr/portage by nfs, so I do want remote-fs support.

The problem is listed by journalctl:

Sep 26 05:44:27 a6v rpc.statd[1658]: Running as root. chown /var/lib/nfs to choose different user
Sep 26 05:44:27 a6v rpc.statd[1658]: failed to create RPC listeners, exiting
Sep 26 05:44:27 a6v mount[1655]: mount.nfs: rpc.statd is not running but is required for remote locking.
Sep 26 05:44:27 a6v mount[1655]: mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
Sep 26 05:44:27 a6v mount[1655]: mount.nfs: an incorrect mount option was specified
Sep 26 05:44:27 a6v systemd[1]: usr-portage.mount mount process exited, code=exited status=32
Sep 26 05:44:27 a6v systemd[1]: Failed to mount /usr/portage.
Sep 26 05:44:27 a6v systemd[1]: Dependency failed for Remote File Systems.
Sep 26 05:44:27 a6v systemd[1]: Job remote-fs.target/start failed with result 'dependency'.
Sep 26 05:44:27 a6v systemd[1]: Unit usr-portage.mount entered failed state.

# systemctl status remote-fs.target
remote-fs.target - Remote File Systems
Loaded: loaded (/usr/lib64/systemd/system/remote-fs.target; enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)

# grep nfs /etc/fstab
a6:/usr/portage /usr/portage nfs rw,auto 0 0
(BTW, this works correctly when booting with openrc.)

Any hints would be much appreciated, thanks.
 
Old 09-26-2012, 05:23 PM
Canek Peláez Valdés
 
Default systemd question

On Wed, Sep 26, 2012 at 8:11 AM, walt <w41ter@gmail.com> wrote:
> On 09/25/2012 08:21 PM, Canek Peláez Valdés wrote:
>
>> Do
>> you need remote filesystem support? If not, then don't worry about it;
>> but if you want to find the problem, send the output from systemctl
>> status remote-fs.target. Mine is:
>>
>> # systemctl status remote-fs.target
>> remote-fs.target - Remote File Systems
>> Loaded: loaded (/usr/lib64/systemd/system/remote-fs.target;
>> enabled)
>> Active: active since Mon, 24 Sep 2012 18:33:09 -0500; 1 day and
>> 3h ago
>> Docs: man:systemd.special(7)
>
>
> I mount /usr/portage by nfs, so I do want remote-fs support.
>
> The problem is listed by journalctl:
>
> Sep 26 05:44:27 a6v rpc.statd[1658]: Running as root. chown /var/lib/nfs to
> choose different user
> Sep 26 05:44:27 a6v rpc.statd[1658]: failed to create RPC listeners, exiting
> Sep 26 05:44:27 a6v mount[1655]: mount.nfs: rpc.statd is not running but is
> required for remote locking.
> Sep 26 05:44:27 a6v mount[1655]: mount.nfs: Either use '-o nolock' to keep
> locks local, or start statd.
> Sep 26 05:44:27 a6v mount[1655]: mount.nfs: an incorrect mount option was
> specified
> Sep 26 05:44:27 a6v systemd[1]: usr-portage.mount mount process exited,
> code=exited status=32
> Sep 26 05:44:27 a6v systemd[1]: Failed to mount /usr/portage.
> Sep 26 05:44:27 a6v systemd[1]: Dependency failed for Remote File Systems.
> Sep 26 05:44:27 a6v systemd[1]: Job remote-fs.target/start failed with
> result 'dependency'.
> Sep 26 05:44:27 a6v systemd[1]: Unit usr-portage.mount entered failed state.
>
>
> # systemctl status remote-fs.target
> remote-fs.target - Remote File Systems
> Loaded: loaded (/usr/lib64/systemd/system/remote-fs.target;
> enabled)
> Active: inactive (dead)
> Docs: man:systemd.special(7)
>
> # grep nfs /etc/fstab
> a6:/usr/portage /usr/portage nfs rw,auto 0 0
> (BTW, this works correctly when booting with openrc.)
>
> Any hints would be much appreciated, thanks.

I believe you have your answer:

> Sep 26 05:44:27 a6v mount[1655]: mount.nfs: rpc.statd is not running but is
> required for remote locking.
> Sep 26 05:44:27 a6v mount[1655]: mount.nfs: Either use '-o nolock' to keep
> locks local, or start statd.

Put nolock in the mount options in fstab (rw,auto,nolock), or get
rpc.statd running. For the later, you will need the service file for
it: a quick googling turned out:

http://en.gentoo-wiki.com/wiki/Systemd#NFS

Put the necessary service files in /etc/systemd/system, make a link to
them in /etc/systemd/system/remote-fs.target.wants (you need to do
this by hand, since they don't seem to have an [Install] section), and
then do a 'systemctl --system daemon-reload'. Afterwards, you should
be able to mount your NFS partition with 'systemctl start
usr-portage.mount'.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
 

Thread Tools




All times are GMT. The time now is 05:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org