fstab entry causes emergency mode in Ubuntu VM

Rspin

New Member
Feb 18, 2023
6
0
1
I have a disk drive that I added as a Directory to my Proxmox Storage and then added it into a Ubuntu VM. The drive shows up in the VM as /dev/sdb. I have added a partition and formatted it in the usual way and I can manually mount it and have successfully added files. However, I want the drive to be mounted when I reboot the VM. I have tried adding
/dev/sdb1 /data/Disk2 ext3 defaults 0 2
to /etc/fstab but whenever I do so, the VM fails to load on reboot. Ubuntu goes into emergency mode and I can only get it back running by deleting the line out of fstab.

I am brand new to Proxmox. Is there something I need to do different in a VM drive to add it to fstab or other way to make it load when the VM boots. What has me stumped is it mounts fine manually.

if I add the line to fstab then try to load it with sudo mount -a I get the following error: mount: /data/Disk2: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

If I mount the drive manually and enter sudo mount -a no error and even if I then add the lines to fstab and enter it again...no error. But then Ubuntu crashes on reboot.

Not sure what to think.

Thank you for any help
 
I have a disk drive that I added as a Directory to my Proxmox Storage and then added it into a Ubuntu VM. The drive shows up in the VM as /dev/sdb. I have added a partition and formatted it in the usual way and I can manually mount it and have successfully added files. However, I want the drive to be mounted when I reboot the VM. I have tried adding
/dev/sdb1 /data/Disk2 ext3 defaults 0 2
to /etc/fstab but whenever I do so, the VM fails to load on reboot. Ubuntu goes into emergency mode and I can only get it back running by deleting the line out of fstab.

I am brand new to Proxmox. Is there something I need to do different in a VM drive to add it to fstab or other way to make it load when the VM boots. What has me stumped is it mounts fine manually.

if I add the line to fstab then try to load it with sudo mount -a I get the following error: mount: /data/Disk2: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

If I mount the drive manually and enter sudo mount -a no error and even if I then add the lines to fstab and enter it again...no error. But then Ubuntu crashes on reboot.

Not sure what to think.

Thank you for any help
Here is the output on this drive from fdisk -l

Disk /dev/sdb: 400 GiB, 429496729600 bytes, 838860800 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
Disklabel type: dos
Disk identifier: 0xd17d1023

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 838860799 838858752 400G 83 Linux
 
Can you please provide the VM-config: qm config VMID on the PVE-host and replace VMID with the actual numeric ID of the Ubuntu-VM.
 
Can you please provide the VM-config: qm config VMID on the PVE-host and replace VMID with the actual numeric ID of the Ubuntu-VM.
agent: 0
boot: order=scsi0;net0
cores: 6
hostpci0: 0000:07:00.0
hostpci1: 0000:07:00.1
memory: 20480
meta: creation-qemu=7.1.0,ctime=1675809481
name: Media2
net0: virtio=2E:AE:48:ED:15:57,bridge=vmbr2,tag=20
numa: 0
ostype: l26
scsi0: local-lvm:vm-105-disk-0,backup=0,discard=on,iothread=1,size=150G
scsi2: Disk2:105/vm-105-disk-0.qcow2,discard=on,iothread=1,size=400G
scsihw: virtio-scsi-single
smbios1: uuid=c88e0428-daf9-4e2d-bfc1-13d4709eb95b
sockets: 1
tablet: 0
vmgenid: ea322a76-f81f-46e5-922b-3f76ec513331
 
scsi0: local-lvm:vm-105-disk-0,backup=0,discard=on,iothread=1,size=150G
scsi2: Disk2:105/vm-105-disk-0.qcow2,discard=on,iothread=1,size=400G

Okay, my guess is wrong.
(I initially thought, that you may have mounted the disk on the host and simultaneously passed it, as a whole, through to the VM...)

/dev/sdb1 /data/Disk2 ext3 defaults 0 2
mount: /data/Disk2: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

Is it really ext3 and not ext4?

Unfortunately, I have no further ideas, sorry.
 

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!