VM not recognize ext4 LVM drive

csrgzz

New Member
Feb 11, 2023
1
0
1
By mistake I detach an LVM drive from my vm and when I re-attach no longer recognize as ext4 type, I know I can reformat the drive but I want to save the files before I do anything else.

Proxmox node can see my LVM as ext4 e2fsck works ok I can even mount this drive (which I will eventually do to save my files) but I just dot want to go the easy route mounting save files then by formatting the disk on vm.

any other suggestion?

root@proxmox: lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda LVM2_member 7.3T
├─LVM-LVM_tmeta 15.8G
│ └─LVM-LVM-tpool 7.2T
│ ├─LVM-LVM 7.2T
│ ├─LVM-vm--101--disk--1 ext4 7.7T
│ └─LVM-vm--101--disk--0 7.7T
└─LVM-LVM_tdata 7.2T
└─LVM-LVM-tpool 7.2T
├─LVM-LVM 7.2T
├─LVM-vm--101--disk--1 ext4 7.7T
└─LVM-vm--101--disk--0 7.7T
root@proxmox:~# e2fsck /dev/mapper/LVM-vm--101--disk--1
e2fsck 1.46.5 (30-Dec-2021)
/dev/mapper/LVM-vm--101--disk--1: clean, 529984/258867200 files, 396417465/2070937600 blocks

on VM my /dev/sdc is not showing as ext4
csr@tux:~$ sudo fdisk -l
Disk /dev/sdc: 7.71 TiB, 8482560409600 bytes, 16567500800 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


csr@tux:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 170G
├─sda1 1M
├─sda2 ext4 2G /boot
└─sda3 LVM2_member 98G
└─ubuntu--vg-ubuntu--lv ext4 98G /
sdb ext4 1.9T /mnt/HD2G
sdc 7.7T
sr0 iso9660 1.4G Ubuntu-Server 22.04.1 LTS amd64



csr@tux:~$ sudo e2fsck -v /dev/sdc
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>


csr@tux:~$ sudo e2fsck -b 8193 /dev/sdc
e2fsck 1.46.5 (30-Dec-2021)
e2fsck: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!