1

This is on Ubuntu 20.04.1, Pioneer BDR-XS07, 50 GB BD-RE (multiple discs from different vendors tested).

Formatting the disc with UDF version 2.50 works:
$ sudo mkudffs --utf8 --blocksize=2048 --media-type=bdr --udfrev=0x0250 --lvid=Backup2 --vid=Backup2 /dev/sr0

Yet mounting it does not (Unable to mount volume backup: Gio.IOErrorEnum: Error mounting /dev/sr0 at /media/cts/backup: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error).

Formatting the disc as media type "Harddisk" also works:
$ sudo mkudffs --utf8 --blocksize=2048 --media-type=hd --udfrev=0x0201 --lvid=Backup2 --vid=Backup2 /dev/sr0 and mounting and writing to it subsequently succeeds.

One thing strikes me as a theoretical cause for problems:
Using the wrong media type yields a different layout of the UDF blocks/areas:

$ sudo mkudffs --utf8 --blocksize=2048 --media-type=hd --udfrev=0x0201 --lvid=Backup2 --vid=Backup2 /dev/sr0
filename=/dev/sr0
label=Backup2
uuid=600c858ed35ee0c9
blocksize=2048
blocks=23652352
udfrev=2.01
start=0, blocks=16, type=ERASE 
start=16, blocks=4, type=VRS 
start=20, blocks=76, type=ERASE 
start=96, blocks=16, type=MVDS 
start=112, blocks=16, type=ERASE 
start=128, blocks=4, type=LVID 
start=132, blocks=124, type=ERASE 
start=256, blocks=1, type=ANCHOR 
start=257, blocks=23651832, type=PSPACE 
start=23652089, blocks=6, type=ERASE 
start=23652095, blocks=1, type=ANCHOR 
start=23652096, blocks=96, type=ERASE 
start=23652192, blocks=16, type=RVDS 
start=23652208, blocks=143, type=ERASE 
start=23652351, blocks=1, type=ANCHOR 
$

vs

$ sudo mkudffs --utf8 --blocksize=2048 --media-type=bdr --udfrev=0x0250 --lvid=Backup2 --vid=Backup2 /dev/sr0
filename=/dev/sr0
label=Backup2
uuid=600c854ca5a22d78
blocksize=2048
blocks=23652352
udfrev=2.50
vatblock=319
start=0, blocks=16, type=RESERVED 
start=16, blocks=4, type=VRS 
start=20, blocks=76, type=USPACE 
start=96, blocks=16, type=MVDS 
start=112, blocks=16, type=USPACE 
start=128, blocks=1, type=LVID 
start=129, blocks=95, type=USPACE 
start=224, blocks=16, type=RVDS 
start=240, blocks=16, type=USPACE 
start=256, blocks=1, type=ANCHOR g
start=257, blocks=31, type=USPACE 
start=288, blocks=23651776, type=PSPACE 
start=23652064, blocks=31, type=USPACE 
start=23652095, blocks=1, type=ANCHOR 
start=23652096, blocks=256, type=USPACE 
$

so I would assume I'm not getting the best performance / reliability / defect management out of the BD-RE?

What is the correc way of formatting a BD-RE for packet writing using the UDF filesystem under Linux?

3

1 Answer 1

2

I also came back to this everlasting issue and this time i solved it. I remember being sassy about the fact, that Windows and macOS support writing on rev. 0x0250. Linux does not.

My old documentation shows requesting 0x250 explicitly, although i knew.

Have a look at your output. One image has rev. 2.50 and the other 2.01. The latter will support write operations, the former will strike with error messages or will only be read only.

The process is actually pretty simple (you need to be root):

  1. Format the media once for defect management.
dvd+rw-format '/dev/sr0' ;
  1. Put the UDFFS on it:
mkudffs --utf8 \
        --blocksize=2048 \
        --media-type=dvdrw \
        --udfrev=0x0201 \
        --lvid=Backup2 \
        --vid=Backup2 \
        '/dev/sr0' ;

BluRay is a DVD, after all.

  1. Mount the paket-device:
mount -t udf -o rw,noatime,async \
'/dev/sr0' '/data/filesystem/disc/'

If you expect a power loss or system crash, you may wanna use sync instead of async.

1
  • 🤗 It worked! Thanks!!
    – Christian
    Aug 28, 2023 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .