You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Description

The host that serves AFP and boot service for old devil hosts is vldafneafp.lnf.infn.it (192.168.198.53 - 192.168.196.12). This host is a VM inside DA-Dell2 Cluster and is a Debian 9.13 (stretch) because the service was not available under CentOS.

The system images and data are stored in /srv folder:

  • /srv/data 
    contains bible, dfmd and hammer AFP shares
  • /srv/tftp 
    contains system images

Installation History

This is the service installation history. It will be used to document the service installation in a better way.

Service installation history
root@vldafneafp:~# apt install vim net-tools git python3-pymemcache
root@vldafneafp:~# git config --global http.proxy http://squid.lnf.infn.it:3128

root@vldafneafp:~# apt install isc-dhcp-server # config files: /etc/default/isc-dhcp-server /etc/dhcp/dhcpd.conf
root@vldafneafp:~# systemctl enable isc-dhcp-server
root@vldafneafp:~# systemctl start isc-dhcp-server

root@vldafneafp:~# apt install tftpd-hpa # config files: /etc/default/tftpd-hpa /srv/tftp/
root@vldafneafp:~# systemctl enable tftpd-hpa
root@vldafneafp:~# systemctl start tftpd-hpa

root@vldafneafp:~# apt install netatalk # config files: /etc/default/netatalk /etc/netatalk/[afpd.conf,AppleVolumes.default,atalkd.conf]
root@vldafneafp:~# systemctl enable netatalk
root@vldafneafp:~# systemctl start netatalk

root@vldafneafp:~# tar czvfp devil_apple_debian9.tar.gz /srv/data /srv/tftp /etc/dhcp/dhcpd.conf /etc/default/netatalk /etc/netatalk/afpd.conf /etc/netatalk/AppleVolumes.default /etc/netatalk/atalkd.conf

root@vldafneafp:~# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
root@vldafneafp:~# update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
root@vldafneafp:~# update-alternatives --config python

# This is not present -> vim /lib/systemd/system/apple-monitor.service
# This is not present -> chown -R dante:dante /opt/devilappleinfo
# This is not present -> systemctl daemon-reload
# This is not present -> systemctl enable apple-monitor
# This is not present -> systemctl start apple-monitor

How to restart the service

Sometimes, the DEVILs are not able to mount "Bible" and "DFMD" disks, asking for a password (that will not work). This symptom can be solved only restarting the netatalk service, and then ALL the old DEVILs.

To restart the service, launch these commands:

How to restart netatalk service
root@vldafneafp:~# systemctl stop netatalk
root@vldafneafp:~# systemctl start netatalk

After launching the start command, the netatalk service needs some time to initialize the network. So be patient (sometimes it takes a minute).

How to disconnect a client ("Sganciare un Devil")

To disconnect a client, we need the process id of his connection and then we have to kill it. We can obtain all process ids with the following command:

root@vldafneafp:~# ps -fe | grep devil | grep afpd
devil204 12132 22674  0 nov22 ?        00:00:02 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil364 12138 22674  0 nov22 ?        00:00:06 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil367 12139 22674  0 nov22 ?        00:00:00 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil366 12140 22674  0 nov22 ?        00:00:00 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil365 12142 22674  0 nov22 ?        00:00:00 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil386 12519 22674  0 nov22 ?        00:00:17 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil391 23568 22674  0 nov16 ?        00:00:39 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100
devil385 23574 22674  0 nov16 ?        00:00:07 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n console100

The first number after the devil number is the process id to kill to disconnect that devil from AFP shares. In this example, if I want to disconnect the devil391, I have to kill the process id 23568 with the following command:

root@vldafneafp:~# kill -9 23568

Replace a DEVIL

to replace a devil, change the mac address of the old ones with the new mac address in /etc/dhcp/dhcpd.conf and restart the service with:

root@vldafneafp:~# systemctl restart isc-dhcp-server
  • No labels