Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate EC2 Instance #139

Open
JaggedJax opened this issue Dec 30, 2021 · 10 comments
Open

Migrate EC2 Instance #139

JaggedJax opened this issue Dec 30, 2021 · 10 comments

Comments

@JaggedJax
Copy link

JaggedJax commented Dec 30, 2021

Not sure if this is a dumb question or not, but would migrate2rocky theoretically work for an AWS EC2 instance that was started from a Centos 8 image, or are there some behind the scenes things that EC2 is doing that would definitely cause issues.

@nazunalika
Copy link
Member

It should work. We migrated a large chunk of our CentOS 8 infra to Rocky 8 in AWS and haven't had issues. Wouldn't hurt to take backups/snapshots, though.

@JaggedJax
Copy link
Author

I definitely will take backups and snapshots. Thanks for the info.

@JaggedJax
Copy link
Author

I made an image first, but the migration seems to have worked great. I just had to manually remount one EFS drive afterwards, but other than that, all tests I have passed.

@pajamian
Copy link
Collaborator

That's great to hear! As we're always looking to improve migrate2rocky, can you elaborate on the issue with the EFS drive?

@JaggedJax
Copy link
Author

I am migrating another and will give better notes. But after the restart the EFS drive did not mount, although it was in the fstab.

Before trying anything, I reinstalled this tool (https://github.com/aws/efs-utils) and then performed an unmount and then a mount command and it mounted properly. On this next migration (same exact config) I will check for logs and just try remounting right away if I have this issue and see if it works.

@JaggedJax
Copy link
Author

Error message after rebooting:

Dec 31 02:11:00 cioapp103 systemd[1]: Started amazon-efs-mount-watchdog.
Dec 31 02:11:00 cioapp103 kernel: FS-Cache: Loaded
Dec 31 02:11:00 cioapp103 kernel: FS-Cache: Netfs 'nfs' registered for caching
Dec 31 02:11:00 cioapp103 kernel: Key type dns_resolver registered
Dec 31 02:11:00 cioapp103 systemd[1]: user_content.mount: Mount process exited, code=exited status=1
Dec 31 02:11:00 cioapp103 systemd[1]: user_content.mount: Failed with result 'exit-code'.
Dec 31 02:11:00 cioapp103 systemd[1]: Failed to mount /user_content.
Dec 31 02:11:00 cioapp103 systemd[1]: Dependency failed for Remote File Systems.
Dec 31 02:11:00 cioapp103 systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.

I confirmed that the EFS drive won't mount until I manually re-install the efs-utils package. My installation steps are:

git clone https://github.com/aws/efs-utils
sudo dnf install git make rpm-build
cd efs-utils
sudo make rpm
sudo dnf install ./build/amazon-efs-utils*rpm
sudo mount -a

@nazunalika
Copy link
Member

I can see why this has happened. 10 days ago, Rocky was officially merged into amazon-efs-utils. I wonder if you update amazon-efs-utils before you migrate if that would avoid the issue altogether.

@pajamian
Copy link
Collaborator

If you have another one and can try what Luis suggested then I'll wait on those results and then add a note to the known issues section of the README file for others who come across this.

@JaggedJax
Copy link
Author

JaggedJax commented Dec 31, 2021

Yes, that solves the issue. I was performing the efs-utils update only after the migration when running into the issue, but updating efs-utils before the migration works without issue.

Edit: Pretty convenient timing for me!

@pajamian
Copy link
Collaborator

Thanks. I'll make a note of it under known issues, both the recommendation to update efs-utils first and the fix of reinstalling them after (probably updating them after will work as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants