2

I created a thinpool LV using the following command:

lvcreate --type thin-pool -l 100%VG -n lv-thinpool vg-test

Now /dev/mapper has the following entries:

vg--test-lv--thinpool
vg--test-lv--thinpool_tdata
vg--test-lv--thinpool_tmeta

Why do the double hyphens appear, and how can I prevent them?

Tom Hale
  • 28,728
  • 32
  • 139
  • 229

2 Answers2

5

If either the volume group or the logical volume name contains a hyphen, then LVM doubles the hyphen when a device path file is created.

Use underscores (_) in lieu of hyphens in VG and LV names to avoid double hyphens in the composite device path name.

JRFerguson
  • 14,570
  • 3
  • 34
  • 40
1

Device mapper will add a hyphen in between the volume group and logical volume.

To be able to distinguish that hyphen separator from hyphens in the volume group or logical group name it will double up those on the volume group name and/or logical volume name.

Jorge Núñez
  • 226
  • 2
  • 4