Disk and filesystem changes on eclips.is

From Run Your Own
Revision as of 14:16, 28 February 2021 by 320x200 (talk | contribs)
Jump to: navigation, search

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.