[arch-releng] [PATCH 2/2] [archiso] Allow persistent cow dm-snapshots.

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Tue Aug 23 18:45:25 EDT 2011


On 08/23/2011 12:56 PM, Thomas Bächler wrote:
> Am 23.08.2011 17:40, schrieb Gerardo Exequiel Pozzi:
>> rebased with
>>
>> -    _mnt_dev "${archisodevice}" "/bootmnt" "-r"
>> +    if [[ "$(readlink -f "${archisodevice}")" == "$(readlink -f
>> "${cow_device}")" ]]; then
>> +        _mnt_dev "${archisodevice}" "/bootmnt"
>> +    else
>> +        _mnt_dev "${archisodevice}" "/bootmnt" "-r"
>> +    fi
>> +
>>
>>
> That makes me think: Why do we want archisodevice= to be read-only? In
> the case of the ISO/UDF file system, the kernel will automatically mount
> read-only.
Sure. but will see a warning, of course does not harm and can be hidden.
>   In case of another file system, being read-write is actually
> desirable (might cause trouble with shutdown though).
Oh I missed to talk here about this! (I wrote about this when I sent "My 
TODO draft"). This will work much better (I think)
with next initscripts, that pivot root to initramfs [#1] and mkinitcpio. 
In that case I can unmount all dm-snapshot devices, remove from dm, 
detach from loopback devices, and finally unmount the block device used.

[#1] 
http://projects.archlinux.org/initscripts.git/commit/?id=b7432d25cba680c785269509245f394dfa6b9dd0
>
> In any case, the above distinction is superfluous, as you can mount
> every file system in Linux as often as you want, and I think you can
> mount it ro once and rw the other time without trouble. (All IIRC)
>
Nope :(, You can not mount (at least directly) the same device in two 
different places one as ro and other as rw (you will get a EBUSY).

My conclusión is: I think that is better to keep this difference at 
least for now, always mount-ro, so users that does not use this feature 
will always unmount cleanly the filesystem.

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-releng mailing list