Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM unkown device after installing new HDD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Tue May 29, 2007 4:56 am    Post subject: LVM unkown device after installing new HDD Reply with quote

I installed a new HDD and now one of the PVs in my VG can't be found. When I run pvscan it shows up as "unkown device" with the uuid of the missing PV so I am positive this is the drive. I think the device name may have changed after adding the new hdd as well, I don't know if this would cause the problem but how do I get it to recognize the old drive again.
Code:
# pvscan
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  PV unknown device   VG main   lvm2 [298.06 GB / 0    free]
  PV /dev/sda8        VG main   lvm2 [136.88 GB / 0    free]
  PV /dev/hda1        VG main   lvm2 [57.25 GB / 0    free]
  Total: 3 [492.19 GB] / in use: 3 [492.19 GB] / in no VG: 0 [0   ]


Code:
# vgscan
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find all physical volumes for volume group main.
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find all physical volumes for volume group main.
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find all physical volumes for volume group main.
  Couldn't find device with uuid 'Np9mRZ-KcuF-CybD-Y9Jw-2ZEY-HTKf-WyemVO'.
  Couldn't find all physical volumes for volume group main.
  Volume group "main" not found
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Tue May 29, 2007 6:10 pm    Post subject: Reply with quote

When you installed the new HDD did you remove the drive with the PV that is now missing?
Back to top
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Tue May 29, 2007 9:35 pm    Post subject: Reply with quote

embobo wrote:
When you installed the new HDD did you remove the drive with the PV that is now missing?


No it is still connected. I think it's device name was possibly renamed though, its /dev/sdc now but I THINK it might have been /dev/sdb before (/dev/sdb is now the new blank HD I just added)
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Tue May 29, 2007 10:12 pm    Post subject: Reply with quote

Zepp wrote:
embobo wrote:
When you installed the new HDD did you remove the drive with the PV that is now missing?


No it is still connected. I think it's device name was possibly renamed though, its /dev/sdc now but I THINK it might have been /dev/sdb before (/dev/sdb is now the new blank HD I just added)


Perhaps you should take out the new drive and see what happens. There may be some odd hardware issue.

Otherwise, run "fdisk -l /dev/sdc" and then for each partition run "pvdisplay /dev/sdcX" where X in the parition number, looking for the correct uuid.

Also, make sure you have the partition id set correctly "8e - Linux LVM". Maybe pvscan relies on the partition id when scanning.

Finally, you may need to delete the cache file (usually /etc/lvm/.cache; see /etc/lvm/lvm.conf).
Back to top
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Tue May 29, 2007 10:58 pm    Post subject: Reply with quote

Disconnecting the new drive made it "work" again and now the missing drive appears as /dev/sdb like before. I am pretty sure the change in device names is confusing lvm, can I not try and force udev to assign the new drive /dev/sdc and let the older drive keep /dev/sdb? btw I tried deleting the cache and change the type flags of the partitions and none of those helped.
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Tue May 29, 2007 11:46 pm    Post subject: Reply with quote

Zepp wrote:
Disconnecting the new drive made it "work" again and now the missing drive appears as /dev/sdb like before. I am pretty sure the change in device names is confusing lvm, can I not try and force udev to assign the new drive /dev/sdc and let the older drive keep /dev/sdb? btw I tried deleting the cache and change the type flags of the partitions and none of those helped.


That probably won't be easy because the the initial ram disk is where the /dev/sd* entries are created.

You could connect try swapping the physical connections between the old and new drives.

Were you able to locate the pv running pvdisplay on /dev/sdcX? Could you post the output of fdisk -l /dev/sdc?
Back to top
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Wed May 30, 2007 12:36 am    Post subject: Reply with quote

embobo wrote:
Zepp wrote:
Disconnecting the new drive made it "work" again and now the missing drive appears as /dev/sdb like before. I am pretty sure the change in device names is confusing lvm, can I not try and force udev to assign the new drive /dev/sdc and let the older drive keep /dev/sdb? btw I tried deleting the cache and change the type flags of the partitions and none of those helped.


That probably won't be easy because the the initial ram disk is where the /dev/sd* entries are created.

You could connect try swapping the physical connections between the old and new drives.

Were you able to locate the pv running pvdisplay on /dev/sdcX? Could you post the output of fdisk -l /dev/sdc?


no the pvdisplay didn't work while it was connected I recall, or at least providing nothing new or revealing. and fdisk -l /dev/sdc just outputs the one partition /dev/sdc1 that occupies the whole disk and is now of type Linux LVM

I guess I can try and rearrange the damn cables but was hoping i could avoid that :/
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Wed May 30, 2007 2:58 am    Post subject: Reply with quote

Zepp wrote:
no the pvdisplay didn't work while it was connected I recall, or at least providing nothing new or revealing. and fdisk -l /dev/sdc just outputs the one partition /dev/sdc1 that occupies the whole disk and is now of type Linux LVM

I guess I can try and rearrange the damn cables but was hoping i could avoid that :/


I'm out of suggestions: :( If pvdisplay /dev/sdc1 doesn't show anything then I don't know what
is happening.
Back to top
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Wed May 30, 2007 3:05 am    Post subject: Reply with quote

embobo wrote:
Zepp wrote:
no the pvdisplay didn't work while it was connected I recall, or at least providing nothing new or revealing. and fdisk -l /dev/sdc just outputs the one partition /dev/sdc1 that occupies the whole disk and is now of type Linux LVM

I guess I can try and rearrange the damn cables but was hoping i could avoid that :/


I'm out of suggestions: :( If pvdisplay /dev/sdc1 doesn't show anything then I don't know what
is happening.


Ya I can't remember the exact output. I'll try switch the two sata ports and see if it re-orders them and fixes it if. If not I'll run the command again and post the output :P.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum