On Wed, Jul 13, 2011 at 02:54:07PM -0700, Aaron Grewell
wrote:> I''m trying to mount multiple swap partitions in Solaris, but
I''m not sure
> how to create a working syntax for that. Since the mountpoint for a swap
> partition is ''-'' adding more than one is going to result
in a multiple
> declaration.
>
> I''d like to do something like this:
>
> mount { ''-'':
> device => ''/dev/zvol/dsk/rpool/swap01'',
> fstype => "swap",
> atboot => "no",
> options => "-",
> }
>
> mount { ''-'':
> device => ''/dev/zvol/dsk/upool/swap02'',
> fstype => "swap",
> atboot => "no",
> options => "-",
> }
>
> I would use the ''path'' property, but it''s listed
as deprecated and I''d
> rather not have my manifest break upon upgrading. Is there a better way to
> do this that I''m missing?
You cannot manage a mountpoint (here "-") twice because puppet uses
the
mount point to identify your resource.
(there is an old bug report about your exact same usecase:
http://projects.puppetlabs.com/issues/611)
Let''s say there already is a swap entry in /etc/vfstab with device set
to
"/dev/zvol/dsk/upool/swap03". Is this the first resource and device is
out of sync (is "swap03", should be "swap01") or should this
line match
your second resource and device is out of sync (is "swap03", should be
"swap02") or should it be treated as a separate resource?
To demonstrate the problem and get rid of duplicate error message you
can set two different resource titles and then set name =>
''-'' on both
resources. But then you have the problem that puppet will constantly mix up
the two resources.
Puppet just needs something to identify a resource and for the mounttype
it is the mount point. You probably can use an exec resource like
exec { ''/bin/echo ".../swap01..." >>
/etc/vfstab'':
unless => ''/bin/grep ".../swap01..."
/etc/vfstab'',
}
exec { ''/bin/echo ".../swap02..." >>
/etc/vfstab'':
unless => ''/bin/grep ".../swap02..."
/etc/vfstab'',
}
Maybe someone else has better ideas?
-Stefan
>
> --
> You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.