NetBSD Problem Report #49933

From martin@aprisoft.de  Wed May 27 06:59:13 2015
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 038D4A582D
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 27 May 2015 06:59:13 +0000 (UTC)
Message-Id: <20150527065833.AAEA5ED0E4F@emmas.aprisoft.de>
Date: Wed, 27 May 2015 08:58:33 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: makefs -t udf produces non mountable images
X-Send-Pr-Version: 3.95

>Number:         49933
>Category:       kern
>Synopsis:       makefs -t udf produces non mountable images
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 27 07:00:00 +0000 2015
>Closed-Date:    Thu Nov 05 09:23:29 +0000 2020
>Last-Modified:  Thu Nov 05 09:23:29 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.18
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD seven-days-to-the-wolves.aprisoft.de 7.99.18 NetBSD 7.99.18 (GENERIC) #17: Fri May 22 15:33:10 CEST 2015 martin@seven-days-to-the-wolves.aprisoft.de:/ssd/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

Creating a UDF image via makefs produces a working UDF file system image
(I can burn it on blueray and use that with various OSes). But NetBSD
can not mount it.

>How-To-Repeat:

[/tmp/test] seven-days-to-the-wolves # /ssd/tools/bin/nbmakefs -t udf -oT=bdrom,L="Just a Test" /tmp/udf.iso .
req_enable 1024, req_disable 0
ndirs            1
nfiles           1
ndata_blocks     758395
nmetadata_blocks 2

Calculated size of `/tmp/udf.iso': 1748525056 bytes, 2 inodes
Building disc compatible with UDF version 102 to 150

UDF properties       02004<REWRITABLE,READONLY>
Volume set          `556569896a9a35ed'
Primary volume      `009177f1`
Logical volume      `Just a Test`

Total space on this medium approx. 1706964 KiB, 1666 MiB
Free space on this volume approx.  1706196 KiB, 1666 MiB

./Iron Sky.avi  
[/tmp/test] seven-days-to-the-wolves # cd ..
[/tmp] seven-days-to-the-wolves # mount -o rump -t udf -r ./udf.iso /mnt2
rump_udf: "./udf.iso" is a non-resolved or relative path.
rump_udf: using "/tmp/udf.iso" instead.
rump_udf: puffs_daemon: Invalid argument
rump_udf: mount: Invalid argument


Mounting via vnd and without rump produces the same error.

>Fix:
n/a

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->reinoud
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Wed, 27 May 2015 07:04:39 +0000
Responsible-Changed-Why:
Over to maintainer - is the in-kernel udf able to deal with r/o images at all?


From: Reinoud Zandijk <reinoud@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: reinoud@NetBSD.org, kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, martin@NetBSD.org
Subject: Re: kern/49933 (makefs -t udf produces non mountable images)
Date: Wed, 27 May 2015 12:30:14 +0200

 On Wed, May 27, 2015 at 07:04:39AM +0000, martin@NetBSD.org wrote:
 > Synopsis: makefs -t udf produces non mountable images
 > 
 > Responsible-Changed-From-To: kern-bug-people->reinoud
 > Responsible-Changed-By: martin@NetBSD.org
 > Responsible-Changed-When: Wed, 27 May 2015 07:04:39 +0000
 > Responsible-Changed-Why:
 > Over to maintainer - is the in-kernel udf able to deal with r/o images at all?

 reading the PR, i think the problem is quite straightforward. You are trying
 to mount a .iso file, which by its FS properties gets a sector size of 512. If
 it was written on BD it would get the sector size of the device, 2048 bytes.
 By using a vnd you can bypass this. I am not sure what type of disc is created
 as the PR is ambiguous but mounting readonly will work for sure. Might as well
 be writeable too but first try out readonly mounting:

 vnconfig vnd0 udf.iso 2048/1/1/1
 mount -t udf -o rdonly /dev/vnd0d /mnt

 With regards,
 Reinoud

From: Martin Husemann <martin@duskware.de>
To: Reinoud Zandijk <reinoud@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
	netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, martin@NetBSD.org
Subject: Re: kern/49933 (makefs -t udf produces non mountable images)
Date: Wed, 27 May 2015 12:33:37 +0200

 On Wed, May 27, 2015 at 12:30:14PM +0200, Reinoud Zandijk wrote:
 > reading the PR, i think the problem is quite straightforward. You are trying
 > to mount a .iso file, which by its FS properties gets a sector size of 512. If
 > it was written on BD it would get the sector size of the device, 2048 bytes.
 > By using a vnd you can bypass this. I am not sure what type of disc is created
 > as the PR is ambiguous but mounting readonly will work for sure. Might as well
 > be writeable too but first try out readonly mounting:
 > 
 > vnconfig vnd0 udf.iso 2048/1/1/1
 > mount -t udf -o rdonly /dev/vnd0d /mnt

 This works indeed. Can we fix the rump version as well?

 Martin

Responsible-Changed-From-To: reinoud->tech-kern
Responsible-Changed-By: reinoud@NetBSD.org
Responsible-Changed-When: Thu, 05 Nov 2020 07:14:16 +0000
Responsible-Changed-Why:
RUMP should pass the image with the right geometry to UDF. This is a more generic RUMP issue as its not UDF specific.


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: tech-kern@netbsd.org, reinoud@netbsd.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, martin@NetBSD.org
Subject: Re: kern/49933 (makefs -t udf produces non mountable images)
Date: Thu, 5 Nov 2020 08:45:21 +0100

 On Thu, Nov 05, 2020 at 07:14:17AM +0000, reinoud@NetBSD.org wrote:
 > RUMP should pass the image with the right geometry to UDF. This is a more generic RUMP issue as its not UDF specific.

 I consider the issue solved - the PR was about verifying the images
 w/o wasting a BD/R, and that can be done with vnconfig and the geometry
 spec.

 We could create a new PR about rump devices and sector size, if wanted.

 Martin

Responsible-Changed-From-To: tech-kern->kern-bug-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 05 Nov 2020 09:12:32 +0000
Responsible-Changed-Why:
Assign to proper role account


State-Changed-From-To: open->closed
State-Changed-By: reinoud@NetBSD.org
State-Changed-When: Thu, 05 Nov 2020 09:23:29 +0000
State-Changed-Why:
The created image can be checked using the vnconfig + geometry and by mounting it. It ought to then work with rump too but instead of the file the vnd partition should be specified.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.