Running out of space, we got an additional storage for our VMs. This time around it was a large storage (vtzck2) of ~ 2TB HDD added to 180GB SSD (vtzck0) that we had only been using until now.
Here are the commands I ran to expand the root.
***Steps 3-6 may not be necessary if using ZFS. I had run them in the course of getting things to work.***
My Questions:
1.) I am not sure if the command 'newfs -U /dev/vtbd2p1' was the proper command to use after using 'gpart add -t freebsd-zfs -a 1M vtbd2'. It appears I mixed UFS and ZFS filesystems or overwrote the ZFS even though the root expanded to approx 2.2TB . What should have been the proper command(s) after the 'gpart add' since I wanted a ZFS?
2.) What are the implications of what I have done so far e.g. performance degradation for mixing a zpool of ufs on HDD big disk with zfs on SSD root/base disk? Any recommendations?
3.) I want to ensure that I have a system whereby I can detach the new storage, download my base/host image and carry out other operations as I like. If I detach it the right way (& without a replacement - i.e. zpool replace...), would the host still function well (e.g. downloading & using its snapshot elsewhere) as I can imagine that some data might be on the big disk?
4.) One of the reasons of getting the big disk is to store big data generated in one of our jails in it. Unfortunately, I could not access the '/bigdisk' dir from the jail. Hence, I can't change the location of the datastore from the jail (in 180GB base/host) to the big disk mounted dir '/bigdisk'. The only option that has come to my mind is using rsync (to sync data between the disks) but I am not sure that is an efficient approach. The big data service in the jail can't even access the '/bigdisk'. Any recommendations?
Here are the commands I ran to expand the root.
Code:
1. Create a partition (say vtzck2) after detecting the new block in your dmesg log
#gpart create -s GPT vtzck2
2. Format the partition (in this case using freebsd-zfs):
# gpart add -t freebsd-zfs -a 1M vtzk2
3. Create a filesystem for the partition {Crux of the matter: this command creates a UFS but I need ZFS}:
# newfs -U /dev/vtzk2p1
4. Make directory for accessing the partition:
mkdir /bigdisk
5. Edit the fstab by adding the below
#vi /etc/fstab
/dev/vtzk2p1 /bigdisk zfs rw 2 2
6. Mount the partition:
# mount /bigdisk
***The above command threw an error- like drive not available.**
7. Add the partition to your pool for ZFS:
# zpool add mypool vtzk2p1
8. Check your filesystem for the increment in storage capacity
# zpool status
#df -h
***Steps 3-6 may not be necessary if using ZFS. I had run them in the course of getting things to work.***
My Questions:
1.) I am not sure if the command 'newfs -U /dev/vtbd2p1' was the proper command to use after using 'gpart add -t freebsd-zfs -a 1M vtbd2'. It appears I mixed UFS and ZFS filesystems or overwrote the ZFS even though the root expanded to approx 2.2TB . What should have been the proper command(s) after the 'gpart add' since I wanted a ZFS?
2.) What are the implications of what I have done so far e.g. performance degradation for mixing a zpool of ufs on HDD big disk with zfs on SSD root/base disk? Any recommendations?
3.) I want to ensure that I have a system whereby I can detach the new storage, download my base/host image and carry out other operations as I like. If I detach it the right way (& without a replacement - i.e. zpool replace...), would the host still function well (e.g. downloading & using its snapshot elsewhere) as I can imagine that some data might be on the big disk?
4.) One of the reasons of getting the big disk is to store big data generated in one of our jails in it. Unfortunately, I could not access the '/bigdisk' dir from the jail. Hence, I can't change the location of the datastore from the jail (in 180GB base/host) to the big disk mounted dir '/bigdisk'. The only option that has come to my mind is using rsync (to sync data between the disks) but I am not sure that is an efficient approach. The big data service in the jail can't even access the '/bigdisk'. Any recommendations?