Gentoo Archives: gentoo-user

From: Allan Gottlieb <gottlieb@×××.edu>
To: gentoo-user@l.g.o
Subject: [gentoo-user] unmounting /usr in single user mode
Date: Mon, 19 Jul 2010 19:03:26
Message-Id: yu97hkrmh7m.fsf@nyu.edu
1 I am unable to umount /usr in single user mode on an old system.
2 I believe the system is baselayout-1 and is amd64.
3 The trouble is open files, at least some of which appear to be related
4 to bash and locale (see the files below).
5
6 I use grub. On the kernel line can I specify sh instead of bash?
7 I know sh is linked to bash, but hope that it will not use locale.
8
9 I need to umount /usr so that I can resize it (I use lvm and have
10 already extended the logical volume). Specifically i want to execute
11 umount /usr
12 resize2fs /dev/vg/usr
13 mount /usr
14
15 (I realize I will probably need an e2fsck).
16
17 On my new system (baselayout-2), this was easy as /usr is not mounted
18 when rebooting into single user mode.
19
20 thanks,
21 allan
22
23 output of lsof | grep usr
24
25 bash 1907 root mem REG 254,0 1772320 245830 /usr/lib64/locale/locale-archive
26 bash 1907 root mem REG 254,0 26050 230642 /usr/lib64/gconv/gconv-modules.cache
27 bash 2125 root mem REG 254,0 1772320 245830 /usr/lib64/locale/locale-archive
28 bash 2125 root mem REG 254,0 26050 230642 /usr/lib64/gconv/gconv-modules.cache
29 lsof 2149 root txt REG 254,0 131144 92097 /usr/bin/lsof
30 lsof 2149 root mem REG 254,0 1772320 245830 /usr/lib64/locale/locale-archive
31 grep 2150 root mem REG 254,0 1772320 245830 /usr/lib64/locale/locale-archive
32 grep 2150 root mem REG 254,0 26050 230642 /usr/lib64/gconv/gconv-modules.cache
33 lsof 2151 root txt REG 254,0 131144 92097 /usr/bin/lsof
34 lsof 2151 root mem REG 254,0 1772320 245830 /usr/lib64/locale/locale-archive
35
36
37 output of fuser /usr/lib64/locale/locale-archive
38
39 1907 2125
40
41 and 1907 was /bin/bash

Replies

Subject Author
Re: [gentoo-user] unmounting /usr in single user mode Alex Schuster <wonko@×××××××××.org>
Re: [gentoo-user] unmounting /usr in single user mode "Kacper Kopczyński" <capsel@××××××××××××.pl>
Re: [gentoo-user] unmounting /usr in single user mode Alan McKinnon <alan.mckinnon@×××××.com>