mount: /dev/md1: No such file or directory

Hello.

What I would like to do is to increase the internal space of the qcow2 file below (where there are 3 partitions : GPT ; root UFS and swap,checked in Linux). This is what I tried :

Code:
mdconfig -a -t vnode -f FreeBSD-13.0-RELEASE-arm64-aarch64.qcow2
md1

mkdir -p /mnt/md1

mount -t ufs /dev/md1 /mnt/md1

mount: /dev/md1: No such file or directory

do u know why I get this error ? This error does not tell the truth since under /dev I see the device md1.

This is my second try,the first one failed because I used qemu-nbd that it seems not supported on freebsd. U can give a look at this post :

 
I think the qcow format is different from a "raw" format. To mount you need a "raw" image format.
For qemu that is "-drive format=raw"
 
do u know why I get this error ?
Yes, you're trying to mount the entire disk instead of the UFS partition that's on a disk. See gpart show md1. QCOW2 is also not a "raw" disk image, so you can't just mount it like that. There are a bunch of headers and other metadata that's on an image format like QCOW2.
 
# gpart show md1

gpart: No such geom: md1.

does it work if I do the conversion between qcow2 and raw ? with this command :

qemu-img convert FreeBSD-13.0-RELEASE-arm64-aarch64.qcow2 FreeBSD-13.0-RELEASE-arm64-aarch64.raw

it says :

qemu-img: warning: Failed to unlock byte 100
 
Maybe there is a write lock open on the file. In that case you can just reboot, don't start the virtual-machine and try to convert.
 
Back
Top