LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-15-2006, 04:23 AM   #1
conalmc
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
problem mounting LVM


Hello

I am having a problem mounting an LVM partition. Basically , I have had to do a fresh install of centos4.2 on a new drive. I need to mount the root partition from the old drive. The old drive is not damaged in anyway and still works. I need to mount /dev/hdc2 so i can access the data. Here are my results:

[root@server /]# mount /dev/hdc2 /oldroot
mount: /dev/hdc2 already mounted or /oldroot busy

Here is the fdisk -l info:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 274 2096482+ 82 Linux swap
/dev/hda3 275 535 2096482+ 83 Linux
/dev/hda4 536 24321 191061045 5 Extended
/dev/hda5 536 24321 191061013+ 83 Linux

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 9729 78043770 8e Linux LVM

/dev/hdc1 obviously has no issue mounting. The /oldroot directory in which i am trying to mount to is completely empty and is does not have any partitions mounted to it. Any help/suggestions would be awsome.

Thank
Conal
 
Old 02-15-2006, 09:27 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
surely the old root wont be in your lvm tab? also, you dont specify a file system type in your mount command....
 
Old 02-15-2006, 09:42 AM   #3
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,024
Blog Entries: 5

Rep: Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789
It's telling you something is already in use/busy.

Try running lsof against both the device and the mount point to see if either is in fact actually in use.
 
Old 02-15-2006, 01:29 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,030

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
You don't mount an LVM partition directly. You mount the logical volumes contained within the LVM partition. The error message you're getting is misleading, to say the least. But I think the root cause of your problem is the incorrect way you're attempting to use the partition.

See the LVM mounting example from my system below. I have LVM on /dev/sd8 but you can see that /dev/sd8 is NOT directly mounted anywhere. The individual LV's inside the LVM partition are mounted, e.g., /dev/mapper/vg0-usr is mounted on /usr, /dev/mapper/vg0-var is mounted on /var, etc.
Code:
# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        5099    40957686    7  HPFS/NTFS
/dev/sda2            5100       10199    40965750    7  HPFS/NTFS
/dev/sda3           10200       14024    30724312+   c  W95 FAT32 (LBA)
/dev/sda4           14025       19452    43600410    f  W95 Ext'd (LBA)
/dev/sda5   *       14025       14030       48163+  83  Linux
/dev/sda6           14031       14091      489951   82  Linux swap / Solaris
/dev/sda7           14092       14213      979933+  83  Linux
/dev/sda8           14214       19452    42082236   8e  Linux LVM
# mount
/dev/sda7 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda5 on /boot type ext3 (rw)
/dev/mapper/vg0-usr on /usr type ext3 (rw)
/dev/mapper/vg0-var on /var type ext3 (rw)
/dev/mapper/vg0-opt on /opt type ext3 (rw)
/dev/mapper/vg0-tmp on /tmp type ext3 (rw)
/dev/mapper/vg0-home on /home type ext3 (rw)
/dev/sda1 on /mnt/windows/c type ntfs (ro,umask=0222)
/dev/sda2 on /mnt/windows/d type ntfs (ro,umask=0222)
/dev/sda3 on /mnt/windows/e type vfat (rw,umask=0000)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
#
Here are the LVM related entries in my /etc/fstab:
Code:
...
#
# Logical Volume Management (LVM2 on /dev/sda8)
# Note: /usr/local is symlinked to /opt
#
/dev/mapper/vg0-usr  /usr       ext3    defaults                     0       2
/dev/mapper/vg0-var  /var       ext3    defaults                     0       2
/dev/mapper/vg0-opt  /opt       ext3    defaults                     0       2
/dev/mapper/vg0-tmp  /tmp       ext3    defaults                     0       2
/dev/mapper/vg0-home /home      ext3    defaults                     0       2
...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting LVM drive as a recovery effort carlfacer Linux - Hardware 1 01-01-2006 07:15 PM
Problems mounting LVM-partition RacerDude Fedora 1 11-22-2005 12:04 PM
mounting red hat partitions with that LVM nonsense? silex_88 Linux - Software 4 09-12-2005 09:06 PM
Mounting a JFS LVM vbtalent Fedora 4 08-29-2005 12:28 PM
LVM volume mounting trouble SergeyAC Linux - Software 3 04-11-2005 02:28 PM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration