updated loopback, xfs, and mount to support non-loopback devices
This commit is contained in:
BIN
manifests/storage/.mount.pp.swp
Normal file
BIN
manifests/storage/.mount.pp.swp
Normal file
Binary file not shown.
@@ -39,6 +39,7 @@ define swift::storage::loopback(
|
||||
mnt_base_dir => $mnt_base_dir,
|
||||
byte_size => $byte_size,
|
||||
subscribe => Exec["create_partition-${name}"],
|
||||
loopback => true,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -5,9 +5,14 @@
|
||||
#
|
||||
define swift::storage::mount(
|
||||
$device,
|
||||
$mnt_base_dir = '/srv/node'
|
||||
$mnt_base_dir = '/srv/node',
|
||||
$loopback = false,
|
||||
) {
|
||||
|
||||
if($loopback){
|
||||
$options = 'noatime,nodiratime,nobarrier,logbufs=8,loop'
|
||||
} else {
|
||||
$options = 'noatime,nodiratime,nobarrier,logbufs=8'
|
||||
}
|
||||
# the directory that represents the mount point
|
||||
# needs to exist
|
||||
file { "${mnt_base_dir}/${name}":
|
||||
@@ -20,7 +25,7 @@ define swift::storage::mount(
|
||||
ensure => present,
|
||||
device => $device,
|
||||
fstype => 'xfs',
|
||||
options => 'loop,noatime,nodiratime,nobarrier,logbufs=8',
|
||||
options => $options,
|
||||
require => File["${mnt_base_dir}/${name}"]
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,8 @@
|
||||
define swift::storage::xfs(
|
||||
$device,
|
||||
$byte_size = '1024',
|
||||
$mnt_base_dir = '/srv/node'
|
||||
$mnt_base_dir = '/srv/node',
|
||||
$loopback = false,
|
||||
) {
|
||||
|
||||
include swift::xfs
|
||||
@@ -29,7 +30,8 @@ define swift::storage::xfs(
|
||||
swift::storage::mount { $name:
|
||||
device => $device,
|
||||
mnt_base_dir => $mnt_base_dir,
|
||||
subscribe => Exec["mkfs-${name}"]
|
||||
subscribe => Exec["mkfs-${name}"],
|
||||
loopback => $loopback,
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user