Operating System - Linux
1827474 Members
2347 Online
109965 Solutions
New Discussion

Re: How to load/unload/eject Optical diskes with commands ?

 
Nguyen Thanh Bien
New Member

How to load/unload/eject Optical diskes with commands ?

Hi experts !
i'm using a HP SureStore 220mx Optical Jukebox with RedHat Linux 7.2 (with MO 9.1 GB diskes 2 slices)
i have to load/unload/eject and change side (a<-->b) manually (press buttons on the jukebox..) whenever i want to do.

anyone knows how to do it with some commands (so i can make a shell script to do automatically backing up and restoring files across multiple disk with both sides) ?

thanks in advanced !
2 REPLIES 2
Stuart Browne
Honored Contributor

Re: How to load/unload/eject Optical diskes with commands ?

Have you looked at the 'eject' command, and the 'mtx' commands?

I've not had opportunity to play with any of the SureStore jukeboxes, but for the tapes, the 'mtx' command is what allows you to manipulate them.

I can't recall if 'mtx' has an unload, but if it's the selected slice/disk/tape, the 'eject /dev/blah' should be sufficient.

If it shows up as an 'st' device, then you might need the '-q' flag to eject.

Hope this helps, or at lease gives you a path to discovery.
One long-haired git at your service...
Nguyen Thanh Bien
New Member

Re: How to load/unload/eject Optical diskes with commands ?

Hi !
i've already played with eject command: eject /dev/sda, but it didn't work. i think the OS must control Medium Changer (different ID) not diskes (right ?).

Thanks anyway !
BTW: why i must use 512 bytes sector size (not 4096) when i fdisk the new MO disk ?? (core dump occured when use default sector size)