Re: mount verhält sich eigenartig
On Sun, January 15, 2012 4:58 pm, Martin Steigerwald wrote:
> Das sieht mir aufgrund der Fehlermeldungen so aus, als ob das ganz
> offiziell
> so nicht geht.
>
> Ob das nun ein Bug oder beabsichtigt ist, weiß ich nicht. Ich finde das
> jedoch doof, bei einem Kunden hatten wir Bind-Mounts mal genauso
> verwendet!
In der Manpage steht auch, warum das so ist:
,----
| Note that the filesystem mount options will remain the same as
| those on the original mount point, and cannot be changed by
| passing the -o option along with --bind/--rbind.
`----
Hier auf dem Ubuntu System, steht auch, wie man das umgehen kann:
,----
| Note that the filesystem mount options will remain the same as
| those on the original mount point, and cannot be changed by
| passing the -o option along with --bind/--rbind. The mount
| options can be changed by a separate remount command, for
| example:
|
| mount --bind olddir newdir
| mount -o remount,ro newdir
|
| Note that behavior of the remount operation depends on the
| /etc/mtab file. The first command stores the 'bind' flag to the
| /etc/mtab file and the second command reads the flag from the
| file. If you have a system without the /etc/mtab file or if you
| explicitly define source and target for the remount command
| (then mount(8) does not read /etc/mtab), then you have to use
| bind flag (or option) for the remount command too. For example:
|
| mount --bind olddir newdir
| mount -o remount,ro,bind olddir newdir
`----
Grüße,
Christian
Reply to: