From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] fsck separate /usr
Date: Sun, 13 May 2012 17:11:55 +0200 [thread overview]
Message-ID: <20120513171155.09993b48@weird.wonkology.org> (raw)
In-Reply-To: <20120513140210.GA3063@ca.inter.net>
Philip Webb writes:
> 120513 Alex Schuster wrote:
> > I'm using the new udev with a separate /usr partition ...
> > after an unclean shutdown
> > -- reading files in /proc/<pid>/ was not a good idea --
> > /usr wants to be fsck'ed. But it is already mounted at that stage.
> > Maybe I should just enlarge my root partition and move /usr there
>
> Did you see my description of how I did that ? -- see list 120506 .
> The actual process took me 2 h 30 m , but preparations spread out
> longer. Everything else is working just as before,
> but I don't have to bother ever about Initramfs (whatever that is :
> smile), & can update Udev without any worries when it becomes stable.
> HTH
I saw that, but here it will be much easier. All is on LVM here, so this should do it:
# enlarge root partition
lvresize -L +17G /dev/weird/root
cryptsetup resize root
resize2fs /dev/mapper/root
# make sure /usr is not being written to. For other partitions, I'd
# create an LVM snapshot
mount -o remount,ro /usr
# mount root to another place, without mounts like /usr showing up there
mkdir /tmp/bindroot
mount -o bind / /tmp/bindroot
# copy data over
rsync -ax /usr /tmp/bindroot/
# remove /usr stuff from fstab and dmcrypt
sed "/\/dev\/weird\/usr/ d" /etc/fstab
sed -i "/^target=usr2$/{N;N:N:d}" /etc/conf.d/dmcrypt
# done!
reboot
No need for downtime except for the reboot, I guess I cannot unmount /usr
otherwise.
Wonko
next prev parent reply other threads:[~2012-05-13 15:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-13 0:43 [gentoo-user] fsck separate /usr Alex Schuster
2012-05-13 0:54 ` Canek Peláez Valdés
2012-05-13 3:54 ` kwkhui
2012-05-13 4:25 ` Canek Peláez Valdés
2012-05-13 10:46 ` Alex Schuster
2012-05-13 12:27 ` Dale
2012-05-13 14:02 ` Philip Webb
2012-05-13 15:11 ` Alex Schuster [this message]
2012-05-13 17:08 ` Neil Bothwick
2012-05-13 17:27 ` Alex Schuster
2012-05-13 17:44 ` Neil Bothwick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120513171155.09993b48@weird.wonkology.org \
--to=wonko@wonkology.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox