vagrant-persistent-storage 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dc27d2a001b4b077dd0b32cb97a55df578bde09
|
4
|
+
data.tar.gz: 1da9e74f5225209a19191df4e5351a5cfb9bf97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c620bfd6525066c4cefd35e35abfcfc5cd894ff63f4b04d501437744ae077c3d3ed35c099c622b796f06f8f7b8f88055e85f59598b2b39cdda716303276ecdf
|
7
|
+
data.tar.gz: 80e11e4d70ceb46e59937efbab37b008e01bbf3dbd65cea0420e36917fc2b9036ed0d79f8ee9d56e77c1eb94043a376e8253e3ace588b9efcd629b28498e864d
|
data/README.md
CHANGED
@@ -23,6 +23,15 @@ config.persistent_storage.mountpoint = '/var/lib/mysql'
|
|
23
23
|
config.persistent_storage.volgroupname = 'myvolgroup'
|
24
24
|
```
|
25
25
|
|
26
|
+
With `config.persistent_storage.mountoptions` you can change the mount options (default: defaults).
|
27
|
+
A example which sets `prjquota` option with xfs.
|
28
|
+
```ruby
|
29
|
+
config.persistent_storage.mountname = 'xfs'
|
30
|
+
config.persistent_storage.filesystem = 'xfs'
|
31
|
+
config.persistent_storage.mountpoint = '/mnt/xfs'
|
32
|
+
config.persistent_storage.mountoptions = ['defaults', 'prjquota']
|
33
|
+
```
|
34
|
+
|
26
35
|
Device defaults to /dev/sdb
|
27
36
|
|
28
37
|
Every `vagrant up` will attach this file as hard disk to the guest machine.
|
@@ -41,6 +50,7 @@ with entries added to fstab ... subsequent runs will mount this disk with the op
|
|
41
50
|
|
42
51
|
* [madAndroid](https://github.com/madAndroid)
|
43
52
|
* [Jeremiah Snapp](https://github.com/jeremiahsnapp)
|
53
|
+
* [Hiroya Ito](https://github.com/hiboma)
|
44
54
|
|
45
55
|
## TODO
|
46
56
|
|
@@ -14,6 +14,7 @@ module VagrantPlugins
|
|
14
14
|
attr_accessor :location
|
15
15
|
attr_accessor :mountname
|
16
16
|
attr_accessor :mountpoint
|
17
|
+
attr_accessor :mountoptions
|
17
18
|
attr_accessor :diskdevice
|
18
19
|
attr_accessor :filesystem
|
19
20
|
attr_accessor :volgroupname
|
@@ -36,6 +37,7 @@ module VagrantPlugins
|
|
36
37
|
@location = UNSET_VALUE
|
37
38
|
@mountname = UNSET_VALUE
|
38
39
|
@mountpoint = UNSET_VALUE
|
40
|
+
@mountoptions = UNSET_VALUE
|
39
41
|
@diskdevice = UNSET_VALUE
|
40
42
|
@filesystem = UNSET_VALUE
|
41
43
|
@volgroupname = UNSET_VALUE
|
@@ -52,6 +54,7 @@ module VagrantPlugins
|
|
52
54
|
@location = 0 if @location == UNSET_VALUE
|
53
55
|
@mountname = 0 if @mountname == UNSET_VALUE
|
54
56
|
@mountpoint = 0 if @mountpoint == UNSET_VALUE
|
57
|
+
@mountoptions = 0 if @mountoptions == UNSET_VALUE
|
55
58
|
@diskdevice = 0 if @diskdevice == UNSET_VALUE
|
56
59
|
@filesystem = 0 if @filesystem == UNSET_VALUE
|
57
60
|
@volgroupname = 0 if @volgroupname == UNSET_VALUE
|
@@ -9,6 +9,7 @@ module VagrantPlugins
|
|
9
9
|
def populate_template(m)
|
10
10
|
mnt_name = m.config.persistent_storage.mountname
|
11
11
|
mnt_point = m.config.persistent_storage.mountpoint
|
12
|
+
mnt_options = m.config.persistent_storage.mountoptions
|
12
13
|
vg_name = m.config.persistent_storage.volgroupname
|
13
14
|
disk_dev = m.config.persistent_storage.diskdevice
|
14
15
|
fs_type = m.config.persistent_storage.filesystem
|
@@ -20,6 +21,7 @@ module VagrantPlugins
|
|
20
21
|
vg_name = 'vps' unless vg_name != 0
|
21
22
|
disk_dev = '/dev/sdb' unless disk_dev != 0
|
22
23
|
mnt_name = 'vps' unless mnt_name != 0
|
24
|
+
mnt_options = ['defaults'] unless mnt_options != 0
|
23
25
|
fs_type = 'ext3' unless fs_type != 0
|
24
26
|
if use_lvm
|
25
27
|
device = "/dev/#{vg_name}-vg1/#{mnt_name}"
|
@@ -57,7 +59,7 @@ echo "#{fs_type} creation return: $?" >> disk_operation_log.txt
|
|
57
59
|
# Create mountpoint #{mnt_point}
|
58
60
|
[ -d #{mnt_point} ] || mkdir -p #{mnt_point}
|
59
61
|
# Update fstab with new mountpoint name
|
60
|
-
[[ `grep -i #{device} /etc/fstab` ]] || echo #{device} #{mnt_point} #{fs_type}
|
62
|
+
[[ `grep -i #{device} /etc/fstab` ]] || echo #{device} #{mnt_point} #{fs_type} #{mnt_options.join(',')} 0 0 >> /etc/fstab
|
61
63
|
echo "fstab update returned: $?" >> disk_operation_log.txt
|
62
64
|
# Finally, mount the partition
|
63
65
|
[[ `mount | grep #{mnt_point}` ]] || mount #{mnt_point}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-persistent-storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Kusnier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|