0

I have a daemon that creates and destroys LVM2 volumes (using lvcreate and lvremove). Between creating and destroying the volume it expects a device node to be present in

/dev/<volumegroup>/<volumename>

However,for some reason every few weeks, something somewhere appears to randomly deactivate one of these volumes. Does anybody know what might be doing this?

My platform is Debian 7 amd64.

TIA

Alex Zeffertt
  • 1,462
  • 11
  • 12

1 Answers1

0

Did you try vgmknodes?

vgmknodes  [-d|--debug]  [-h|--help]  [--refresh]  [-v|--verbose] [[VolumeGroupName | LogicalVolumePath]...]

It will check the LVM2 special files in /dev that are needed for active logical volumes and creates any missing ones and removes unused ones.

vgchange -ay VolumeGroupName

If vgmknodes couldn't create device node for you, it makes VG be available to kernel.

livy.ge
  • 1
  • 2