View previous topic :: View next topic |
Author |
Message |
dbodner n00b
Joined: 27 Aug 2007 Posts: 54
|
Posted: Wed Nov 14, 2007 9:39 pm Post subject: Getting data off LVM |
|
|
Hey guys,
I have this computer I setup as a samba server, which previously had CentOS installed. I bought a new disk, and installed Gentoo on that. Booted up fine. I then went to mount the previous drive to copy data over to it the new install, and hadn't even realized it was an LVM volume. It's a single partition (sda2) in the lvm. What's the easiest way to mount this and get the data off of it? I've never really worked with an lvm before, so I'm a complete newb in this respect. |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Wed Nov 14, 2007 11:07 pm Post subject: |
|
|
emerge lvm2
and then type lvs
The output should be something like
Code: | # lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
Images vg0 -wi-ao 372.96G |
What you are looking for is the name of the volume group.
In this case it is vg0
So I then can see if there are device nodes for this:
Code: |
dev6 ~ # ls /dev/vg0/ -al
total 0
drwx------ 2 root root 100 Oct 2 14:12 .
drwxr-xr-x 21 root root 15080 Nov 11 03:10 ..
lrwxrwxrwx 1 root root 22 Oct 2 14:12 Images -> /dev/mapper/vg0-Images
|
I see that Images is there so I can mount it
mount /dev/vg0/Images /mnt/temp _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
dbodner n00b
Joined: 27 Aug 2007 Posts: 54
|
Posted: Thu Nov 15, 2007 12:22 am Post subject: |
|
|
thanks for the help. I've found the volume, but now when I do that, I get:
mount: you must specify the filesystem type |
|
Back to top |
|
|
Habbit Apprentice
Joined: 01 Sep 2007 Posts: 237 Location: 3.7137 W, 40.3873 N
|
Posted: Thu Nov 15, 2007 12:41 am Post subject: |
|
|
Well, then by all means do so. Is it ext3? reiserfs? xfs? Usually the kernel is able to figure it out by itself, but if it doesn't have the required modules you'll need to build them (return to kernel config).
Example: this will mount a reiserfs filesystem (-t reiserfs) with block tailing and access time updating disabled (-o notail,noatime) Code: | mount -t reiserfs -o notail,noatime /dev/vg0/Images /mnt/temp |
_________________
Code: | ~ $ objdump -d ./habbit_mind
90 xchg %rax, %rax
EB FD jmp $-3 |
|
|
Back to top |
|
|
dbodner n00b
Joined: 27 Aug 2007 Posts: 54
|
Posted: Thu Nov 15, 2007 3:33 am Post subject: |
|
|
that's the thing that has me puzzled. It was definitely formatted as ext3
I thought maybe since it came from a logical volume there was something I missed. |
|
Back to top |
|
|
trailnut n00b
Joined: 16 Nov 2007 Posts: 21
|
Posted: Fri Nov 16, 2007 11:27 pm Post subject: |
|
|
Some LVM recovery info here: http://www.novell.com/coolsolutions/appnote/19386.html
I had a similar problem with a drive that was part of a mdadm mirror that I wanted to mount by itself. I had to fsck it before it would mount. |
|
Back to top |
|
|
dbodner n00b
Joined: 27 Aug 2007 Posts: 54
|
Posted: Sat Nov 17, 2007 5:35 am Post subject: |
|
|
Woohoo! Got the data off the drive.
Thank everyone for their help. It's very much appreciated. |
|
Back to top |
|
|
|