Gentoo Archives: gentoo-user

From: Allan Gottlieb <gottlieb@×××.edu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] unmounting /usr in single user mode
Date: Tue, 20 Jul 2010 17:04:20
Message-Id: yu9tynu3z11.fsf@nyu.edu
In Reply to: Re: [gentoo-user] unmounting /usr in single user mode by Alex Schuster
1 Alex Schuster <wonko@×××××××××.org> writes:
2
3 > Allan Gottlieb writes:
4 >
5 >> I am unable to umount /usr in single user mode on an old system.
6 >> I believe the system is baselayout-1 and is amd64.
7 >> The trouble is open files, at least some of which appear to be related
8 >> to bash and locale (see the files below).
9 >>
10 >> I use grub. On the kernel line can I specify sh instead of bash?
11 >> I know sh is linked to bash, but hope that it will not use locale.
12 >
13 > Why not use a live-cd?
14
15 Good idea. I certainly have a gentoo installation CD.
16 I guess I need to ensure lvm is running. I would try this now except
17 for your intriguing comment below
18
19 >> I need to umount /usr so that I can resize it (I use lvm and have
20 >> already extended the logical volume). Specifically i want to execute
21 >> umount /usr
22 >> resize2fs /dev/vg/usr
23 >> mount /usr
24 >
25 > As long as you extend the size, resizing works online, without the need to
26 > unmount a partition. That's only necessary when reducing the size. Hooray!
27
28 This is by far be the easiest soln. I was misled by lvm howto
29 (http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html), referred to by the
30 gentoo lvm guide. The howto states
31
32 ext2/ext3
33
34 Unless you have patched your kernel with the ext2online patch it is
35 necessary to unmount the file system before resizing it. (It seems
36 that the online resizing patch is rather dangerous, so use at your own
37 risk)
38
39 # umount /dev/myvg/homevol/dev/myvg/homevol
40 # resize2fs /dev/myvg/homevol
41 # mount /dev/myvg/homevol /home
42
43 However, this document's latest copyright notice is 2006 and clearly the
44 kernel has evolved. Indeed the current man page for resize2fs
45 states that the file system can indeed be extended while mounted
46 (providing it is mounted as ext3).
47
48 thanks for setting me straight.
49 allan