From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: File systems Date: Wed, 14 May 2014 19:12:40 +0200 Message-ID: <87bnv0i8s7.fsf@gnu.org> References: <87eh01titd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkcjZ-0007gH-De for guix-devel@gnu.org; Wed, 14 May 2014 13:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkcjU-0003EI-0A for guix-devel@gnu.org; Wed, 14 May 2014 13:12:49 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:49382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkcjT-0003DH-Pk for guix-devel@gnu.org; Wed, 14 May 2014 13:12:43 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D05BD28D1 for ; Wed, 14 May 2014 19:12:41 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RcgtwLOdAQ3t for ; Wed, 14 May 2014 19:12:41 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 863D42344 for ; Wed, 14 May 2014 19:12:41 +0200 (CEST) In-Reply-To: <87eh01titd.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 10 May 2014 23:39:10 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > To support clean unmounting of file systems upon shutdown, special dmd > services are added to the graph (see (gnu services base)): > > =E2=80=A2 =E2=80=98root-file-system=E2=80=99, whose stop action is to r= emount / read-only; > this is the last service that is stopped when shutting down. > > =E2=80=A2 For each file system not needed for boot, there=E2=80=99s a > =E2=80=98file-system-XYZ=E2=80=99 service depending only on =E2=80=98= root-file-system=E2=80=99, with > a stop action to unmount XYZ. > > =E2=80=A2 =E2=80=98user-processes=E2=80=99, which depends on all the = =E2=80=98file-system-XYZ=E2=80=99 and on > =E2=80=98root-file-system=E2=80=99. Its stop action is to kill all t= he processes > still running. All the services that spawn processes must depend on > it. The goal is to make sure the file systems can actually be > unmounted. There was the complication that when root is a user-space file system, like unionfs-fuse (as in the VM produced by =E2=80=98guix system vm=E2=80= =99), =E2=80=98user-processes=E2=80=99 would kill it, thus leading to breakage ju= st before reboot. Commit 7d57cfd fixes that by providing a mechanism to tell =E2=80=98user-processes=E2=80=99 which processes must remain alive during s= hutdown. In the unionfs-fuse case, the initrd code just writes the PID of unionfs-fuse to /etc/dmd/do-not-kill, and =E2=80=98user-processes=E2=80=99 = honors that file. Ludo=E2=80=99.