Cannot mount disk in VM

rabouin

New Member
May 9, 2019
14
1
1
40
Hello guys,

I have successfully mounted my disk in proxmox server and added it in hardware VM ( debian )
But I cannot mount it in VM.

Proxmox

Code:
root@pve:/mnt/sdc# df -h
Filesystem            Size  Used Avail Use% Mounted on
udev                   16G     0   16G   0% /dev
tmpfs                 3.2G   18M  3.2G   1% /run
/dev/mapper/pve-root   94G  2.5G   87G   3% /
tmpfs                  16G   43M   16G   1% /dev/shm
tmpfs                 5.0M     0  5.0M   0% /run/lock
tmpfs                  16G     0   16G   0% /sys/fs/cgroup
/dev/sdd1             916G   70G  847G   8% /mnt/sdd
/dev/sdb1             2.7T  2.7T   73G  98% /mnt/sdb
/dev/sdc1             3.6T  3.3T  354G  91% /mnt/sdc
/dev/mapper/pve-vms   335G  7.0G  311G   3% /vms
/dev/sda1             3.6T  541G  3.1T  15% /mnt/sda
/dev/fuse              30M   16K   30M   1% /etc/pve

root@pve:/mnt/sdc# fdisk -l
Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors
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: gpt
Disk identifier: 93FA0D85-DE7C-43E4-A748-97DC423DE46D

Device           Start       End   Sectors   Size Type
/dev/nvme0n1p1      34      2047      2014  1007K BIOS boot
/dev/nvme0n1p2    2048   1050623   1048576   512M EFI System
/dev/nvme0n1p3 1050624 976773134 975722511 465.3G Linux LVM


Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 5F9E576B-E885-4EEE-94DD-D399205B14A5

Device     Start        End    Sectors  Size Type
/dev/sda1   2048 7814037134 7814035087  3.7T Linux filesystem


Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 373C41BD-8EFA-4AB5-BDBC-779BD3616B4E

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 5860533134 5860531087  2.7T Linux filesystem


Disk /dev/sdc: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A378684D-93B0-43A6-B691-3719BF6C4CBC

Device     Start        End    Sectors  Size Type
/dev/sdc1   2048 7814037134 7814035087  3.7T Linux filesystem


Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 4385A625-9FE4-4064-9DB0-216B79B21415

Device     Start        End    Sectors   Size Type
/dev/sdd1   2048 1953525134 1953523087 931.5G Linux filesystem


Disk /dev/mapper/pve-swap: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-root: 96 GiB, 103079215104 bytes, 201326592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-vms: 341.3 GiB, 366460534784 bytes, 715743232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

root@pve:/mnt/sdc# cd /mnt/sda/
root@pve:/mnt/sda# ls
images  lost+found  NAS4
root@pve:/mnt/sda# pwd
/mnt/sda
root@pve:/mnt/sda# ls
images  lost+found  NAS4
root@pve:/mnt/sda#

VM:

Code:
  root@debian:/mnt/sdb# mount -t ext3 /dev/sdb /mnt/sdb/
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
root@debian:/mnt/sdb# mount /dev/sdb /mnt/sdb/
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog

root@debian:/mnt/sdb# fdisk -l
Disk /dev/sdb: 3 TiB, 3283502497792 bytes, 6413090816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
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: 0x707a4ed9

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 65011711 65009664   31G 83 Linux
/dev/sda2       65013758 67106815  2093058 1022M  5 Extended
/dev/sda5       65013760 67106815  2093056 1022M 82 Linux swap / Solaris

root@debian:/mnt/sdb# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M  3.4M   97M   4% /run
/dev/sda1        31G  3.0G   26G  11% /
tmpfs           499M     0  499M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           499M     0  499M   0% /sys/fs/cgroup
tmpfs           100M  4.0K  100M   1% /run/user/111
tmpfs           100M  8.0K  100M   1% /run/user/1000

dmesg

 1904.041560] EXT4-fs (sdb): VFS: Can't find ext4 filesystem
[ 1977.918531] EXT4-fs (sdb): VFS: Can't find ext4 filesystem
 
This will not work.
You could set-up a samba share on your host which then provides access to your data in the VMs.
 
  • Like
Reactions: rabouin
https://wiki.debian.org/SambaServerSimple
You will have to setup a samba server, share the corresponding content and use a client/mount the shares in the VM to access the data.
What is your goal, what exactly are you trying to achieve?
 
  • Like
Reactions: rabouin

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!