Disk and filesystem changes on eclips.is: Difference between revisions

From Run Your Own
Jump to navigation Jump to search
(Created page with "Some notes on managing disks on the Greenhost/eclips.is VM servers. == New disk creation == * Go to Cosmos, the eclips.is VM manager * Go to "Disk Images" in the selected VM...")
 
No edit summary
Line 1: Line 1:
Some notes on managing disks on the Greenhost/eclips.is VM servers.
Some notes on managing the XFS disks on the Greenhost/eclips.is VM servers.


== New disk creation ==
== New disk creation ==
Line 11: Line 11:
* format the new disk as XFS
* format the new disk as XFS
  mkfs.xfs /dev/xvdb1
  mkfs.xfs /dev/xvdb1
* feel free to mount, add to <code>fstab</code>, etc
== Expand existing disk fs ==
* <code>umount</code> the disk you want to manipulate
* Go to Cosmos, the eclips.is VM manager
* Go to "Disk Images" in the selected VM/account
* For the right disk you want to change, on the size column, use the drop-down menu to change the size. '''You should only increase the size, never decrease'''.
* in "Manage", remove the assignment to the vm, save, and assign it back again with the same settings
* log into the VM
* <code>mount</code> again the disk at its regular </code>/mountpoint</code>
* run the following:
xfs_ggrowfs /mountpoint
* done
'''Note:''' (TBC) if the disk that needs to be expanded is the root filesystem, then instead of taking the disk offline after changing the size in cosmos, you need to reboot the VM for the new block size property be visible.
== A note on partitions ==
'''IMPORTANT:''' The disks on eclips.is are not partitioned, XFS is put directly on the block device, this means that tools like <code>fdisk</code>, <code>growpart</code>, <code>parted</code>, etc are useless. You may even end up messing up things with these.

Revision as of 13:16, 28 February 2021

Some notes on managing the XFS disks on the Greenhost/eclips.is VM servers.

New disk creation

  • Go to Cosmos, the eclips.is VM manager
  • Go to "Disk Images" in the selected VM/account
  • Create new disk of desired size (possibly use same location as VM)
  • Once created, go to manage and assign the new disk to the correct VM and give it a correct position (ie, not one being already used by another disk on this very VM), let's say it was /dev/xvdb1
  • log into the VM, if needed install the necessary tool to handle XFS filesystems.
apt install xfsprogs
  • format the new disk as XFS
mkfs.xfs /dev/xvdb1
  • feel free to mount, add to fstab, etc

Expand existing disk fs

  • umount the disk you want to manipulate
  • Go to Cosmos, the eclips.is VM manager
  • Go to "Disk Images" in the selected VM/account
  • For the right disk you want to change, on the size column, use the drop-down menu to change the size. You should only increase the size, never decrease.
  • in "Manage", remove the assignment to the vm, save, and assign it back again with the same settings
  • log into the VM
  • mount again the disk at its regular /mountpoint
  • run the following:
xfs_ggrowfs /mountpoint
  • done

Note: (TBC) if the disk that needs to be expanded is the root filesystem, then instead of taking the disk offline after changing the size in cosmos, you need to reboot the VM for the new block size property be visible.

A note on partitions

IMPORTANT: The disks on eclips.is are not partitioned, XFS is put directly on the block device, this means that tools like fdisk, growpart, parted, etc are useless. You may even end up messing up things with these.