Announcement

Collapse
No announcement yet.

KDE Will Now Safely Spin Down External Hard Drives When Unmounting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • KDE Will Now Safely Spin Down External Hard Drives When Unmounting

    Phoronix: KDE Will Now Safely Spin Down External Hard Drives When Unmounting

    Fixing a seven year old bug since the KDE4 days, KDE will now spin down external hard drives unmounting the drives to help stave off possible data loss / corruption...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Interesting. Regardless of the GUI installed, I never use its built-in unmounting and ejecting capabilities. Instead, i just do a sudo umount /dev/sd<something><somenumber> && sudo eject /dev/sd<something>

    Never knew that a a spin down is carried out on the graphical methods. How can I do this via the CLI?

    Comment


    • #3
      Finally, It has been a shame that the external hard drive and USB stick are not power down. 7 years to realize this.

      Comment


      • #4
        Pretty odd that they went this long not fixing a somewhat big deal of a problem. To my recollection, KDE would still sync the data when ejecting, so that's good.

        Slight side note:
        In general, one of the only things I never liked about Linux is its default behavior to have async writes, particularly on USB/removable drives (it isn't such a big deal on boot drives). This is one of those things that doesn't translate well for newbies coming over from Windows.

        Comment


        • #5
          I quite frankly don't think this is an issue for data loss as before unmounting it calls a sync anyway.

          If the drive loses data randomly if powered off after it has told the OS that it had written stuff, then it's a crappy drive firmware issue.

          Comment


          • #6
            Originally posted by starshipeleven View Post
            I quite frankly don't think this is an issue for data loss as before unmounting it calls a sync anyway.

            If the drive loses data randomly if powered off after it has told the OS that it had written stuff, then it's a crappy drive firmware issue.
            if it is not an issue it is not a bug.

            Comment


            • #7
              First of all, KDE is a Desktop Environment, not a Linux Distribution.

              udiskctl is the command used to turn off disks from command line. Many would assume that doing a umount is enough to ensure a safe flush of any buffers to the drive. But if the hardware is buggy then a power off many be necessary to flush the drives cache.A power down would be inadvisable if there are any other mounted partitions on the drive.

              Many USB HDs have a automatic sleep feature after 10 minutes or whatever of inactivity it will power down. However this can be pretty annoying. Many drives go into a sleep state that spins down the platters but the drives memory remains active so that when more data is sent to the drive, it wakes up like nothing happened.

              Some drive hardware is buggy. You would hope that flushing the data to the drive would be enough to ensure all of the data is written out and the filesystem has been safely stabilized.

              Many drives have funny out of order disk cache flushing features. This is used with features called Native Command Queuing, Force Unit Access and Disable Page Out. It was the case for a while, The kernel was supposed to be able to find out when blocks have been flushed to the physical drive, so it can implement a write barrier, this is to ensure the journal flushes to disk before other disk structures are modified. However the implementation of this on some drives was buggy.

              I had a USB thumb drive that would be corrupted if you forget to do a manual umount on the filesystem on the memory stick. I suspect that unless you did a umount, some command was not being sent to flush data to the drive or to somehow refresh it. The funny thing is, it would corrupt the MBR, I don't, know how that is possible. It would happen when using one of those USB 3 controller PCI expansion cards but did not occur with the computers on board motherboard USB controller.

              Comment


              • #8
                Originally posted by Azrael5 View Post
                if it is not an issue it is not a bug.
                Not all bugs are the same. Some are very bad, some are minor things.

                Comment


                • #9
                  Originally posted by jpg44 View Post
                  First of all, KDE is a Desktop Environment, not a Linux Distribution.

                  udiskctl is the command used to turn off disks from command line. Many would assume that doing a umount is enough to ensure a safe flush of any buffers to the drive. But if the hardware is buggy then a power off many be necessary to flush the drives cache.A power down would be inadvisable if there are any other mounted partitions on the drive.
                  ...
                  udisksctl power-off -b /dev/sdX

                  How can KDe developers unable to implement this command into the notification panel area so to not only unmount but also turning off the usb stick!? It's absurd

                  Comment


                  • #10
                    Originally posted by jpg44 View Post
                    udiskctl is the command used to turn off disks from command line. Many would assume that doing a umount is enough to ensure a safe flush of any buffers to the drive. But if the hardware is buggy then a power off many be necessary to flush the drives cache.
                    If the hardware is so buggy it belongs to the garbage.

                    I can understand shenanigans like not reporting 100% accurate write status when you call a sync, but requiring a manual power cycle to avoid data loss is crossing the line, for my standards.

                    I had a USB thumb drive that would be corrupted if you forget to do a manual umount on the filesystem on the memory stick. I suspect that unless you did a umount, some command was not being sent to flush data to the drive or to somehow refresh it. The funny thing is, it would corrupt the MBR, I don't, know how that is possible. It would happen when using one of those USB 3 controller PCI expansion cards but did not occur with the computers on board motherboard USB controller.
                    This would make me look at the PCIe expansion card with a lot of suspicion.

                    I've known of many such cards having weird quirks, and quite a few times I had to update their firmware (with the usual sketchy downloads from sketchy sites, ran as Administrator on a Windows system) to get them to act normally.

                    Comment

                    Working...
                    X