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

Bug#688784: marked as done (Remount persistence filesystems read-only before shutdown)



Your message dated Wed, 26 Sep 2012 12:47:46 +0000
with message-id <E1TGr1m-0007RV-4T@franck.debian.org>
and subject line Bug#688784: fixed in live-config 3.0.6-1
has caused the Debian Bug report #688784,
regarding Remount persistence filesystems read-only before shutdown
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
688784: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688784
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-config
Version: 3.0.5-1
Severity: grave
Tags: patch

Hi

Persistence filesystems have to be remounted readonly on shutdown or
reboot to avoid data corruption. The attached patch fixes this problem.
The commit message contains more details.

I set the severity to grave as this should be fixed before wheezy as it
can lead to data corruption.

Gaudenz

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 4579aadaf3ae7af7d4a8c6ba67fb1c6d93a4fa0d Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaudenz@debian.org>
Date: Tue, 25 Sep 2012 18:21:40 +0200
Subject: [PATCH] Remount persistence filesystem readonly on shutdown

All filesystems belonging to a persistence layer must be remounted
readonly to avoid data corruption. The filesystems cannot be unmounted
because they are still in use by the union mount. The sync call ensures
that all data is written to disk before shutdown or reboot. Remounting
by itself does not sync data to disk.

This code does not abort if remounting fails. We can't do much about
it anywhy at this stage.
---
 bin/boot-init.sh |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/bin/boot-init.sh b/bin/boot-init.sh
index ba99107..a500dff 100755
--- a/bin/boot-init.sh
+++ b/bin/boot-init.sh
@@ -154,7 +154,19 @@ do
 	cache_path "${path}"
 done
 
-mount -o remount,ro /live/overlay > /dev/null 2>&1
+mount -o remount,ro /live/overlay > /dev/null 2>&1 || true
+
+# remount all persistency mounts read only
+if [ -d /live/persistence ]
+then
+	for mp in $(ls /live/persistence)
+	do
+		mount -o remount,ro /live/persistence/${mp} > /dev/null 2>&1 || true
+	done
+
+	# sync all data to disk to make sure persistency is in a consistent state
+	sync
+fi
 
 # Check if we need to eject the drive
 if grep -qs "cdrom-detect/eject=false" /proc/cmdline || \
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
Source: live-config
Source-Version: 3.0.6-1

We believe that the bug you reported is fixed in the latest version of
live-config, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 688784@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 26 Sep 2012 14:26:00 +0200
Source: live-config
Binary: live-config live-config-doc live-config-systemd live-config-sysvinit live-config-upstart
Architecture: source all
Version: 3.0.6-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-config - Debian Live - System Configuration Scripts
 live-config-doc - Debian Live - System Configuration Scripts (documentation)
 live-config-systemd - Debian Live - System Configuration Scripts (systemd backend)
 live-config-sysvinit - Debian Live - System Configuration Scripts (sysvinit backend)
 live-config-upstart - Debian Live - System Configuration Scripts (upstart backend)
Closes: 688784
Changes: 
 live-config (3.0.6-1) unstable; urgency=low
 .
   * Synchronise gdm and gdm3 scripts.
   * Remounting any persistence devices read-only on shutdown (Closes:
     #688784).
   * Flushing filesystem buffers on shutdown.
Checksums-Sha1: 
 37f56ebfa954e86acbd447dca77a82aa7ca215ea 1540 live-config_3.0.6-1.dsc
 cae739cbe318e356bf5b0bbacddaa0e33b3507a7 61976 live-config_3.0.6.orig.tar.xz
 bee2da5a058f7a6995c3aae2897b2fff7df31199 11368 live-config_3.0.6-1.debian.tar.xz
 c4af89c26170b456a0569dd2fcd9902b971d531e 23152 live-config_3.0.6-1_all.deb
 0c29432a99b727f44f353fa3dd648da56c1af8d6 47300 live-config-doc_3.0.6-1_all.deb
 4fdd1086aec0c1f0d74b23503171a80e85690809 11990 live-config-systemd_3.0.6-1_all.deb
 8b43ad7437826cc589dfe5ea522f535c34dcc02d 13270 live-config-sysvinit_3.0.6-1_all.deb
 6ab7678406dde0144c80e2a67a618a17123a6742 12900 live-config-upstart_3.0.6-1_all.deb
Checksums-Sha256: 
 335584f371862d5dd1ccf5312821108defa2ae1cd511c8daa1fe13b09b30b8e8 1540 live-config_3.0.6-1.dsc
 da929f852f5c6f21d8bc326d827c25a71a88362ea380c8c9369719559c2663d3 61976 live-config_3.0.6.orig.tar.xz
 b27c983414a8abcd8a7836d1915b681fc690aa752ff0ac4e3f16dd30e5605e6c 11368 live-config_3.0.6-1.debian.tar.xz
 024f051d9d9f09fd2fa97206fa27489451257e9fa62e12b306771dc6de779861 23152 live-config_3.0.6-1_all.deb
 9a482ab3761496cfbd4b8cec9f43f03a29069437582f38963d86bc86074827f5 47300 live-config-doc_3.0.6-1_all.deb
 c90fad987b4ab3510715ebe848f8346f947dbb97d00460e19b62d865ecdc8d2f 11990 live-config-systemd_3.0.6-1_all.deb
 75ae4dc7645a0e40493158c1010392d82fd0488d603798e7816d1d31567a749e 13270 live-config-sysvinit_3.0.6-1_all.deb
 ef8aa8d85bc243407f6710da899bc220614ebb0a155bb1fcd7462b16bb850477 12900 live-config-upstart_3.0.6-1_all.deb
Files: 
 3316989bca895fd0676e6cf3a4ad426c 1540 misc optional live-config_3.0.6-1.dsc
 1efe8056ae1fcc14e4980414847076e1 61976 misc optional live-config_3.0.6.orig.tar.xz
 5d2a5c045f633c916637b5363f4147cf 11368 misc optional live-config_3.0.6-1.debian.tar.xz
 9c3b3ac5c8a7201252490d17ed8b0b99 23152 misc optional live-config_3.0.6-1_all.deb
 979680181c9e4138ef4bf308bdf54385 47300 doc optional live-config-doc_3.0.6-1_all.deb
 22e46ed28f983a752b775d9d759b3c54 11990 misc optional live-config-systemd_3.0.6-1_all.deb
 bffa03022b2b4a38b02b7bf57eac5f0a 13270 misc optional live-config-sysvinit_3.0.6-1_all.deb
 e6c6ffe6b6e00ade5697089c10caaa89 12900 misc optional live-config-upstart_3.0.6-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAlBi+BMACgkQ+C5cwEsrK55tsgCg2M9G/BNCVl8X3kPZodECBAiP
FhwAoJQ2bWKJJCRyzzW19euaamjYi34x
=qgfB
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: