Coder Social home page Coder Social logo

truenas-vdisk-expand's Introduction

vdisk-expand.sh for TrueNAS Core

This script expands ZFS pool after increasing the size of a virtual disk in VMware ESXi, VirtualBox or BHyve.

Typical usage

When running TrueNAS as a virtual machine with virtual disks when you run out of space, you can increase the size of the virtual disks and then expand the associated ZFS pool with this shell script.

Example with VMware ESXi

  • In VMware ESXi, increase the virtual disk size. It can be done while the TrueNAS vm is running.

  • Go the the TrueNAS shell and run:

vdisk-expand.sh /dev/da1

Example with VirtualBox

  • Power off the FreeNAS vm because VirtualBox does not support online modification of virtual disks.

  • Increase the virtual disk size to 16 GB with VBoxManage.

VBoxManage modifyhd freenas-disk1.vdi  --resize 16384
  • Power on the TrueNAS virtual machine.

  • Go the the TrueNAS shell and run:

vdisk-expand.sh /dev/ada1

Example with BHyve and virtio disks

  • Increase the zvol to 200 GB
zfs set volsize=200G tank1/vm/my_zvol

You have to poweroff/poweron the VM to redetect the new size of the disk.

Then run the script:

vdisk-expand.sh /dev/vtbd1

Compatibility

This script is compatible with FreeNAS 11.x and TrueNAS Core 12.0

truenas-vdisk-expand's People

Contributors

sblanchet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

truenas-vdisk-expand's Issues

No issue, just wanted to thank you!!!

Nearly over 2 weeks, i've searched to expand a Volume in FREENAS.

Im using a ESXi server with FREENAS as a VM on it. As for experimental and future proof, i would like to expand my volume of my SMB share.

Thanks to your script, the added volume in ESXi to the drive, has been recognized by FREENAS now.

Again, Thank you very much!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.