[systemd-devel] systemctl isolate disconnects network
When trying to isolate targets I run systemctl isolate multi-user.target but on the systems I've tested (rhel 7.0-7.2 and Fedora 21-23) will also restart networking. It also appears that the network restart does not wait for NetworkManager-wait-online or systemd-networkd-wait-online even if I manually specify them for units in the target. The problem is it doesn't appear the network restart honors LINKDELAY set in ifcfg-ethX files. We often find that systems switch target level and network is UP but has no ip address. Once the interface is UP it doesn't try to get an IP address and the system is in a stuck state if we were connected remotely. The only way to get out of this state is to either force a restart, go to the local console of the system (if available), or open a local tty session via the hypervisor (if the system is a VM) Is there a way to stop network interfaces from restarting when switching targets? I haven't found a unit that defines this behavior but I don't see why this would be the case when init 3/5 never caused this behavior. -- Justin Garrison ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Fwd: messing with .mount/.automount units
29.01.2016 23:07, arnaud gaboury пишет: > BUMP. > > I run once a week a simple backup with rsync. For that purpose, I > wrote a service file (rsync) and a timer unit. They both work with no > issues. > > /etc/systemd/system/backup-external.service > > [Unit] > Description=Backup system to external drive > Requires=mnt-backup.mount Why you need it if you use automount anyway? /mnt/backup should be mounted on access. As is, I am not sure what effect it has. > After=mnt-backup.mount > > [Service] > Type=oneshot > ExecStart=/usr/bin/rsync -av --delete --exclude-from > /etc/conf.d/exclude-hortensia / /mnt/backup/hortensia > ExecStartPost=/usr/bin/umount /mnt/backup Same. I am not even sure whether it attempts to unmount underlying file system or autofs. You need to decicde whether you use automount or normal mount. > - > > I would like to mount/umount the backup partition only when the > service is triggered. Backup partition is on a USB external drive and > LVM group. > My first attempt was to add this line in my /etc/fstab: > --- > UUID=868560c1-ab69-423f-b76d-b8ea5af1b066 /mnt/backup > ext2 > noauto,x-systemd.automount,x-systemd.device-timeout=5,x-systemd.idle-timeout=60 >02 > --- > > $ ls /run/systemd/generator > . > mnt-backup.automount > mnt-backup.mount > > > For unknown reasons, the partition did mount at boot and never umount. Do you mean - you boot with USB stick inserted (before system power on) and after boot USB stick is mounted (not automounted)? Could you show /proc/mounts output? > The only way I found to achieve my goal is: > - remove the entry in /etc/fstab > - copy the .mount and .automonut files in /etc/systemd/system > Copy from where? Please show these units you use now. And does it unmount in this case after backup is finished? > I have the expected behavior this way. > My question: is this the standard way and advised to do it? Why my > ftsab entry did not work? > What is your systemd version? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Fwd: messing with .mount/.automount units
BUMP. I run once a week a simple backup with rsync. For that purpose, I wrote a service file (rsync) and a timer unit. They both work with no issues. /etc/systemd/system/backup-external.service [Unit] Description=Backup system to external drive Requires=mnt-backup.mount After=mnt-backup.mount [Service] Type=oneshot ExecStart=/usr/bin/rsync -av --delete --exclude-from /etc/conf.d/exclude-hortensia / /mnt/backup/hortensia ExecStartPost=/usr/bin/umount /mnt/backup - I would like to mount/umount the backup partition only when the service is triggered. Backup partition is on a USB external drive and LVM group. My first attempt was to add this line in my /etc/fstab: --- UUID=868560c1-ab69-423f-b76d-b8ea5af1b066 /mnt/backup ext2 noauto,x-systemd.automount,x-systemd.device-timeout=5,x-systemd.idle-timeout=60 02 --- $ ls /run/systemd/generator . mnt-backup.automount mnt-backup.mount For unknown reasons, the partition did mount at boot and never umount. The only way I found to achieve my goal is: - remove the entry in /etc/fstab - copy the .mount and .automonut files in /etc/systemd/system I have the expected behavior this way. My question: is this the standard way and advised to do it? Why my ftsab entry did not work? Thank you -- google.com/+arnaudgabourygabx ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel