Beiträge von Tom7320

    That does not fix the problem. If there is one active job for a USB device and you select the eject feature (provided there is a switch in the UI), you will never be able to add additional jobs for that device because the device node is auto-removed after the device is plugged and the rsync jobs were executed. And if you want to add additional jobs in the UI using that device you NEED to plug the device to allow OMV to detect it and show it in the UI in the 'Create job' dialog.

    The workaround to disable all active jobs, apply the changes and then plug the device to create new jobs is a really bad solution which you cannot convey to the user. Alternativelly you need to delete all jobs, apply the changes and re-create them from scratch for the given device; this is also no solution. So at the moment i do not see a way how to implement that.

    OK. I tested a bit. The drive behaves exactly like a USB thumb drive for example. Ejecting the cartridge is the same as unplugging the USB thumb drive. Yet it makes no difference, whether I use the button of the drive to eject it or the eject command. In both cases there is no device and no device node anymore which is expected and logical behavior in my opinion.


    As soon as I put the cartridge back in again, the device is there again. No need to actually plug the whole drive. Again exactly the same behavior as with a USB thumb drive.

    Does the command

    Code
    # echo 'offline' > /sys/block/sd<X>/device/state

    eject the tape? Does the device node still exist after that command?


    Code
    # cat /proc/partitions | grep sd<X>

    This command does not eject the cartridge. Device node does still exists.


    If there is a way to eject the tape without removing the device node, then this will be the solution. But i have no device for evaluating and testing the sysfs capabilities, so any help from the community is welcome. In the meanwhile i let the PR open for comments.

    I don't think that it is possible to eject the cartridge without removing the device node. This indeed makes no sense.


    I can only edit the backup job if the device is plugged in and online which is ok for me.

    I admit that this kind of drives are probably rarely used. Nevertheless for me, there might also be good reasons not to eject the cartridge in general.

    By my feeling these drives are very common in (semi-)professional SOHO environments as external backup devices.


    What is the requirement behind it? What is the problem of pressing the eject button?

    I would like to show inexperienced users that it is ok to actually remove the cartridge. An ejected cartridge is a clear signal for the user that the backup job is successfully completed.


    When the cartridge is ejected when the backup job is done it is no longer possible to store another job on the same cartridge. Or is the RXD drive able to feed-in the tape automatically when a mount command is executed?

    Well but it is possible to just re-insert the cartridge again which would trigger a new job, isn't it?


    The only problem is that if you reboot the system with a plugged device the rsync job is triggered automatically by UDEV and ejects the device after the sync (incl. removing the device node), which makes it impossible to run the jobs from the UI again. Another problem is when you want to add additional jobs when there are existing jobs. In that case you plug the device, the jobs are running and on success the device node is removed. Because of that the UI will never be able to let the user choose the USB device in the job creation dialog because the device node does not exist anymore.

    Therefore, it would be nice to have the option to configure the eject command after the rsync job finished, not as default behavior.


    Thx!


    PS: Whatever at the end your decision might be - thx a lot for this interesting discussion!

    The mentioned Tandberg RDX drive is an usb storage device. It would be nice to eject the cartridge after the backup has finished making it clear for the user that it is ok to remove it...

    Thx a lot for your answer! But the usbbackup plugin is just a script, isn't it? The script automounts a drive, starts rsync and umounts the drive. So maybe it might be possible to kind of hack the script an insert one simple command like the mentioned eject command? Unfortunately I do not have the knowledge to do that, but there are so many wise people in this forum. Maybe one of them could give me a hint??? Or is there an official way to ask for new features for this plugin?

    Hi


    I use usbbackup plugin to synchronize my backups to an external Tandberg RDX drive which works fine. After the backup I would like to eject the cartridge (eject /dev/sdxx). Is there a way to execute the eject command automatically right after rsync has finished?


    THX a lot!!!!


    :)