NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dk for z/lvm volumes?



Michael van Elst wrote:
On Mon, Jun 29, 2020 at 07:08:40PM +0300, Staffan Thomén wrote:
Chavdar Ivanov wrote:
# ccdconfig -c ccd0 0 /dev/zvol/dsk/internal1/photos@backup
You are mapping a snapshot, it will be r/o.

You have to promote it first.
While it's true that the snapshot is r/o, surely it shouldn't crash the system.

Surely not. I'll have a look at the ccd driver.


And is there a reason why ccd would require r/w?

Neither the infrastructure to access such layered disk devices, nor
the drivers themselves handle read-only components. The drivers
are ccd, cgd and raidframe.

Doesn't look that difficult to implement for ccd and cgd, not so sure
about raidframe.

Good news! I found another way to crash my system!

I tried cloning the snapshot and then creating the ccd worked, manually creating a dk on the ccd worked, mounting a ntfs on the gpt worked, listing files on the ntfs worked, reading files off the ntfs worked.

However...

bluegleam# dkctl ccd0 makewedges
[ 184722.7286780] Mutex error: mutex_vector_enter,564: locking against myself

[ 184722.7286780] lock address : 0xffffc380065c6a40
[ 184722.7286780] current cpu  :                  0
[ 184722.7286780] current lwp  : 0xffffc38007290aa0
[ 184722.7286780] owner field  : 0xffffc38007290aa0 wait/spin:                0/0

[ 184722.7286780] panic: lock error: Mutex: mutex_vector_enter,564: locking against myself: lock 0xffffc380065c6a40 cpu 0 lwp 0xffffc38007290aa0
[ 184722.7286780] cpu0: Begin traceback...
[ 184722.7286780] vpanic() at netbsd:vpanic+0x143
[ 184722.7286780] snprintf() at netbsd:snprintf
[ 184722.7286780] filt_logread() at netbsd:filt_logread
[ 184722.7286780] mutex_vector_enter() at netbsd:mutex_vector_enter+0x158
[ 184722.7286780] ccdopen() at netbsd:ccdopen+0x52
[ 184722.7286780] spec_open() at netbsd:spec_open+0x175
[ 184722.7286780] VOP_OPEN() at netbsd:VOP_OPEN+0x4c
[ 184722.7286780] dkwedge_discover() at netbsd:dkwedge_discover+0xb4
[ 184722.7286780] disk_ioctl() at netbsd:disk_ioctl+0xd3
[ 184722.7286780] ccdioctl() at netbsd:ccdioctl+0x1c9
[ 184722.7386785] VOP_IOCTL() at netbsd:VOP_IOCTL+0x54
[ 184722.7386785] vn_ioctl() at netbsd:vn_ioctl+0xa5
[ 184722.7386785] sys_ioctl() at netbsd:sys_ioctl+0x547
[ 184722.7386785] syscall() at netbsd:syscall+0x9c
[ 184722.7386785] --- syscall (number 54) ---
[ 184722.7386785] 724a0b5681ba:
[ 184722.7386785] cpu0: End traceback...
[ 184722.7386785] dumping to dev 4,1 (offset=1048575, size=0): not possible
[ 184722.7386785] rebooting...
(XEN) Hardware Dom0 shutdown: rebooting machine

Ngh.

ccdconfig -g was also a bit odd that it listed ccd0 four times. But this time no crash there.

Staffan


Home | Main Index | Thread Index | Old Index