LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mounting a secondary drive (LVM) (https://www.linuxquestions.org/questions/linux-general-1/mounting-a-secondary-drive-lvm-540196/)

metallica1973 03-24-2007 10:32 AM

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

saavik 03-24-2007 11:08 AM

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.

metallica1973 03-24-2007 11:14 AM

I ran a pvscan /dev/hdb3 and it sees the LVM volume so how do I mount it?

saavik 03-24-2007 01:31 PM

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.

metallica1973 03-24-2007 01:56 PM

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)

metallica1973 03-24-2007 02:15 PM

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!


All times are GMT -5. The time now is 11:03 PM.