On Mon, Aug 22, 2011 at 1:12 PM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote:
> On Mon, Aug 22, 2011 at 12:53:58PM -0400, Brian Troutwine wrote: > > On Mon, Aug 22, 2011 at 12:46 PM, Stefan Schulte < > > stefan.schu...@taunusstein.net> wrote: > > > > > Let's say you have just one swap device and the following configuration > > > > > > mount { 'swap': > > > fstype => 'swap', > > > device => /dev/swap1, > > > } > > > > > > and in fstab you have > > > > > > /dev/swap2 swap swap defaults 0 0 > > > > > > > On Linux systems that should be 'none' in the second field there, as well > as > > most BSD systems though it's been a while. man 5 fstab and forward search > > for 'none'. > > > > What should puppet do now? Correct: device is out of sync so change the > > > device. Now let's say you have the same fstab but add another resource > > > > > > mount { 'swap2': > > > name => 'swap', > > > fstype => 'swap', > > > device => '/dev/swap2', > > > } > > > > > > What should happen now? The first mount resource still matches with the > > > line in fstab so it will change the device. On the other hand the line > > > in fstab also matches the second resource so device will be changed > > > again. > > > > > > One "solution" is to identify a mount by mountpoint AND device but that > > > has drawbacks too > > > > > > > Please elaborate. > > > > Whenever you have the wrong device for a mount in your fstab you end up > with mounts in mounts. For me this would happens a lot for nfs mounts where > some machines are configured with hostname:/share and others with > hostname.domain.tld:/share > > If puppet identifies a mount with name AND device I will end up with two > lines in fstab for the same share. Pretty ugly. Oh geez, to my mind that's _really_ undesirable behavior. Bug worthy, really. > > > BUT, I guess the mountpoint really doesnt care for swap. At least I > have > > > the following line in fstab: > > > > > > /dev/mapper/swap none swap sw 0 0 > > > > > > > > The mount point does matter, which is the problem. If the 'mount' type > were > > keyed on an alias this would be a non-problem but instead it's by mount > > point which is, by definition, not unique. > > > > No I meant mount/swapon/swapoff probably doesnt care. So you may be able to > do > > mount { 'swap1': > device => 'swap', > fstype => 'swap', > } > mount { 'swap2': > device => 'swap', > fstype => 'swap', > } > > But as you already pointed out, according to the man page mountpoint should > always > be 'none' so that is not an option. > > -Stefan > -- Brian L. Troutwine -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.