mount "remounts" not working

38 views
Skip to first unread message

Arnau Bria

unread,
Aug 16, 2011, 9:34:02 AM8/16/11
to puppet...@googlegroups.com
Hi all,

I have some code like:

{
'/srv/cloud' :
name => '/srv/cloud/' ,
atboot => true ,
device => 'iscsidisk01.domain.org:/volumes/POOL/one' ,
fstype => 'nfs' ,
remounts => true ,
options => 'defaults' ,
ensure => 'mounted' ,
require => File['/srv/cloud'] ;
}

So I'd like to use "remount" at mount time, but puppet does:

Execution of '/bin/mount -o defaults /srv/cloud/' instead of:

/bin/mount -o remount /srv/cloud/

and that make puppet fail.

Am I miss-understanding remount option? is there any problem with it?

$rpm -qa|grep puppet
puppet-2.6.8-1.el6.noarch

$cat /etc/redhat-release
Scientific Linux release 6.0 (Carbon)


TIA,
Arnau

Stefan Schulte

unread,
Aug 16, 2011, 12:31:48 PM8/16/11
to puppet...@googlegroups.com
On Tue, Aug 16, 2011 at 03:34:02PM +0200, Arnau Bria wrote:
> Hi all,
>
> I have some code like:
>
> {
> '/srv/cloud' :
> name => '/srv/cloud/' ,
> atboot => true ,
> device => 'iscsidisk01.domain.org:/volumes/POOL/one' ,
> fstype => 'nfs' ,
> remounts => true ,
> options => 'defaults' ,
> ensure => 'mounted' ,
> require => File['/srv/cloud'] ;
> }
>

If you dont specify name, puppet will use the title as the name, so
/srv/cloud

The problem you're having is the trailing slash because when puppet runs
mount to check if /srv/cloud/ is already mounted it doesnt find the
mount. So puppet will always try to mount the device.

Solution: remove the name (so name will implicitly be /srv/cloud) or
change name to /srv/cloud (with no trailing slash)

FTW: This is filed as https://projects.puppetlabs.com/issues/6793

-Stefan

Arnau Bria

unread,
Aug 17, 2011, 6:05:12 AM8/17/11
to puppet...@googlegroups.com
On Tue, 16 Aug 2011 18:31:48 +0200
Stefan Schulte wrote:

[...]


> Solution: remove the name (so name will implicitly be /srv/cloud) or
> change name to /srv/cloud (with no trailing slash)
>
> FTW: This is filed as https://projects.puppetlabs.com/issues/6793

thanks a lot!

> -Stefan
Cheers,
Arnau

Reply all
Reply to author
Forward
0 new messages