Disk and filesystem changes on eclips.is

From Run Your Own
Revision as of 13:17, 28 February 2021 by 320x200 (talk | contribs) (→‎Expand existing disk fs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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_growfs /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.