Por que o / etc / machine-id muda na reinicialização?

3

/etc/machine-id muda a cada inicialização na minha instalação recente do Debian Jessie.

Os documentos dizem que não devem:

The machine ID is usually generated from a random source during system installation and stays constant for all subsequent boots. Optionally, for stateless systems, it is generated during runtime at early boot if it is found to be empty.

(A menos que meu sistema seja "sem estado". Não tenho certeza do que é isso.)

Eu percebi isso porque ele cria uma entrada de log todos os dias no meu repositório /etc usando etckeeper .

O comando

mount confirma que não é persistente:

# mount | grep machine-id
tmpfs on /etc/machine-id type tmpfs (ro,relatime,size=811524k,mode=755)

Isso é um problema? Devo fazer alguma coisa sobre isso?

Eu poderia adicioná-lo a .gitignore para evitar os commits inúteis, mas eu estaria interessado em saber por que isso acontece em primeiro lugar.

Editar: df e mount output

Não tenho certeza se importa, mas aqui está:

Estou usando um software RAID1. /dev/sda e /dev/sdc são espelhados em um volume de 3 partições: /dev/md0p1 é swap, /dev/md0p2 é / e /dev/md0p3 é / home.

/dev/sdb é um antigo HD usado para backups.

$ df
Sys. de fichiers blocs de 1K   Utilisé Disponible Uti% Monté sur
/dev/md0p2          28703672   5011248   22211316  19% /
udev                   10240         0      10240   0% /dev
tmpfs                 811524      9360     802164   2% /run
tmpfs                2028804       836    2027968   1% /dev/shm
tmpfs                   5120         4       5116   1% /run/lock
tmpfs                2028804         0    2028804   0% /sys/fs/cgroup
/dev/sdb1          615189496 506132424   77784164  87% /mnt/bak
/dev/md0p3         928490588 506207060  375095888  58% /home
tmpfs                 405764         4     405760   1% /run/user/119
tmpfs                 405764        16     405748   1% /run/user/1000

$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=504119,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=811524k,mode=755)
/dev/md0p2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
tmpfs on /etc/machine-id type tmpfs (ro,relatime,size=811524k,mode=755)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /mnt/bak type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/md0p3 on /home type ext4 (rw,relatime,data=ordered)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/119 type tmpfs (rw,nosuid,nodev,relatime,size=405764k,mode=700,uid=119,gid=127)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=405764k,mode=700,uid=1000,gid=1000)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
    
por Jérôme 06.02.2016 / 16:07

1 resposta

2

Tente fazer com que sua ID de máquina atual seja permanente:

# mount --bind / /mnt
# cp /etc/machine-id /mnt/etc/machine-id
# reboot

Isso deve se livrar da montagem tmpfs sobre /etc/machine-id .

    
por 07.02.2016 / 12:26