Deactivate - reactivate USB-Ports

Tell us your most wanted new features, or recommendation.
User avatar
Hardfecx
Posts: 244
Joined: 04 Jun 2020, 23:17

Deactivate - reactivate USB-Ports

Post by Hardfecx »

Hi,

ist there a possibility to deactivate and reactivate USB Ports by a script?
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: Deactivate - reactivate USB-Ports

Post by TMroy »

Did you mean USB port? or USB device?
If USB port, why do you need to activate/inactive your USB port?
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
Hardfecx
Posts: 244
Joined: 04 Jun 2020, 23:17

Re: Deactivate - reactivate USB-Ports

Post by Hardfecx »

{L_BUTTON_AT}TMroy

Well because I have 2 USB drives connected on the Nas ( for USB Copy Backup) and so they are all day on power. But if I remove the USB cable, they are powered off. So I wanted a script that deactivate the USB port (so no more power on it) and activate it before backup to the USB Disks is starting.
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: Deactivate - reactivate USB-Ports

Post by TMroy »

Then i think you can do so. here is an article for your reference.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
Hardfecx
Posts: 244
Joined: 04 Jun 2020, 23:17

Re: Deactivate - reactivate USB-Ports

Post by Hardfecx »

{L_BUTTON_AT}TMroy

Thank you M8! I did that several years ago on a Windows XP machine but in cmd as a *.bat file.
But how can I start and stop the script on the Nas or have those commands to be sent frem an Pc to the Nas (F4-210 - Raid5 - 4x 2TB)
User avatar
Hardfecx
Posts: 244
Joined: 04 Jun 2020, 23:17

Re: Deactivate - reactivate USB-Ports

Post by Hardfecx »

{L_BUTTON_AT}TMroy

Sorry, but I can't edit my previous post...
I can't find any terminal application (so I can't create a script like a *.bat file on Windows Pc's) and no option to run a schedule file. By the way, I have no Linux machines in my Network....
User avatar
Hardfecx
Posts: 244
Joined: 04 Jun 2020, 23:17

Re: Deactivate - reactivate USB-Ports

Post by Hardfecx »

{L_BUTTON_AT}TMroy

I tried with "devcon" but that's only for the Windows machine where I can enable/disable Usb ports... but over Network it doesn't work
User avatar
Hardfecx
Posts: 244
Joined: 04 Jun 2020, 23:17

Re: Deactivate - reactivate USB-Ports

Post by Hardfecx »

{L_BUTTON_AT}TMroy

Me again...(why I can't edit my first post after several Minutes because so I have to create always a new one...).

I tried now with SSH and I can unmount my USBShare but then they are still powered on. I didn't find any command to deactivate the USBport so that is no more power on it... Is that even possible?
But again, even if it is possible, I have to launch those commands from a Pc wich is running, right?
User avatar
titanrx8
Posts: 222
Joined: 17 Jul 2020, 06:17

Re: Deactivate - reactivate USB-Ports

Post by titanrx8 »

{L_BUTTON_AT}TMroy
Hardfecx wrote: 20 Nov 2021, 15:45 Me again...(why I can't edit my first post after several Minutes because so I have to create always a new one...). I tried now with SSH and I can unmount my USBShare but then they are still powered on. I didn't find any command to deactivate the USBport so that is no more power on it... Is that even possible? But again, even if it is possible, I have to launch those commands from a Pc wich is running, right?
Maybe attach the USB drives to the PC where you can control the drives' power state? Not sure if USBcopy can work with virtual disks and performance might be poor but you get to power down disks.
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: Deactivate - reactivate USB-Ports

Post by TMroy »

You are not able to control the USB power by script, no possible.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
Locked