Skip to content
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

failed to create disk with specified size for ubuntu 16.04 #59

Closed
azbarcea opened this issue Jan 22, 2017 · 3 comments
Closed

failed to create disk with specified size for ubuntu 16.04 #59

azbarcea opened this issue Jan 22, 2017 · 3 comments

Comments

@azbarcea
Copy link
Contributor

Using the following Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "ubuntu/xenial64"

  # The url from where the 'config.vm.box' box will be fetched if it
  # doesn't already exist on the user's system.
  config.vm.box_url = "http://files.vagrantup.com/xenial64.box"

  # configure a persistent storage for mysql data
  config.persistent_storage.enabled = true
  config.persistent_storage.location = "virtualdrive.vdi"
  config.persistent_storage.size = 5000
  config.persistent_storage.mountname = 'mysql'
  config.persistent_storage.filesystem = 'ext4'
  config.persistent_storage.mountpoint = '/var/lib/mysql'
  config.persistent_storage.volgroupname = 'myvolgroup'

end

checking the PV inside:

ubuntu@ubuntu-xenial:~$ sudo pvdisplay 
sudo: unable to resolve host ubuntu-xenial
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               myvolgroup
  PV Size               9.00 MiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              2
  Free PE               0
  Allocated PE          2
  PV UUID               8aBRG9-tFfk-TpWE-a3Wk-RH4m-s5iE-SLp2y4

I presume because the ubuntu/xenial64 box has already 2 disks.

@azbarcea
Copy link
Contributor Author

My presumption was right. For me, the fix was adding:

config.persistent_storage.diskdevice = '/dev/sdc'

azbarcea added a commit to azbarcea/vagrant-persistent-storage that referenced this issue Jan 22, 2017
@HarryR
Copy link

HarryR commented Feb 1, 2017

This fixed my problem when using Ubuntu 16.04 LTS cloud image box.

@kusnier
Copy link
Owner

kusnier commented Feb 2, 2017

Thanks.

@kusnier kusnier closed this as completed Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants