Strange issue: Snapshot creation appears to destroy logical volume!

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

 



This may be a Fedora problem or an LVM problem, but I think it's more
likely to be a pilot-error issue. Nonetheless, I hope someone here can
shed some light on the following puzzling situation:

To resolve a disagreement on IRC as to whether or not an LV had to be
mounted ro to take a snapshot of it I decided to experiment by running
the following with the lv still mounted rw:

sudo lvcreate -s -L 50M -n test /dev/mapper/vg0-home

I used the /dev/mapper name because that's what showed up in df's
output. In retrospect this was dumb because I had never seen /dev/mapper
before and am still fuzzy on it now. Google produces lots of references
to it but few explanations. Anyway the error I got when doing this
seemed pretty harmless (don't remember the specifics, though) so I next
did:

sudo lvcreate -s -L 50M -n test /dev/vg0/home

This complained about there not being enough free PEs (only two free) to
create the requested snapshot. So, figuring I only needed the snap long
enough to see if it would create, I ran:

sudo lvcreate -s -l 2 -n test /dev/vg0/home

Sadly (ok, stupidly) I didn't write down exactly what happened next. All
I remember is that an error was generated saying something along the
lines of "couldn't recover logical volume 'home'", without much else to
explain why said recovery was necessary. Sure enough any attempt to
access /home, like 'ls /home', hung indefinitely. 

I should have let things alone then and asked for help, but it's a
desktop system without any especially important information on it and I
was curious. So I rebooted the system and sure enough found myself
dumped to the emergency prompt. I commented /home out of fstab and now
the system boots but /dev/vg0/home simply does not exist. The snapshot,
/dev/vg0/test does exist, but lvdisplay describes its status as
"INACTIVE destination for /dev/vg0/home". 

The system is running FC2 (up2dated).

I realize that this isn't much to go on, but if anyone has any insight
as to what happened and how/if I can get back the lost data I'd
appreciate it. There was nothing vital on the LV but it bothers me that
I could do so much damage so easily and I'd really like to know what
went wrong. Even if it looks like I didn't do anything that could
cause this I'd still like to hear it just so I know I'm not crazy! =;)

Thanks,
--Brad



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux