Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3713

Allow zfs to create a zvol

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • PUP 3.8.4
    • PUP 4.10.9, PUP 5.3.3
    • None
    • None
    • Platform Core
    • Platform Core KANBAN
    • Bug Fix
    • Puppet now correctly uses the `-V` flag to set volsize property when creating a zfs volume. Previously it would pass this property via `-o`, which was incorrect and failed.
    • Manual

    Description

      The volsize property must be specified explicity when creating a zvol and can not be passed as a property. Detect this in zfs:create

      --- puppet/provider/zfs/zfs.rb	2014-06-10 09:08:19.000000000 +1200
      +++ puppet/provider/zfs/zfs.rb	2014-11-27 10:39:05.286217988 +1300
      @@ -15,7 +15,11 @@
           Puppet::Type.type(:zfs).validproperties.each do |property|
             next if property == :ensure
             if value = @resource[property] and value != ""
      -        properties << "-o" << "#{property}=#{value}"
      +	if property == :volsize
      +	  properties << "-V" << "#{value}"
      +	else
      +          properties << "-o" << "#{property}=#{value}"
      +	end
             end
           end
           properties
      

      Attachments

        1. zfs.rb.diff
          0.5 kB
          Andrew Thompson

        Activity

          People

            Unassigned Unassigned
            thompsa Andrew Thompson
            Eric Thompson Eric Thompson
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support