logo elektroda
logo elektroda
X
logo elektroda

Turning the SATA drive on and off while the computer is running

bicik4096 3741 10
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16792349
    bicik4096
    Level 4  
    Hello

    I have connected a drive specially for testing purposes to the Dell Optiplex 760. It turned out that turning off the power of the drive and turning it on again works as if the SATA drive was a USB drive. Just restart explorer.exe and the disk was copying the data before I disconnected the power, so after restart, explorer.exe continued to copy it when I turned the disk back on.

    Question:

    Can I make a modification on the relays, which turns the drives on and off physically from electricity? (are there any buts) My converted router now has built-in relays, you can scripts to turn them on and off ... Hence, Windows can control the router, control power (on / off) disks.

    I wanted to keep Windows in the frame and turn on the disks as needed. System suspending a disk has disadvantages, because disks wake the system up anyway, regardless of ourselves. I do not know how to force a sleeping disk in Windows 7 to remain so, until it is woken up by an appropriate command, for example from bat, or from an application in C #, C ++. Who knows, maybe you have some experiences.

    I currently have a nicely reworked Windows7 that runs in a frame that sees ISCSI drives as well. I wanted to continue the conversion to get the lowest possible power consumption of the computer when stopped. The computer, when the system is running in RAM, only monitoring works on it, which from time to time dumps recorded short mp4 pieces to the disk. I am trying to record this modest monitoring on a memory card in the future, and from the memory card every X hours, I will dump the data to the disk. In this way, the drives will not go almost empty hours after the night when the motion sensor is catching almost nothing.

    Ultimately, the whole thing is to work on the disc (https://www.asus.com/pl/Motherboards/AT5NM10I/) Intel Atom D510, on a disc that consumes very little electricity, and, importantly, is suitable for modest monitoring. I have three USB cameras on it and I am happy, the album is fine.
  • ADVERTISEMENT
  • #2 16792427
    RitterX
    Level 40  
    Or maybe you will use a windowed version of linux hdparm? From what I can remember, the -y option caused the disk to go into IDLE state, and -Y turned it off, the disk is still plugged in but the engine and the rest are not working and just waiting for a reset to get up and load what it needs. Completely without relays, elegantly with a keyboard or script :) . As it is done in Linux.
    You can also use the -B 255 option to turn off the manufacturer's parking of the heads every 5s. so that in 3 years you can get disk mechanics. From what I remember, it doesn't work on WD but I'm not sure because I haven't had this manufacturer's disk for a long time.
  • ADVERTISEMENT
  • #3 16792435
    funak
    Level 27  
    bicik4096 wrote:

    Can I make a modification on the relays, which turns the drives on and off physically from electricity? (are there any buts)


    You can, as long as you disable write caching on the device (i.e. HDD).

    And can't you take advantage of the built-in power saving option in Windows?
    After all, in the power saving settings in the power plan, there are options to turn off the disks after x minutes. You set 1 minute and that's it.

    I have 20 minutes set at my place. And after those 20 minutes, I hear ... "screech .... woooooooooooooooooooooooooo ... and silent!" And when I go to the disk in Windows to display the folder, nothing happens (because the cache) and if in another folder, I hear "woiiiiiiii .... cycle ... brgrgrgrg ...." and only appear files.

    In order not to wake the disk by Windows, you need to find out why it is happening. Because to wake the disk, the system must refer to the area that is not in the cache. It can be, for example, File Indexing, or e.g. Smart enabled in the BIOS. He can also turn on the disk after a long idle time and scan the surface for errors.
  • #4 16792442
    bicik4096
    Level 4  
    If not for the fast SMB in Windows 7, I would have taken Linux a long time ago. If it wasn't for the great Contacam program, I would have taken Linux. I am addicted to a few things on W7, also on C #. Sometimes I have to run something on W7 on this energy-saving computer to test the application on another.

    Who would have thought, the first thing I hear is SAMRT doing such things - and he's a bastard;] My guess is that services can wake you up. Physically turning off seems to be a sure thing, and it also has some advantages. In fact something is off.

    Ever since I switched to relays and controlling them via a router, I have solved a lot of the problems that I had been sitting on before and had always been dependent on some sort of hardware solution. And yes, the router consumes little power and is able to physically turn on blocks of computers. Importantly, computers in standby also consume electricity. And so physically disconnected, they charge nothing.
  • ADVERTISEMENT
  • #5 16792453
    funak
    Level 27  
    Disconnecting disks physically is also a good idea, but you would have to unmount it first, but to unmount you need not have any open file on the disk, otherwise Windows will ask you to restart your system to complete your command.

    So I would stick to the IDLE option though and finding out which file / application is referencing the disk.

    For example, to check it, I put a "hook" on the monitored directory (it is very easy to program in .NET) and you have a good idea which file is being referenced. Then you have to "dig" which EXE is selected for it.

    Anyway, some of the references can be seen in the Monitor Zasobów.
  • ADVERTISEMENT
  • #7 16792604
    funak
    Level 27  
    Looking through the manual (in French), I did not find an option that would allow HOT SWAP to be performed. But it reminded me that eSATA has the HOT SWAP option by definition.

    Added after 1 [minutes]:

    bicik4096 wrote:
    I am trying to record this modest monitoring on a memory card in the future, and from the memory card every X hours, I will dump the data to the disk. In this way, the drives will not go almost empty hours after the night when the motion sensor is catching almost nothing.


    And doing so is about to "kill" the memory card, because it is less viable than the magnetic disk. You are about to exceed the max. number of entries and that's it. You will have to replace the card.
  • #8 16793022
    bicik4096
    Level 4  
    If the CF card is mainly used, for example, to receive recordings from a camera or photo camera, it should be so, but it should come from a bit. If the program stores monitoring data in the RAMDISK, and the package grows to a given size, then saving to a compact flash or other card will be rare. It is a pity that there are no cheap SSD memories, such an SSD would probably serve such activities for a long time.
  • #9 16793054
    funak
    Level 27  
    For example, saving every second the SD card gets damaged after about 3 months. I noticed this with the parameter recorders.

    As an interesting fact, opening and reading a file also generates a record. Once upon a time I did such an experiment with an SSD. He has Smart and registers showing how many sectors have been written. It was enough to enter the directory and already 2-3 sectors recorded more. It is related to updating the date of the last access to the file / directory.

    Added after 1 [minutes]:

    Let's assume that it has a 128GB SSD drive, you can safely save 75TB of data, how long is it enough for you?
  • #10 16793096
    bicik4096
    Level 4  
    Is there any way to dictate either an appropriate filesystem when formatting a partition, or anything else to prevent dates from being updated? I suppose generating in system code could do that. For example, such a W7PE. Who knows if explorer.exe doesn't care. All in all, you would have to look deeper. Core Force firewall nicely shows what the system is using, only on XPx86. However, these are always some tips.

    You are asking for 75TB of data as long as I need. I cannot judge it. From one webcam, I have 141 MB of saved data on a random day.
  • #11 16793125
    funak
    Level 27  
    The type of disk matters. They have described (or not) what memories are made of.

    For example, the MLC has 5-10 thousand entries.
    Poor quality TLCs have 300 records. Better: 500-1000 records.

    Now you multiply the number of writes by the disk capacity and you have the end of its endurance.

    MLC disks have not happened for a year now, but it's worth looking for.

    Oh ... and somewhere I read that the manufacturer pays attention to the amount of saved data under the warranty.

Topic summary

The discussion revolves around the feasibility of physically turning SATA drives on and off while a computer is running, specifically in the context of a Dell Optiplex 760. The user explores the possibility of using relays controlled by a router to manage power to the drives, as traditional methods in Windows, such as power-saving settings, may not prevent the drives from waking up due to system activities. Suggestions include using Linux tools like hdparm for managing drive states without physical relays, and the importance of unmounting drives before disconnection to avoid system prompts. The conversation also touches on the implications of using different types of storage media, such as SSDs and CF cards, and their endurance based on write cycles.
Summary generated by the language model.
ADVERTISEMENT