-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two persistent storage mounts fail on startup #22
Comments
You can only mount a single drive. The second assignment overrides the first the former drive. |
That'd be great thanks. |
+1 for this |
+1 |
Did it get implemented? |
For someone who ends up here, I'll share the basic idea of workaround without using this plugin. The following # -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider :virtualbox do |p|
#
# Add first disk
#
p.customize [
'createmedium', 'disk',
'--filename', "/tmp/sdb.vdi",
'--format', 'VDI',
'--size', 50 * 1024]
p.customize [
'storageattach', :id,
'--storagectl', 'SATAController',
'--port', 1,
'--device', 0,
'--type', 'hdd',
'--medium', "/tmp/sdb.vdi"]
#
# Increase portcount for second disk
#
p.customize [
'storagectl', :id,
'--name', 'SATAController',
'--portcount', 2]
#
# Add second disk
#
p.customize [
'createmedium', 'disk',
'--filename', "/tmp/sdc.vdi",
'--format', 'VDI',
'--size', 100 * 1024]
p.customize [
'storageattach', :id,
'--storagectl', 'SATAController',
'--port', 2,
'--device', 0,
'--type', 'hdd',
'--medium', "/tmp/sdc.vdi"]
end
end
|
@kjtanaka Thanks! This comment saved me after an hour of frustration. Turns out using I modified your Vagrantfile slightly so that the VM can be restarted via # -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider :virtualbox do |p|
#
# Add first disk
#
unless File.exists?("/tmp/sdb.vdi")
p.customize [
'createmedium', 'disk',
'--filename', "/tmp/sdb.vdi",
'--format', 'VDI',
'--size', 50 * 1024
]
end
p.customize [
'storageattach', :id,
'--storagectl', 'SATAController',
'--port', 1,
'--device', 0,
'--type', 'hdd',
'--medium', "/tmp/sdb.vdi"
]
#
# Increase portcount for second disk
#
p.customize [
'storagectl', :id,
'--name', 'SATAController',
'--portcount', 2
]
#
# Add second disk
#
unless File.exists?("/tmp/sdc.vdi")
p.customize [
'createmedium', 'disk',
'--filename', "/tmp/sdc.vdi",
'--format', 'VDI',
'--size', 100 * 1024
]
end
p.customize [
'storageattach', :id,
'--storagectl', 'SATAController',
'--port', 2,
'--device', 0,
'--type', 'hdd',
'--medium', "/tmp/sdc.vdi"
]
end
end |
+1 for this as well |
Too bad I can't write ruby, I would have started with modifying the |
When following the example in the readme, everything works as expected. However when I add an additional persistent storage config, my first config fails during VM boot. Removing the second and rebooting succeeds.
I'm running vagrant-persistent-storage 0.0.12 on Windows 7 x64, Vagrant 1.6.3.
'The disk drive for /var/lib/mysql is not ready or not present.
Continue to wait, or Press S to skip mounting or M for manual recovery'
Redacted config:
config.persistent_storage.enabled = true
config.persistent_storage.location = '\mysql.vdi'
config.persistent_storage.size = 5000
config.persistent_storage.manage = true
config.persistent_storage.mountname = 'mysql'
config.persistent_storage.filesystem = 'ext4'
config.persistent_storage.mountpoint = '/var/lib/mysql'
config.persistent_storage.enabled = true
config.persistent_storage.location = '\files.vdi'
config.persistent_storage.size = 5000
config.persistent_storage.manage = true
config.persistent_storage.mountname = 'my_files'
config.persistent_storage.filesystem = 'ext4'
config.persistent_storage.mountpoint = '/var/lib/my_files'
The text was updated successfully, but these errors were encountered: