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

ziomario

Well-Known Member

Reaction score: 36
Messages: 474

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 :

 

Alain De Vos

Daemon

Reaction score: 649
Messages: 2,173

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"
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,346
Messages: 38,863

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.
 
OP
ziomario

ziomario

Well-Known Member

Reaction score: 36
Messages: 474

# 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
 

Alain De Vos

Daemon

Reaction score: 649
Messages: 2,173

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.
 
Top