Puppet LVM and FS Label

45 views
Skip to first unread message

Alex Samad

unread,
Aug 5, 2016, 6:00:59 AM8/5/16
to Puppet Users
Hi


in my hiera yaml file I have 

lvm::volume_groups:
  vg_data:
    # not used but needed
    physical_volumes:
      - /dev/sdb1
    #createonly: false
    # defined standard soe Centos 1.6
    logical_volumes:
      varlogyb:
        size: 10G
        #mountpath: /var/log/yb
        #mountpath_require: true


in my module I have

  # yb log
  file { '/var/log/yb/':
    ensure   => 'directory',
    group    => '0',
    mode     => '0755',
    owner    => '0',
  }

  mount { '/var/log/yb/':
    ensure  => 'mounted',
    device  => 'LABEL=varlogyb',
    dump    => '1',
    fstype  => 'ext4',
    options => 'defaults',
    pass    => '2',
    target  => '/etc/fstab',
  }


The second part isn't linking in.

In fstab I want the FS loaded by LABEL.

there are 2 lines in the fstan one from the mount above and one from the hiera above.
the filesystem was created for varlogyb but without a volume name 

I tried adding in this to my yaml file

lvm::filesystem:
  /dev/vg_data/varlogyb:
    fs_type => 'ext4',
    options => '-L  varlogyb',


but hasn't seemed to have worked.

slightly confused on how to get it working now .

my fstab looks like
LABEL=varlogyb  /var/log/yb     ext4    defaults        1       2
/dev/vg_data/varlogyb   /varlogyb       ext4    defaults        1       2


don't really want to use the bottom one, would rather use the top one ...

A

Reply all
Reply to author
Forward
0 new messages