-1

We know that we can use vgcreate to create a group and lvcreate to create a volume. And the volume would be /dev/mapper/$group/$volume, but if we want the volume to be created at say $dir/mapper/$group/$volume. I saw someone write a program which can do this, does anybody know how he did it?

dspjm
  • 5,473
  • 6
  • 41
  • 62

1 Answers1

1

It is set in the configuration file (usually /etc/lvm/lvm.conf):

# This section allows you to configure which block devices should
# be used by the LVM system.
devices {

    # Where do you want your volume groups to appear ?
    dir = "/dev"

    # An array of directories that contain the device nodes you wish
    # to use with LVM2.
    scan = [ "/dev" ]
Oliver Matthews
  • 7,497
  • 3
  • 33
  • 36