0

long story short.

  • 5 year old Plesk environment (always updated) on an EC2 instance
  • for some reason the instance has two volumes attahed (root volume sda1 and a second sdf)
  • the mount point of the ec2 instance is the sdf though and the sdf volume is the volume with all the websites on it.
  • for cleanup reasons and cost reasons I want to remove the root volume (sda1) which is way older and is not the one running the plesk version

However I can't.

  • I of course can't remove the root volume (sda1) generally
  • I can however, detach the current root volume, also detach the secondary volume (sdf) and attach this sdf volume as the new root volume (what I'm actually after)

If I do that though I get a very long "initializing" phase followed by ½ checks failed and the reachability check of the instance is failing.

I also tried creating a completely new instance with the latest ubuntu, creating a new volume from a current snapshot of the sdf volume, but same problem. Always reachability check fails.

What could cause that? Why are there 2 volumes there in the first place? How could that have happened and how can I cleanup, so that the current mounted volume (sdf) is the root volume and the instance has the correct mount point.

Again, my simple goal is to get rid of the unused current root volume sda1

Thanks for your help.

Matt
  • 43
  • 1
  • 3
  • 11
  • Why would like to remove the root volume? why you don't use the ec2 without attach any volume and put your code and git and git clone and install everything using ansible or other tools? – c4f4t0r Aug 09 '22 at 14:09
  • I would like to remove the root volume cause for some reason it's old and unused! The current running volume is the secondary volume (sdf). This is the one running the current Plesk version and all websites hosted on this plesk environment. I would simply like to clean up and remove the other volume that is not necessary. However the one that is not necessary is currently attached as root volume. And if simply try to swap the positions I can't get it working as the reachabilty check fails. – Matt Aug 09 '22 at 14:17
  • sorry, the root volume is where you have the system installed :). – c4f4t0r Aug 10 '22 at 08:53
  • @c4f4t0r yeah, but what does that mean exactly :) See … if I detach the secondary volume (sdf) the entire Plesk Environment with all it's websites, etc. is set back to the year 2019. So the root volume has basically a Plesk version and status of 2019 and only the secondary volume on (sdf) is the current version with the proper setup. – Matt Aug 10 '22 at 09:45
  • you need to check how you deploy the software, if you 1000 version of the software, you need to become crazy thinking about volumes. – c4f4t0r Aug 11 '22 at 11:31

1 Answers1

0

A high level description follows of what I would try

First of all Create Backups/Snapshots of your volumes before touching them!!!

Use df -h and mount to help you review what mount points exist and what is used in each volume. Then (assuming that "some" things are being used from sda1) you can shutdown the VM and mount both volumes on a new temp VM that uses a separate root volume. Then use cp -a to copy from sda1 the directories that you saw being used to sdf. Then change /etc/fstab (that should be in sdf) to use these dirs from sdf instead of sda1. Shutdown the temp VM and now mount sdf to a new VM as root volume and try to boot it. When editing fstab you will most probably need to use UUIDs that are the same in all cases, or change device name to sda for all mount points since this volume will be the root volume of the new VM.

ttsakpc
  • 136
  • 5