From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9ADC91381F3 for ; Mon, 30 Sep 2013 10:01:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 98702E0B47; Mon, 30 Sep 2013 10:01:32 +0000 (UTC) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87D27E0B1B for ; Mon, 30 Sep 2013 10:01:31 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.80.1) for gentoo-user@lists.gentoo.org with esmtp (envelope-from ) id <1VQaIE-0029qu-AO>; Mon, 30 Sep 2013 12:01:30 +0200 Received: from dslb-178-000-049-057.pools.arcor-ip.net ([178.0.49.57] helo=TranscendTheRubicon.fritz.box) by inpost2.zedat.fu-berlin.de (Exim 4.80.1) for gentoo-user@lists.gentoo.org with esmtpsa (envelope-from ) id <1VQaIE-001Eax-1a>; Mon, 30 Sep 2013 12:01:30 +0200 Date: Mon, 30 Sep 2013 12:01:27 +0200 From: Hinnerk van Bruinehsen To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] separate / and /usr to require initramfs 2013-11-01 Message-ID: <20130930100127.GA10894@TranscendTheRubicon.fritz.box> References: <20130927222109.GD23408@server> <5246079E.7090406@gmail.com> <20130927223916.GE23408@server> <52460D42.2080109@gmail.com> <52461056.9020604@gmail.com> <5246BE35.3010408@libertytrek.org> <5246E1F5.9050302@gmail.com> <5248B859.4040207@sporkbox.us> <20130930005712.14024dc7@digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <20130930005712.14024dc7@digimed.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: 178.0.49.57 X-Archives-Salt: 4e21c8c9-ae03-4187-b2e1-20a97fe1f66a X-Archives-Hash: d2a772bc99fc6d0bd24fa0bc455551df --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Mon, Sep 30, 2013 at 12:57:12AM +0100, Neil Bothwick wrote: > On Sun, 29 Sep 2013 18:31:37 -0500, Daniel Campbell wrote: > > > Curious; how is merging two filesystems done? I don't have a separate > > /usr and am completely unaffected by this change, but it's somewhat > > interesting to me. /usr stores some pretty important data on it, and I > > imagine you'd need to mount it somewhere else in order to move the > > files from it to /'s /usr dir. Is a Live environment recommended > > instead? How would you mitigate the leftover partition, assuming it's > > not adjacent to /'s partition? > > For /usr you don't need a live CD, because the contents of /usr shouldn't > change unless you instal/remove something. You can make sure they don't > change during the merge by remounting read-only > > mount /usr -o remount,ro > mkdir /newusr > rsync -a /usr/ /new/usr/ > Comment out /usr line in /etc/fstab > mv /usr /oldusr > mv /newusr /usr > reboot > rmdir /oldusr > > What you do with the old partition is up to you. In this case the > discussion was about /usr on LVM, so you just delete it and allocate the > space elsewhere when needed. > > You can even leave out the step of creating a new directory and moving it later if you bind-mount you rootfs somewhere, e.g. /mnt/gentoo. You may want to add some parameters to the call to rsync, though (e.g. those that preserve permissions, xattrs (especially for SELinux or XT-PaX) and owner/group (should be -pogX), possibly -x aswell (if you have other filesystems under /usr (e.g. a discrete FS for the portage tree). This would boil down to: mount /usr -o remout,ro # just to make sure there are no changes mount -o bind / /mnt/gentoo rsync -apogXx /usr/ /mnt/usr/ # possibly fiddle around with the flags comment out the /usr line in fstab reboot if everything's working: delete the old usr-partition (or do with it whatever you like). WKR Hinnerk --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) iQEcBAEBAgAGBQJSSUv3AAoJEJwwOFaNFkYc8V8H/0sh2V162//CSllfK0IHcPU/ Q1VltZNmSUNTmDB+lqV3i/AEGlh0EZgDRDlJUsMzb1e4J6Oj4v2ModvjxoqzTFgI uplEDpvEKvG1hfWWb4A9BcRQLI+XX85TWS1jzw6YyQqt/16H1F8MEOyovMeXOT88 94Jefd3ZBa5NvwWBrn9GwWV0mTP8+3kbhin3l46fU4HH6x/WtxDYshXV56mH+/kv YzfBXK/R7Z3LHJ/SRwwtPVG8hCo90dm/Vqt8mLL4/skTuRNAydzsMSvhCn3oyrET tZEt8iDUCrdo69sT9/DkMdImGJATWgezKLGtRBCMz6z4oyJo088IjdEkuzNPltU= =0zgX -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--