Re: [PATCH] host/rootfs: add mount-userdata command

Demi Marie Obenour
2025-12-14T01:35:31Z

[-- Attachment #1.1.1: Type: text/plain, Size: 1212 bytes --]

On 12/13/25 05:59, Alyssa Ross wrote:
> Demi Marie Obenour <demiobenour@gmail.com> writes:
>
>> On 12/12/25 16:48, Alyssa Ross wrote:
>>> diff --git a/host/rootfs/image/usr/bin/mount-userdata b/host/rootfs/image/usr/bin/mount-userdata
>>> new file mode 100755
>>> index 00000000..e4a873c0
>>> --- /dev/null
>>> +++ b/host/rootfs/image/usr/bin/mount-userdata

(snip)

>>> +}
>>> +
>>> +multisubstitute {
>>> + importas -Siu 0
>>> + importas -Siu 1
>>> + importas -Siu uuid
>>> +}
>>> +
>>> +case $uuid {
>>> + "" {
>>> + fdmove -c 1 2
>>> + printf "%s: '%s' does not have a UUID\n" $0 $1
>>> + }
>>> +}
>>> +
>>> +if { mount -m -o nosuid,nodev,noexec,nosymfollow -- $1 /media/${uuid} }
>>> +printf "%s\n" /media/${uuid}
>>
>> Do we really want a mode of 0755? Also, I believe Spectrum should
>> use noatime. This avoids a burst of unsharing of snapshots due to
>> atime updates.
>
> Will applications be okay with that? What do OpenSUSE/Fedora do?

I'll check. I suspect they use relatime, but performance-wise I
doubt it's a good fit for snapshots of frequently-accessed volumesthat
rarely get written to.
--
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]