LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-24-2007, 10:32 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,099

Rep: Reputation: 57
mounting a secondary drive (LVM)


I have added a secondary hdd to my server and I read the /var/log/dmesg and it sees the partitions as hdb1, hdb2, and hdb3. I run a fdisk -l and I know that I need to mount hdb3 which is a LVM partition. My question is how do I mount a LVM on /dev/hdb3. I tried mount -t auto /dev/hdb3 /media/old_drive(that didnt work), I tried mount -t ext3 /dev/hdb3 /media/old_drive(that didnt work) help?

//mod note - unrelated to networking. more to linux - general

Last edited by acid_kewpie; 03-24-2007 at 10:46 AM.
 
Old 03-24-2007, 11:08 AM   #2
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES11 / FC20/ OES / CentOS
Posts: 595

Rep: Reputation: 32
First you need to scan for lvm partitions on that drive.

I do not know the exact thing to type but its some thing like:


a) lvscan /dev/hda
b) lvavailable -y (thats really wrong but you `ll find somthing in google)
c) than you can mount the lvms


but you will never type something like mount -t auto /dev/hdb1 /mount/test as it will be an extra lvm device like lvm1.

so mount /dev/lvm1/alpha /mnt/test.
 
Old 03-24-2007, 11:14 AM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,099

Original Poster
Rep: Reputation: 57
I ran a pvscan /dev/hdb3 and it sees the LVM volume so how do I mount it?
 
Old 03-24-2007, 01:31 PM   #4
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES11 / FC20/ OES / CentOS
Posts: 595

Rep: Reputation: 32
after you scan it you need to make it acitve be typing

lvchange -a y (or something like this) look at man lvchange

after that you can mount the volume.
 
Old 03-24-2007, 01:56 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,099

Original Poster
Rep: Reputation: 57
lvscan only scans the local LVM and not the secondary disk. I tried

PHP Code:
lvmlvscan /dev/hdb3
  No additional command line arguments allowed 
PHP Code:
lvmpvscan /dev/hdb3
  PV 
/dev/hdb3   VG system   lvm2 [18.00 GB 0    free]
  
Total[18.00 GB] / in use: [18.00 GB] / in no VG[0   ]
lvm
It seems that everytime I type a lvm command it is looking at the local drive and not the secondary drive(hdb3)
 
Old 03-24-2007, 02:15 PM   #6
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,099

Original Poster
Rep: Reputation: 57
PHP Code:
lvmvgscan
  Reading all physical volumes
.  This may take a while...
  
Found volume group "system" using metadata type lvm2
lvm
pvscan /dev/hda1
  PV 
/dev/hdb3   VG system   lvm2 [18.00 GB 0    free]
  
Total[18.00 GB] / in use: [18.00 GB] / in no VG[0   ]
lvmpvscan /dev/hdb3
  PV 
/dev/hdb3   VG system   lvm2 [18.00 GB 0    free]
  
Total[18.00 GB] / in use: [18.00 GB] / in no VG[0   ]
lvm
PHP Code:
lvmpvdisplay
  
--- Physical volume ---
  
PV Name               /dev/hdb3
  VG Name               system
  PV Size               18.00 GB 
not usable 0   
  Allocatable           yes 
(but full)
  
PE Size (KByte)       4096
  Total PE              4608
  Free PE               0
  Allocated PE          4608
  PV UUID               29ZkbS
-yWYJ-JH7n-Usni-xWtu-D1iP-vNeBe2 
I see that I have both of the LVM Volumes are the same name and from what I read can cause problems!

Last edited by metallica1973; 03-24-2007 at 02:48 PM.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot problem with LVM using Ubuntu 6.03 as secondary linux distro with FC5 and Win XP grandpa-geek Ubuntu 4 06-25-2006 12:18 PM
Mounting LVM drive as a recovery effort carlfacer Linux - Hardware 1 01-01-2006 06:15 PM
Mounting a hard-drive on secondary ide linuxjuggler Linux - Newbie 1 12-16-2003 12:15 AM
Mounting Secondary HDD nairnie Linux - Newbie 7 11-17-2003 07:00 AM
mounting secondary win partition? Gweilo Linux - Newbie 9 10-12-2003 09:46 AM


All times are GMT -5. The time now is 01:31 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