Merge pull request #21 from charlieok/resize_disk_partition_filesystem

Resize disk partition filesystem
This commit is contained in:
Charlie O'Keefe 2018-03-21 11:34:16 -06:00 committed by GitHub
commit 559153b676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 1 deletions

View File

@ -60,7 +60,13 @@ gpg_key_id: ''
ssh_key_name: ''
```
Make sure VirtualBox, Vagrant and Ansible are installed, and then run:
Make sure VirtualBox, Vagrant and Ansible are installed.
Include this vagrant plugin to support resize of the start up disk:
vagrant plugin install vagrant-disksize
Then run:
vagrant up --provision zcash-build

1
Vagrantfile vendored
View File

@ -3,6 +3,7 @@
Vagrant.configure(2) do |config|
config.ssh.forward_agent = true
config.disksize.size = '16GB'
config.vm.define 'zcash-build', autostart: false do |gitian|
gitian.vm.box = "debian/jessie64"
gitian.vm.network "forwarded_port", guest: 22, host: 2200, auto_correct: true

View File

@ -1,4 +1,5 @@
---
- include: repartition.yml
- include: update_everything.yml
- include: packages.yml
- include: make_swap.yml

View File

@ -0,0 +1,35 @@
---
- name: Make sure parted is installed
apt:
name: parted
state: present
update_cache: yes
- name: Turn off all swap areas
command: swapoff -a
become: yes
- name: Remove swap partition from /etc/fstab
mount:
path: none
fstype: swap
opts: sw
state: absent
- name: Remove partition number 5
command: parted --script /dev/sda rm 5
become: yes
- name: Remove partition number 2
command: parted --script /dev/sda rm 2
become: yes
- name: Resize partition number 1 to fill the available space on the disk
command: parted ---pretend-input-tty /dev/sda unit % resizepart 1 yes 100
become: yes
register: parted_resize
- name: Resize filesystem on /dev/sda1 to fill the available space on the partition
command: resize2fs /dev/sda1
become: yes
register: resize2fs