[Bug 1312976] Re: nfs-utils needs systemd unit or init.d script
Martin Pitt
martin.pitt at ubuntu.com
Mon Mar 2 13:46:37 UTC 2015
Taking over from Steve as discussed on IRC, he doesn't find enough time
for this.
These are the steps to set up a VM to test both server and client:
# set up exports
sudo apt-get install -y nfs-kernel-server
echo -e '/home *(rw,no_subtree_check)\n/var/log/ *(ro,subtree_check)' | sudo tee -a /etc/exports
sudo service nfs-kernel-server start
# set up client mounts
sudo mkdir /mnt/nfs_home /mnt/nfs_log
cat << EOF | sudo tee -a /etc/fstab
localhost:/home /mnt/nfs_home nfs defaults,nofail 0 0
localhost:/var/log /mnt/nfs_log nfs defaults,nofail 0 0
EOF
sudo reboot
# some simple tests to see that it worked
ls -l /mnt/nfs_log/wtmp /mnt/nfs_home/ubuntu/.bash*
echo hello > /mnt/nfs_home/ubuntu/world.txt
cat ~/world.txt # should give "hello"
sudo touch /mnt/nfs_log/pwned # should fail with "read-only fs"
This works fine under upstart, but as expected fails once you install
systemd-sysv:
$ sudo systemctl status nfs-kernel-server
● nfs-kernel-server.service - LSB: Kernel NFS server support
Loaded: loaded (/etc/init.d/nfs-kernel-server)
Active: active (exited) since Mon 2015-03-02 14:42:41 CET; 1min 9s ago
Docs: man:systemd-sysv-generator(8)
Process: 507 ExecStart=/etc/init.d/nfs-kernel-server start (code=exited, status=0/SUCCESS)
Mar 02 14:42:41 autopkgtest systemd[1]: Starting LSB: Kernel NFS server support...
Mar 02 14:42:41 autopkgtest nfs-kernel-server[507]: * Exporting directories for NFS kernel daemon...
Mar 02 14:42:41 autopkgtest nfs-kernel-server[507]: ...done.
Mar 02 14:42:41 autopkgtest nfs-kernel-server[507]: * Starting NFS kernel daemon
Mar 02 14:42:41 autopkgtest nfs-kernel-server[507]: * Not starting: portmapper is not running
Mar 02 14:42:41 autopkgtest systemd[1]: Started LSB: Kernel NFS server support.
and the client mounts hang:
$ ps aux|grep nfs
root 608 0.0 0.0 21544 1696 ? S 14:42 0:00 /bin/mount localhost:/var/log /mnt/nfs_log -n -t nfs -o defaults
root 610 0.0 0.0 21544 1688 ? S 14:42 0:00 /bin/mount localhost:/home /mnt/nfs_home -n -t nfs -o defaults
root 611 0.0 0.1 40192 3052 ? S 14:42 0:00 /sbin/mount.nfs localhost:/var/log /mnt/nfs_log -n -o rw
root 612 0.0 0.1 40192 3180 ? S 14:42 0:00 /sbin/mount.nfs localhost:/home /mnt/nfs_home -n -o rw
** Changed in: nfs-utils (Ubuntu)
Status: Triaged => In Progress
** Changed in: nfs-utils (Ubuntu)
Assignee: Steve Langasek (vorlon) => Martin Pitt (pitti)
** Description changed:
- nfs-utils can not be installed with systemd due to missing upstart
- service.
+ nfs-utils can not be used with systemd due to missing systemd unit or
+ init.d script.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1312976
Title:
nfs-utils needs systemd unit or init.d script
Status in nfs-utils package in Ubuntu:
In Progress
Bug description:
nfs-utils can not be used with systemd due to missing systemd unit or
init.d script.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1312976/+subscriptions
More information about the foundations-bugs
mailing list