Re: mount unit with special requirements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>On Mon, 2018-09-10 at 09:55 +0200, Michael Hirmke wrote:
>>
>>>>
>>>>> (I would just use `umount /var/backup`, however.)
>>>>
>>>> Can't do that as long as the mount unit is under systemd control.
>>>> A few seconds later systemd remounts it on its own.
>>>>
>>> "noauto" mount option?
>>
>> This would prevent it from being mounted at startup, which is
>> necessary.

>If you leave out "noauto", you're telling systemd to mount the file
>system when it's ready. You said you didn't want that. From your
>problem description, I'd infer that this file system needs to be
>mounted only at certain times (while the backup is running). My

No, I wrote:

*- The partition has to be mounted on boot.*
- It has to be unmounted before the nightly copy job, so that an fsck
  can be performed.
- After that it has to be mounted read only, so that during the copy
  job no other machine can write to it.
- After finishing the copy job, the partition has to be remounted read
  write again.

It has to be mounted at boot, because other machines (mainly Windows
Server Backup) are writing their backups to it.

>suggestion would be to create a dedicated script (or systemd service,
>for that matter) that would mount the file system, start the backup,
>and unmount / freeze the file system when the backup is done.

Yes, I can do that - and in fact I already did.
But I want to optimize it and I want to understand systemd, so I thought
there could be better approaches.

>Regards,
>Martin

Thx and bye.
Michael.
-- 
Michael Hirmke
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux