[pve-devel] [PATCH storage v2 2/3] disks: die if storage name is already in use

Aaron Lauterer a.lauterer at proxmox.com
Fri Aug 19 11:29:58 CEST 2022



On 8/19/22 10:21, Fabian Grünbichler wrote:
> On August 18, 2022 5:31 pm, Aaron Lauterer wrote:
>>
>>
>> On 8/18/22 17:22, Aaron Lauterer wrote:
>>>
>>>
>>> On 8/17/22 13:42, Fabian Grünbichler wrote:[..]
>>>>> +    die "a systemd mount unit already exists: ${mountunitpath}\n" if -e
>>>>> $mountunitpath;
>>>>
>>>> could check if it's identical to the one we'd generate (in the spirit of
>>>> patch #3 ;))
>>>
>>> I looked into it, depending on how hard we want to match the mount unit, this
>>> could be a bit hard. It contains the /dev/disk/by-uuid/... path which will not
>>> be the same as it changes with each FS creation (IIUC).
>>
>> The question is, if it is a good idea to have the check since there is no easy
>> way for the user to remedy the problem without doing a manual `rm
>> /etc/systemd/system/foo.mount`.
> 
> *could* be solved by having a force parameter I guess? not sure that's a
> good idea, just throwing it out there ;)
> 

a short off list discussion brought up that we indeed can remove dangling mount 
units already, so keeping the check is okay since users can quite easily remove it






More information about the pve-devel mailing list