I have a ext4 file system that is part of a Logical Volume and the underlying storage is AWS EBS. I took a snapshot of the EBS and then used that to create a new EBS volume and attached it to theEC2 instance.
Since this is a binary copy of the original volume it shared the same UUID as the original LV, so I tried this to add the new device partition (/dev/xvdi1) into an existing volume group:
> # pvremove /dev/xvdi1
Labels on physical volume "/dev/xvdi1" successfully wiped
> # pvcreate /dev/xvdi1
Physical volume "/dev/xvdi1" successfully created
>
> # vgextend VGoraarch /dev/xvdi1
Volume group "VGoraarch" successfully extended
>
> # lvcreate -l 100%FREE -n LVoraarch_snapshot VGoraarch /dev/xvdi1
> Logical volume "LVoraarch_snapshot" created.
When I try to do the mount:
> # mount -t ext4 /dev/mapper/VGoraarch-LVoraarch_snapshot /oraarch_snapshot mount: wrong fs type, bad option, bad superblock on
> /dev/mapper/VGoraarch-LVoraarch_snapshot,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
What's the correct way to get this mounted?
EDIT: Mounting to the same EC2 instance
Best Answer
All you need to do is import it. Example:
(Copied from http://tldp.org/HOWTO/LVM-HOWTO/recipemovevgtonewsys.html)