내 afs 클라이언트가 작동을 멈췄습니다. 왜인지는 모르겠어요. 어쩌면 도망쳤던 걸까요 apt-get
? 그래도:
user@box ~ $ kinit
[email protected]'s Password:
user@box ~ $ aklog
aklog: a pioctl failed while obtaining tokens for cell ies.auc.dk
서비스 상태 확인:
user@box ~ $ sudo service openafs-client status
[sudo] password for user:
● openafs-client.service - OpenAFS client
Loaded: loaded (/lib/systemd/system/openafs-client.service; enabled; vendor p
Active: active (exited) since Mon 2017-11-13 08:17:40 CET; 3h 8min ago
Process: 1942 ExecStartPost=/usr/bin/fs sysname $AFS_SYSNAME (code=exited, sta
Process: 1934 ExecStartPost=/usr/bin/fs setcrypt $AFS_SETCRYPT (code=exited, s
Process: 1930 ExecStart=/sbin/afsd $AFSD_ARGS (code=exited, status=0/SUCCESS)
Process: 1918 ExecStartPre=/usr/share/openafs/openafs-client-precheck (code=ex
Tasks: 0 (limit: 512)
Memory: 0B
CPU: 0
Nov 13 08:17:40 box systemd[1]: Starting OpenAFS client...
Nov 13 08:17:40 box openafs-client-precheck[1918]: modprobe: FATAL: Modul
Nov 13 08:17:40 box openafs-client-precheck[1918]: Failed to load openafs
Nov 13 08:17:40 box fs[1934]: Usage: /usr/bin/fs setcrypt -crypt <on or o
Nov 13 08:17:40 box fs[1942]: Usage: /usr/bin/fs sysname [-newsys <new sy
Nov 13 08:17:40 box systemd[1]: Started OpenAFS client.
Modprobe가 실패했습니다. 직관으로는 이것이 커널 모듈을 빌드해야 하는 dkms라는 것입니다. 커널 모듈 빌드를 트리거해 보십시오(설치의 일부로 발생해야 함).
user@box ~ $ sudo dpkg-reconfigure openafs-modules-dkms
-------- Uninstall Beginning --------
Module: openafs
Version: 1.6.21
Kernel: 4.4.0-21-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
openafs.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-21-generic/updates/dkms//
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod.....
DKMS: uninstall completed.
------------------------------
Deleting module version: 1.6.21
completely from the DKMS tree.
------------------------------
Done.
Loading new openafs-1.6.21 DKMS files...
Building only for 4.4.0-97-generic
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
커널 버전이 일치하지 않습니다. 4.4.0-21이 설치되었습니다. 4.4.0-97이 현재 버전입니다. 소스를 사용할 수 없기 때문에 현재 버전을 빌드할 수 없습니다.
답변1
현재 커널에 대한 관련 헤더 파일을 설치합니다.
user@box ~ $ sudo apt-get install linux-headers-`uname -r`
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
linux-headers-4.4.0-97-generic
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 817 kB of archives.
After this operation, 7,427 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-97-generic amd64 4.4.0-97.120 [817 kB]
Fetched 817 kB in 0s (1,626 kB/s)
Selecting previously unselected package linux-headers-4.4.0-97-generic.
(Reading database ... 301414 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.4.0-97-generic_4.4.0-97.120_amd64.deb ...
Unpacking linux-headers-4.4.0-97-generic (4.4.0-97.120) ...
Setting up linux-headers-4.4.0-97-generic (4.4.0-97.120) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.4.0-97-generic /boot/vmlinuz-4.4.0-97-generic
afs 커널 모듈의 dkms 빌드를 트리거합니다:
user@box ~ $ sudo dpkg-reconfigure openafs-modules-dkms
-------- Uninstall Beginning --------
Module: openafs
Version: 1.6.21
Kernel: 4.4.0-97-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
openafs.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-97-generic/updates/dkms//
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
------------------------------
Deleting module version: 1.6.21
completely from the DKMS tree.
------------------------------
Done.
Loading new openafs-1.6.21 DKMS files...
Building only for 4.4.0-97-generic
Building initial module for 4.4.0-97-generic
Done.
openafs:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-97-generic/updates/dkms//
depmod....
DKMS: install completed.
afs 클라이언트를 다시 시작하고 커널 모듈을 삽입하십시오:
user@box ~ $ sudo service openafs-client restart
해결됨:
user@box ~ $ kinit
[email protected]'s Password:
user@box ~ $ aklog
user@box ~ $ klist
Credentials cache: FILE:/tmp/krb5cc_1000
Principal: [email protected]
Issued Expires Principal
Nov 13 13:02:45 2017 Nov 13 23:02:42 2017 krbtgt/[email protected]
Nov 13 13:02:46 2017 Nov 13 23:02:42 2017 afs/[email protected]