Sunday, September 29, 2019

Extending a Linux Virtuam Machine File System on a FreeNAS zvol.

I have FreeNAS system where I run a Fedora Linux system on a Virtual Machine. I want to increase the size of a file system on the Linux VM. The file system is on a FreeNAS zvol. Assuming that the file system is mounted at /mnt, and the file system is a Linux Extended File System. The steps are as follows to increase the size of the partition.

  1. Increase the zvol via FreeNAS user interface
  2. Resize the partition at the Linux VM. Go to Linux VM, run parted. See transcript below
    
       $ parted /dev/sdc
       (parted) resizepart 1 100%
       (parted) quit
       $
    

  3. Resize the file system on the partition we just resize. Below are the steps
    
       $ e2fsck -f /dev/sdc1
       $ resize2fs /dev/sdc1
    

No comments:

Post a Comment