converte o comando mount para fstab

0

Como eu poderia converter esses comandos em fstab?

/bin/mount --make-rshared /
/bin/mount --bind /with /with
/bin/mount --make-rprivate /with
/bin/mount -t tmpfs company-with-global /with
    
por Thomas G. Lau 05.05.2017 / 11:57

1 resposta

0

A página de manual para mount diz no capítulo sobre o shared subtree operations :

Since  util-linux 2.23 the mount command allows to use several propagation flags together and also together with other mount operations.  This feature is EXPERIMENTAL.  The propaga‐
tion flags are applied by additional mount(2) syscalls when the preceding mount operations were successful.  Note that this use case is not atomic.  It is possible  to  specify  the
propagation flags in fstab(5) as mount options (private, slave, shared, unbindable, rprivate, rslave, rshared, runbindable).

Isso significa:

  • adicione a opção rshared às opções de montagem /
  • adicione uma nova entrada bind mount para /with com a opção rprivate
  • adicione uma nova entrada de montagem para o tmpfs mount

(Eu acho que seu /bin/mount --bind /with /with é um erro de digitação?)

Nunca tentei isso, mas talvez funcione.

    
por ridgy 05.05.2017 / 13:53