總網頁檢視次數

星期四, 7月 23, 2020

Recover crash ec2 instance by attaching it to new instance

1. attach the old volume to new instance in console
2. in new instance, mount the the old volume to a folder ..

If you can not mount your XFS partition with classical wrong fs type, bad superblock etc. error and you see a message in kernel logs (dmesg) like that:
XFS: Filesystem sdb7 has duplicate UUID - can't mount
you can still mount the filesystem with nouuid options as below:
mount -o nouuid /dev/sdb7 disk-7
But every mount, you have to provide nouuid option. So, for exact solution you have to generate a new UUID for this partition with xfs_admin utility:
xfs_admin -U generate /dev/sdb7
Clearing log and setting UUID
writing all SBs
new UUID = 01fbb5f2-1ee0-4cce-94fc-024efb3cd3a4
after that, you can mount this XFS partition regularly.

沒有留言: