On Sat, Jul 30, 2016 at 02:10:32PM -0600, Chris Murphy wrote: > On Sat, Jul 30, 2016 at 10:44 AM, Chris Adams <linux@xxxxxxxxxxx> wrote: > > Once upon a time, Chris Murphy <lists@xxxxxxxxxxxxxxxxx> said: > >> On Fri, Jul 29, 2016 at 2:36 PM, Chris Adams <linux@xxxxxxxxxxx> wrote: > >> > The actual work of pvmove is not done by the command you run; that sets > >> > it up and it is run in the background (by a kernel thread). All the > >> > command you run does then is periodically check and print a percentage > >> > done. > >> > >> It's the same with btrfs balance and scrub. It may be the operation > >> completes by kernel code, but with user space detached from the kill, > >> the status/statistics are lost. > > > > I don't know about btrfs, but with LVM, nothing is lost. You can run > > "pvmove" at any time to continue to show the status. > > I see the same behavior. I'm not sure what the user space tool > reattaches to, something in sysfs or lvmetad? > > > > And we're talking about KillUserProcesses; logging out _already_ killed > > the pvmove command. Nothing has changed. > > > Guess we'll see what btrfs upstream thinks about it, but the idea that > Btrfs users are going to know their scrubs fail due to this feature is > flawed. There's zero indication why the process dies, and there's no > way to get more information in the journal to hint at why it dies. > Plus it's inconsistent. Neither btrfs balance nor replace have this > problem, those processes continue to run with status D and R until > they complete. If KillUserProcessess is on, systemd logs when cleanup happens (in v231+). It is up to admin to connect the dots. Personally I'm using following unit: --- [Unit] Description=btrfs scrub of %I [Service] ExecStart=/usr/sbin/btrfs scrub start -B -d %I ExecReload=/usr/sbin/btrfs scrub status %I ExecStop=-/usr/sbin/btrfs scrub cancel %I IOSchedulingClass=idle BlockIOWeight=128 PrivateDevices=yes PrivateNetwork=yes PrivateTmp=yes --- Integrates nicely with timers. > systemd KillUserProcesses=yes and btrfs scrub > https://bugzilla.kernel.org/show_bug.cgi?id=150781 Why do you require systemd v230? KillUserProcess exists for 5 years already, it should work the same with all systemd. Has anything changed in 230? -- Tomasz Torcz Morality must always be based on practicality. xmpp: zdzichubg@xxxxxxxxx -- Baron Vladimir Harkonnen -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx