Is there any method of forcibly umounting an NFS mounted directory? We have a test environment managed under puppet that is also our DR environment. In a DR scenario we''ll be umounting all NFS shares from out test array and remounting to our DR array. However, as this is a test environment we have users logged on, so when Puppet attempts to unmount the test directories, it fails with "umount: /test/dir: device is busy" if I fuser against the /test/dir directory and kill the PID all is OK. I need a method of either forcibly umounting the array, or killing all PID''s using the mounted directores so Puppet can unmount them. I''d like all this done from Puppet. Any ideas? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/DAsPOFksueMJ. 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.
On Oct 8, 2012, at 5:38 AM, timo wrote:> I need a method of either forcibly umounting the array, or killing all PID''s using the mounted directores so Puppet can unmount them. I''d like all this done from Puppet. > > Any ideas?http://docs.puppetlabs.com/references/latest/type.html#exec -- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.
On Monday, October 8, 2012 7:38:23 AM UTC-5, timo wrote:> > Is there any method of forcibly umounting an NFS mounted directory? > > We have a test environment managed under puppet that is also our DR > environment. In a DR scenario we''ll be umounting all NFS shares from out > test array and remounting to our DR array. > > However, as this is a test environment we have users logged on, so when > Puppet attempts to unmount the test directories, it fails with "umount: > /test/dir: device is busy" if I fuser against the /test/dir directory and > kill the PID all is OK. > > I need a method of either forcibly umounting the array, or killing all > PID''s using the mounted directores so Puppet can unmount them. I''d like all > this done from Puppet. > > Any ideas? > >Jo''s is probably the best available approach. The main alternative I see would be to write and use a custom provider for the Mount resource type, but I''m not at all convinced that the cost/benefit on that would even come close to justifying it. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/0bq7g4lZbr0J. 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.
Thanks for the replies. I created a module and made it a ''requires'' of mount.pp, The exec subscribes to a text file that holds the current environment (test/production) then kills any PID''s ''onlyif'' lsof -N returns a 0. So in the event of DR, puppet can unmount and remount without a problem. Dirty but it works. Cheers, On Monday, October 8, 2012 1:38:23 PM UTC+1, timo wrote:> > Is there any method of forcibly umounting an NFS mounted directory? > > We have a test environment managed under puppet that is also our DR > environment. In a DR scenario we''ll be umounting all NFS shares from out > test array and remounting to our DR array. > > However, as this is a test environment we have users logged on, so when > Puppet attempts to unmount the test directories, it fails with "umount: > /test/dir: device is busy" if I fuser against the /test/dir directory and > kill the PID all is OK. > > I need a method of either forcibly umounting the array, or killing all > PID''s using the mounted directores so Puppet can unmount them. I''d like all > this done from Puppet. > > Any ideas? > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/o__ruNxeTMMJ. 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.