:: Re: [DNG] vdev status update in dae…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: o1bigtenor
Fecha:  
Cc: dng
Asunto: Re: [DNG] vdev status update in daedalus
On Fri, Dec 29, 2023 at 7:36 AM aitor <aitor_czr@???> wrote:
>
> Hi,
>
> On 29/12/23 13:10, o1bigtenor via Dng wrote:
>
> On Thu, Dec 28, 2023 at 6:14 PM aitor <aitor_czr@???> wrote:
>
> Hi,
>
> On 28/12/23 22:37, aitor wrote:
>
> However, I still have another issue not fixed yet because xfburn, k3b and the like don't want to recognize the dvd drive. Arrrr !!
>
> Solved !!!
>
> So - - - - -
> 1. what was the problem?
> 2. what was the fix?
>
> Looking at the helper:
>
> https://github.com/jcnelson/vdev/blob/master/vdevd/helpers/LINUX/disk.sh
>
> the value of the variable $DISK_TYPE is defined between the lines 63 - 290, according to the value of $DEV_PATH. For example:
>
>    if [ -n "$(echo "$VDEV_PATH" | /bin/egrep "vd.+[0-9]$")" ]; then

>
>          # virtio block device
>          DISK_TYPE="virtio"

>
>    elif [ -n "$(echo "$VDEV_PATH" | /bin/egrep "loop[0-9]+")" ]; then

>
>          # loopback disk
>          DISK_TYPE="loop"

>
>    elif ... (etc) ...

>
> For ATA block devices, DISK_TYPE="ata".
>
> Once we've gotten the disk type, next step is to evaluate the output of the corresponding `stat` helper:
>
>    # query information about the disk
>    case "$DISK_TYPE" in

>
>       ata)
>           HELPER_DATA="$($VDEV_HELPERS/stat_ata "$VDEV_MOUNTPOINT/$VDEV_PATH")"
>           eval $HELPER_DATA
>           .......

>
> For (S)ATA internal hard disks, the helper will return (among other variables):
>
>    VDEV_BUS="ata"
>    VDEV_ATA_TYPE="ata"

>
> However, for internal dvd drives, the helper will return:
>
>    VDEV_BUS="ata"
>    VDEV_ATA_TYPE="cd"

>
> Leading, respectively, to the following values for $VDEV_TYPE:
>
>    VDEV_TYPE="ata"      (for internal hard disks)
>    VDEV_TYPE="cd"       (for internal dvd drives)

>
> Insofar as it goes that's okay, but the line nº 636:
>
>    VDEV_TYPE="$DISK_TYPE"

>
> turns "cd" into "ata", and therefore dvd drives were ignored by apps like xfburn or k3b.
> For ATA drives, it must be VDEV_TYPE="$DISK_ATA_TYPE"; for SCSI drives, it must be VDEV_TYPE="$DISK_SCSI_TYPE".
>
>

Thank you very much - - - - great explanation!

Ciao