I'm trying to create encrypted blu-ray backup. I've created and burned the image using the following crude script:

```
imgsize=23000M
imgfile=~/backup.img
imgloop=`sudo losetup -f`
truncate -s $imgsize $imgfile
sudo losetup $imgloop $imgfile
sudo cryptsetup luksFormat --cipher aes-xts-plain64 $imgloop
sudo cryptsetup luksOpen $imgloop mybackup
sudo mkudffs /dev/mapper/mybackup
if [ ! -d "/mnt/backup" ]; then
    sudo mkdir /mnt/backup
fi
sudo mount /dev/mapper/mybackup /mnt/backup

# Now copy all files that are part of the backup
echo "Copy files to backup to /mnt/backup. Type 'ready' when done";
while read line; do
    echo "$line";
    if [ "$line" == "ready" ]; then
        break;
    fi
done

sudo umount /mnt/backup
sudo cryptsetup luksClose /dev/mapper/mybackup
sudo losetup -d $imgloop

```

When the script is finished I used the following command to burn it to an M-Disc BD-R:

```
growisofs -dvd-compat -Z /dev/dvd=backup.img

```

The burn completed without failure. I'm able to open the luks volume using:

```
sudo cryptsetup luksOpen /dev/dvd mybackup

```

Which produces the device `/dev/mapper/mybackup`; however, when I try to mount it with:

```
sudo mount -t udf /dev/mapper/mybackup /mnt/backup

```

I get the following error:

```
mount: /dev/mapper/mybackup is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/mapper/mybackup,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

```

syslog contains the following error:

```
[ 2334.880043] UDF-fs: warning (device dm-3): udf_load_vrs: No anchor found
[ 2334.880046] UDF-fs: warning (device dm-3): udf_fill_super: No partition found (1)

```

Update 1
========

Using the following commands I can mount the image produced by the script:

```
sudo cryptsetup luksOpen backup.img mybackup
sudo mount -t udf /dev/mapper/mybackup /mnt/backup

```

So something is going wrong because it's on the disc.