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

Re: [linux-lvm] lvextend problem

On Tue, Feb 27, 2007 at 04:55:00PM +0100, Guilio Iannazzo wrote:
about the *environment* :
[root priscilla var]# cat /proc/version
Linux version 2.4.21-20.ELsmp (bhcompile tweety build redhat com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)) #1 SMP Wed Aug 18 20:46:40 EDT 2004

The *problem* :
I extended a logical volume following the procedure

umount -l /dev/Volume00/var

from umount man page:
      -l     Lazy unmount. Detach the filesystem from the filesystem  hierar-
             chy now, and cleanup all references to the filesystem as soon as
             it is not busy anymore.  (Requires kernel 2.4.11 or later.)

the key phrase here is: "as soon as it is not busy anymore"

lvextend -L+5G /dev/Volume00/var

e2fsck -f /dev/Volume00/var
so you fscked an active filesystem, bad bad bad...

--- i think you wanted to resize2fs here ---
mount -l /dev/Volume00/var
'mount -l' is _not_ the opposite of 'umount -l'


Now, once the filesystem mounted, I've lost all the data I had on /var (which I didn't back up, I know I know it's extremely stupid, luckily enough this is not a production machine).
For example

[root priscilla var]# ll /var/
total 0


[root priscilla var]# mkdir /var/log
mkdir: cannot create directory `/var/log': File exists

What happened ? How to get all the data back ?
is the filesystem really mounted now?

- reboot the machine into single user
- fsck the filesystem again
- and try mounting it and check all data is still here.
if it is:
- backup your data
- umount the filesystem (really, not using -l)
- fsck -f - resize2fs
- mount again
- return to multi-user

Luca Berra -- bluca comedia it
       Communication Media & Services S.r.l.
/ \

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