systemd를 사용하여 ntpd를 시작할 때 ntpd pid의 마운트 네임스페이스가 pid 1과 다른 이유는 무엇입니까?
systemd를 사용하여 ntpd를 시작할 때
마운트 네임스페이스만 pid 1과 다릅니다.
ntpd mnt:[4026532696]이 표시되지만 pid 1은 mnt:[4026531840]입니다.#ll /proc/`pidof ntpd`/ns
total 0
lrwxrwxrwx 1 root root 0 Jun 7 17:58 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 mnt -> mnt:[4026532696]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 net -> net:[4026531968]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 uts -> uts:[4026531838]
#ll /proc/1/ns
total 0
lrwxrwxrwx 1 root root 0 Jun 7 17:58 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 mnt -> mnt:[4026531840]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 net -> net:[4026531968]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 uts -> uts:[4026531838]
systemd를 사용하지 않고 ntpd를 시작하는 경우
systemd를 사용하지 않고 ntpd를 시작하면 ntpd pid의 마운트 네임스페이스는 pid 1의 마운트 네임스페이스와 동일합니다.
#systemctl stop ntpd
#/usr/sbin/ntpd -u ntp:ntp -g
#ll /proc/`pidof ntpd`/ns
total 0
lrwxrwxrwx 1 root root 0 Jun 20 19:46 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Jun 20 19:46 mnt -> mnt:[4026531840]
lrwxrwxrwx 1 root root 0 Jun 20 19:46 net -> net:[4026531968]
lrwxrwxrwx 1 root root 0 Jun 20 19:46 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Jun 20 19:46 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Jun 20 19:46 uts -> uts:[4026531838]
#ll /proc/1/ns
total 0
lrwxrwxrwx 1 root root 0 Jun 7 17:58 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 mnt -> mnt:[4026531840]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 net -> net:[4026531968]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Jun 7 17:58 uts -> uts:[4026531838]
systemd로 시작된 다른 데몬은 괜찮아 보입니다.
sshd pid는 1252입니다
#ll /proc/1252/ns/
total 0
lrwxrwxrwx 1 root root 0 Jun 20 19:52 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Jun 20 19:52 mnt -> mnt:[4026531840]
lrwxrwxrwx 1 root root 0 Jun 20 19:52 net -> net:[4026531968]
lrwxrwxrwx 1 root root 0 Jun 20 19:52 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Jun 20 19:52 user -> user:[4026531837]
lrwxrwxrwx 1 root root 0 Jun 20 19:52 uts -> uts:[4026531838]