- 最新
- 投票最多
- 评论最多
Stop the target EC2 once and detach the root volume using the following method.
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-detaching-volume.html
Then attach the EBS to a different EC2 and retrieve the data.
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-attaching-volume.html
Then make the EBS available by following the steps in the following document.
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-using-volumes.html
If your EC2 is Linux, follow the procedure in the following document.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Step three I was in trouble. I don't know how to create a file system for a partition, like: NAME FSTYPE LABEL UUID MOUNTPOINT xvdf
├─xvdf1 ext4 1.0 cloudimg-rootfs cda0c0a7-e64a-4413-85a5-a0235f6f567f
├─xvdf14
└─xvdf15 vfat FAT32 UEFI 54D6-C8B8 You can see that xvdf14 does not have a file system, how can I do it? The case only says that if there is no file system, it is created: sudo mkfs -t xfs /dev/xvdf
But that's for all of it (I mean, if you're using xvdf, then xvdf1 xvdf14 xvdf15 will all create xfs filesystems, but sort of partitions already have filesystems)? I also tried this command, but it shows mkfs.xfs: /dev/xvdf appears to contain a partition table (gpt). mkfs.xfs: Use the -f option to force overwrite.
After that I tried adding a file system for that partition separately: sudo mkfs -t xfs /dev/xvdf/xvdf14 display Error accessing specified device /dev/xvdf/xvdf14: Not a directory I don't know how to add a separate file system for a partition, and the tutorial doesn't tell you how to add a separate file system for a partition, or if some subpartitions (like my example above) have a file system, then the large partition does not need a file system? I'm stuck in step three, prompting when I perform mount wrong fs type, bad option, bad superblock on /dev/xvdf, missing codepage or helper program, or other error.
When mounting the EBS that contains the data, do not execute commands that set up the file system.
As noted in the documentation, the data will be lost.
If you mount it according to the original file system, it should be fine.
I used this command and then prompted:
when I use:
It prompted:
But when I use:
and
There is nothing