Can't enable nfs-idmap, rpcbind, nfs.service on boot?
Can't enable nfs-idmap, rpcbind, nfs.service on boot?
Hi,
I've got the latest nfs-utils installed.
I'm trying to enable the following services on boot but they are coming up Active: inactive (dead) when I request status.
systemctl enable nfs-lock
systemctl enable nfs-idmap
When I run these commands I get:
Failed to issue method call: No such file or directory
So I tried inserting symlinks in /etc/systemd/system/basic.target.wants:
ln -s /usr/lib/systemd/system/rpc-statd.service ./nfs-lock
and
ln -s /usr/lib/systemd/system/nfs-idmapd.service ./nfs-idmap
Yet when I run systemctl status with nfs-lock or nfs-idmap the service shows as Active: inactive (dead)
When I look in /usr/lib/systemd/system it seems that these services have sym-links which just point to the service name (without any path) - and I can't find the service names in root, so I'm a bit stuck.
Any ideas how to get these enabled on boot in CentOS 7?
Am I putting them in the wrong .target.wants directory?
I've got the latest nfs-utils installed.
I'm trying to enable the following services on boot but they are coming up Active: inactive (dead) when I request status.
systemctl enable nfs-lock
systemctl enable nfs-idmap
When I run these commands I get:
Failed to issue method call: No such file or directory
So I tried inserting symlinks in /etc/systemd/system/basic.target.wants:
ln -s /usr/lib/systemd/system/rpc-statd.service ./nfs-lock
and
ln -s /usr/lib/systemd/system/nfs-idmapd.service ./nfs-idmap
Yet when I run systemctl status with nfs-lock or nfs-idmap the service shows as Active: inactive (dead)
When I look in /usr/lib/systemd/system it seems that these services have sym-links which just point to the service name (without any path) - and I can't find the service names in root, so I'm a bit stuck.
Any ideas how to get these enabled on boot in CentOS 7?
Am I putting them in the wrong .target.wants directory?
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
So the way I'm reading this is that they do start but fail in some manner (as in
Any entries in journalctl?
)they are coming up Active: inactive (dead) when I request status.
Probably a clue as to what is wrong.When I run these commands I get:
Failed to issue method call: No such file or directory
Any entries in journalctl?
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
Thanks for the reply aks!
I (think) I've worked it out in the end.
Please if anyone can sanity check this solution that would be great
IMO it was a bug in RHEL which I reckon made it into CentOS7 where the service's unit files were aliased and had no [Install] parameters.
https://bugzilla.redhat.com/show_bug.cgi?id=1159308 - references the issue in RHEL
nfs-lock.service is actually called rpc-statd.service when you look in /usr/lib/systemd/system/nfs-lock.service - it's a symlink > rpc-statd.service
nfs-imap.service is actually called nfs-idmapd.service when you look in /usr/lib/systemd/system/nfs-lock.service - it's a symlink > nfs-idmapd.service
I also noticed when I opened the unit files in /usr/lib/systemd/system that they had no [Install] parameter, so I've added this to the bottom of the files for both nfs-idmap.service and nfs-lock.service:
[Install]
WantedBy=multi-user.target
This allowed me to run:
systemctl enable rpc-statd.service
and
systemctl enable nfs-idmapd.service
Both inserted symlinks in /etc/systemd/system/multi-user.target.wants for both nfs-idmapd.service and rpc-statd.service.
Does this sound like a sane solution?
Both services now report as enabled and Active: running after boot.
I (think) I've worked it out in the end.
Please if anyone can sanity check this solution that would be great
IMO it was a bug in RHEL which I reckon made it into CentOS7 where the service's unit files were aliased and had no [Install] parameters.
https://bugzilla.redhat.com/show_bug.cgi?id=1159308 - references the issue in RHEL
nfs-lock.service is actually called rpc-statd.service when you look in /usr/lib/systemd/system/nfs-lock.service - it's a symlink > rpc-statd.service
nfs-imap.service is actually called nfs-idmapd.service when you look in /usr/lib/systemd/system/nfs-lock.service - it's a symlink > nfs-idmapd.service
I also noticed when I opened the unit files in /usr/lib/systemd/system that they had no [Install] parameter, so I've added this to the bottom of the files for both nfs-idmap.service and nfs-lock.service:
[Install]
WantedBy=multi-user.target
This allowed me to run:
systemctl enable rpc-statd.service
and
systemctl enable nfs-idmapd.service
Both inserted symlinks in /etc/systemd/system/multi-user.target.wants for both nfs-idmapd.service and rpc-statd.service.
Does this sound like a sane solution?
Both services now report as enabled and Active: running after boot.
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
Can anyone sanity check this solution for me?
Just want to check I haven't done anything stupid
Just want to check I haven't done anything stupid
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
BUMP!
Anyone? I'm kinda new to CentOS7 and want to check I haven't done anything dumb here ^^^^
Anyone? I'm kinda new to CentOS7 and want to check I haven't done anything dumb here ^^^^
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
If it works for you and does what you need it to do, then yes it's fixed.
Reading the (very long) bug thing you posted, RH seems to be suggesting that we don't want to allow /etc/systemd/ to be used, which is one of the things that systemd said was fine, so I don't know what RH's plan is for the future.
But yes, it seems logical to me. I'm just not sure what'll break in the future - generally if you overwrite an RPM supplied file with your own, it will be not changed when you install the next RPM that provides that file (so during an update/upgrade for example).
Reading the (very long) bug thing you posted, RH seems to be suggesting that we don't want to allow /etc/systemd/ to be used, which is one of the things that systemd said was fine, so I don't know what RH's plan is for the future.
But yes, it seems logical to me. I'm just not sure what'll break in the future - generally if you overwrite an RPM supplied file with your own, it will be not changed when you install the next RPM that provides that file (so during an update/upgrade for example).
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
Cheers Aks! Much appreciatedaks wrote:If it works for you and does what you need it to do, then yes it's fixed.
Reading the (very long) bug thing you posted, RH seems to be suggesting that we don't want to allow /etc/systemd/ to be used, which is one of the things that systemd said was fine, so I don't know what RH's plan is for the future.
But yes, it seems logical to me. I'm just not sure what'll break in the future - generally if you overwrite an RPM supplied file with your own, it will be not changed when you install the next RPM that provides that file (so during an update/upgrade for example).
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
CentOS7 20151010 NFS Daemons
I experience this issue.
service nfs-lock status #<-- Error
service nfs-idmap status #<-- Error Resolution will solve the follow issues.
systemctl enable nfs-lock Failed to issue method call: No such file or directory
systemctl enable nfs-idmap Failed to issue method call: No such file or directory
Requires Files Modification:
/usr/lib/systemd/system/nfs-lock.service
/usr/lib/systemd/system/nfs-idmapd.service
Append text to /usr/lib/systemd/system/nfs-idmap.service
[Install]
WantedBy=multi-user.target
Append text to /usr/lib/systemd/system/nfs-lock.service
[Install]
WantedBy=nfs.target
Enable the services:
systemctl enable nfs-idmapd.service
systemctl enable rpc-statd.service
I had to Add filewall rules: (optional)
firewall-cmd --permanent --zone public --add-service mountd
firewall-cmd --permanent --zone public --add-service rpc-bind
firewall-cmd --permanent --zone public --add-service nfs
firewall-cmd --reload
I had to enable the socket: (optional)
systemctl enable rpcbind.socket
Reboot System and check status
systemctl status rpc-statd.service –l
systemctl status nfs-idmapd.service -l Rest assured.
I experience this issue.
service nfs-lock status #<-- Error
service nfs-idmap status #<-- Error Resolution will solve the follow issues.
systemctl enable nfs-lock Failed to issue method call: No such file or directory
systemctl enable nfs-idmap Failed to issue method call: No such file or directory
Requires Files Modification:
/usr/lib/systemd/system/nfs-lock.service
/usr/lib/systemd/system/nfs-idmapd.service
Append text to /usr/lib/systemd/system/nfs-idmap.service
[Install]
WantedBy=multi-user.target
Append text to /usr/lib/systemd/system/nfs-lock.service
[Install]
WantedBy=nfs.target
Enable the services:
systemctl enable nfs-idmapd.service
systemctl enable rpc-statd.service
I had to Add filewall rules: (optional)
firewall-cmd --permanent --zone public --add-service mountd
firewall-cmd --permanent --zone public --add-service rpc-bind
firewall-cmd --permanent --zone public --add-service nfs
firewall-cmd --reload
I had to enable the socket: (optional)
systemctl enable rpcbind.socket
Reboot System and check status
systemctl status rpc-statd.service –l
systemctl status nfs-idmapd.service -l Rest assured.
Re: Can't enable nfs-idmap, rpcbind, nfs.service on boot?
Yep, that's basically what I had to do to fix itmancoast wrote:CentOS7 20151010 NFS Daemons
I experience this issue.
service nfs-lock status #<-- Error
service nfs-idmap status #<-- Error Resolution will solve the follow issues.
systemctl enable nfs-lock Failed to issue method call: No such file or directory
systemctl enable nfs-idmap Failed to issue method call: No such file or directory
Requires Files Modification:
/usr/lib/systemd/system/nfs-lock.service
/usr/lib/systemd/system/nfs-idmapd.service
Append text to /usr/lib/systemd/system/nfs-idmap.service
[Install]
WantedBy=multi-user.target
Append text to /usr/lib/systemd/system/nfs-lock.service
[Install]
WantedBy=nfs.target
Enable the services:
systemctl enable nfs-idmapd.service
systemctl enable rpc-statd.service
I had to Add filewall rules: (optional)
firewall-cmd --permanent --zone public --add-service mountd
firewall-cmd --permanent --zone public --add-service rpc-bind
firewall-cmd --permanent --zone public --add-service nfs
firewall-cmd --reload
I had to enable the socket: (optional)
systemctl enable rpcbind.socket
Reboot System and check status
systemctl status rpc-statd.service –l
systemctl status nfs-idmapd.service -l Rest assured.