cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Flight Engineer magoyal Flight Engineer
Flight Engineer

error in creating vg

after creating pv. when i trying to create vg then it gives me error "vgcreate failed with error code 5" . in RHEL 7. how can i solve this error

0 Kudos
6 Replies
Moderator
Moderator

Re: error in creating vg

 It would be helpful to know other details like the type of the partition, size and any other steps that you may have tried so far. 

I would suggest you to run vgcreate -v  <vgname> <devicename> to get verbose output.

Jayadev

0 Kudos
Reply
Loading...
Flight Engineer magoyal Flight Engineer
Flight Engineer

Re: error in creating vg

when I am trying to create PV it gives me an error. Device /dev/sda3 not found (or ignored by filtering).

"Kindly tell me how to troubleshoot this part and what can be the reason. I have already done partprobe /dev/sda"

0 Kudos
Reply
Loading...

Re: error in creating vg

First check if /dev/sda3 device exist? you may use cat /proc/partitions. It seems, this sda3 device doesn't exist and you would have got error when you had run partprobe something like below:-

 

  • While on-disk partition table has been updated, observe that on-memory kernel partition table has not:

  •  

    # partprobe 
    Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
    
    # cat /proc/partitions | grep sd
     252        0   31457280 sda
     252        1     512000 sda1
     252        2   13631488 sda2

    Execute partx (provided by util-linux package) with --update option on the block device to update the in-memory kernel partition table from the on-disk partition table:


     partx -u /dev/sda

     again verify /proc/partition and check if you got sda3.

 

0 Kudos
Reply
Loading...
Moderator
Moderator

Re: error in creating vg

I suggest that this issue should be troubleshooted in the reverse way. One should investigate the reason for /dev/sda3 being unavailable. If this is a blockstarage then rediscovering or restarting the respective service should make it available . lsblk or fdisk -l should help to know if the device is available. If the issue persist then please open a support ticket to get the exact solution.

Thanks,

Jayadev

0 Kudos
Reply
Loading...
Flight Engineer williamwlk Flight Engineer
Flight Engineer

Re: error in creating vg

Hi @magoyal

If your partitions are too messy, partprobe will not be able to inform the OS of partition table changes successfully.  Best to reboot the machine or VM to let the Kernel scan the changes gracefully.

Then, what? If the problem still persists, give us the oput of this:

#lsblk

#pvs

#vgs

#lvs

And try creating do a vgcreate again with -vvvv as in #vgcreate -vvvv coz the error code you got is not really helping as it might just mean "Command Failed" (according to errors.h of lvm2 package.)

 

Cheers.
Will

 

0 Kudos
Reply
Loading...
Flight Engineer williamwlk Flight Engineer
Flight Engineer

Re: error in creating vg

Hi @magoyal

This is sorted?

Happy?

Will

0 Kudos
Reply
Loading...
Join the conversation
You must log in to join this conversation.