You are not logged in.
Hello,
I have a External Hard drive It's a WD My passport 2T
when i umount it and click on safely remove the drive from gnome file manager on hard there is still activity
like still my hard LED Blinks even when i safely eject it
i used other method like using power off option in udiskctl command and after i use status in udiskctl i can't no longer find the hard disk so that means (i think) hard disk is no longer is available for system to read and write but i check my hard and still see LED still blinking i don't have that problem on windows( i dual boot my laptop to run windows and arch installation) when i eject it hard drive LED activity is off but my arch(what i use for everyday use) when i eject it still blinks even when i unmount and safely eject it i some times wait to see it's go off or not but still after 10 min led still blinking
But sometimes i see it's LED go off when i eject it on arch but like every 40 try 2 or 3 times when i eject it
i used sync command before ejecting but after unmount and safely eject still activity led is Blinking
i wanted to use detach option in udiskctl but i think power off still do the same or it's different from other one?(maybe i am wrong?)
what i did was wrong?
Last edited by Mona5 (2024-10-29 06:54:02)
Offline
i dual boot my laptop to run windows
3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.
What does "blink" mean?
Just because you umount a device it (resp. the usb port) doesn't get cut from power - is it just a status LED suggesting the drive is powered or is it some access LED that indicates IO?
Is the drive still spinning?
Cut out gnome.
Boot the multi-user.target (2nd link below), mount the drive, copy a file there, umount the drive and check the impact on the status LED(s)
sudo lsof | grep '/dev/sdX' # replace "sdX" w/ the actual device for the drive
You can also try
sudo hdmparm -C /dev/sdX # prints status
sudo hdmparm -Y /dev/sdX # idles drive, sdX same as above
Do NOT type random commands into hdparm without consulting the manual. You can PERMANENTLY DESTROY THE DRIVE w/ the "wrong" hdparm command!
Online
Hello,thank you seth for your reply
i dual boot my laptop to run windows
3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.What does "blink" mean?
Just because you umount a device it (resp. the usb port) doesn't get cut from power - is it just a status LED suggesting the drive is powered or is it some access LED that indicates IO?
Is the drive still spinning?Cut out gnome.
Boot the multi-user.target (2nd link below), mount the drive, copy a file there, umount the drive and check the impact on the status LED(s)sudo lsof | grep '/dev/sdX' # replace "sdX" w/ the actual device for the drive
You can also try
sudo hdmparm -C /dev/sdX # prints status sudo hdmparm -Y /dev/sdX # idles drive, sdX same as above
Do NOT type random commands into hdparm without consulting the manual. You can PERMANENTLY DESTROY THE DRIVE w/ the "wrong" hdparm command!
i disabled fastboot in windows because i had a problem before hand with help of one of users in this site a vfat partition that i use between windows and arch
that LED exist on external hard i believe just like you said it's for showing that the external hard is powered on or off or it's a activity on it or not
but i reached something new today i find out whenever i reboot for the first time i connect my external hard when i use udisksctl to power it off LED on external hard goes off but for next times i connect and use udisksctl to power off the disk after umount led on hard drive blinks but there is no sound for proof that disk is spinning becuase it's Quiet just a LED blinks
just like you said i cut out Gnome and used tty1 with changing defualt (graphical.target) systemctl to multi-user.target reboot and mount and copy a file and then unmount it after that without power off the device
i used the command lsof and grep but terminal didn't give me a output
i used udisksctl to power it off it's LED turn off i used lsof just as expected output is nothing for my device
i return to graphical target and connected the device again and power it off again disk led turn off but for next turns i connected the device and power it off LED blinks i used lsblk and i see when i power it off the device it's as if it doesn't exist anymore but still led blinks and disk doesn't spin as if it's off but only a led blinks i used lsof in this part to but it didn't give me anything about my device
udisksctl status give nothing about my device too like my device is disconnected
i scare if i remove the drive when it's LED blinks but there is no disk activity it hurt my data on Hard Drive or other things when device isn't ejected properly in windows whenever i eject it led turn off too as long as i remember, i scare my external hard get busted
Offline
for next times i connect and use udisksctl to power off the disk after umount led on hard drive blinks
Do you physically re-attach the device or is this just mount/umount/mount/umount/…?
i return to graphical target and connected the device again and power it off again disk led turn off but for next turns i connected the device and power it off LED blinks
So have you ever been able to cause the undesired behavior WITHOUT gnome?
it hurt my data on Hard Drive or other things when device isn't ejected properly in windows
When you umount the drive the data gets synced. There're two possible issues:
1. iff (hypothetically) the drive has an internal cache that has not been written, removing the drive and thus cutting power will lose that cache (and the cached changes)
2. If the drive is still spinning or just the read/write head is not rested, the drive will have to emergency-reset it on power loss. That *should* not be a problem, but the head might crash on the disc, causing physical harm.
Did you try to idle the drive w/ hdparm or at least checked its state?
On a formal note, please don't fully quote posts. It just bloats the thread.
Online
Sorry for quote
yes i physically remove and connect my device not only with mount and unmount
sorry to didn't test it without gnome i must say I was able to cause the LED blinking it seems the first one was a lucky shot ( i went in multi user again without graphical)
sorry it scared the shit out me when you said "PERMANENTLY DESTROY THE DRIVE" and i didn't use that my arch is a fresh install and i didn't installed hdparm i installed now and going to check it out
when drive is mounted it hdparm -C give
$sudo hdparm -C /dev/sdb
/dev/sdb:
SG_IO: bad/missing sense data, sb[]: f0 00 01 00 50 40 ff 0a 80 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drive state is: unknown
and when i unmount it it give the same output
now i am going to idle the drive with hdparm output for it is
$sudo hdparm -Y /dev/sdb
/dev/sdb:
issuing sleep command
SG_IO: bad/missing sense data, sb[]: f0 00 01 00 50 40 00 0a 80 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
i shaking as i write this now what i do now i mean what is "bad/missing sense data" even mean and as the output say and drive still spinning and led is on without blinking, i think i can only power it off with udisksctl don't tell my external hard is in the days of its end its a nfts simple windows systemfile format(just as windows say about it) and have 1.2 T of its with data full
Offline
it scared the shit out me when you said "PERMANENTLY DESTROY THE DRIVE"
Do NOT type random commands into hdparm without consulting the manual. You can PERMANENTLY DESTROY THE DRIVE w/ the "wrong" hdparm command!
hdparm -I /dev/sdb
But the drive doesn't support those commands.
You can try https://aur.archlinux.org/packages/hd-idle
Online
i have to install from AUR?
doesn't arch have something for it?
and spinning end after 3 minute i think but led is still on(not blinking) and i have it in lsblk still not used udisksctl for it
so what that means what i have to do?
Offline
Apparently yes and "arch" doesn't have anything for anything. But apparently no trusted user has any interest in that package (anymore, was in the community repo until 2023-04-01)
There's also no guarantee that it'll idle your drive, but it's probably the best shot you have.
Online
thanks for your effort seth
i installed hd-idle pkgbuild from aur i used to spindown my drive for 100 sec but it didn't work
it seems my external hard isn't fully supported well at least when i use udisksctl its stop spinning and only blinks i believe just as you said its possible it's a internal cache if thats the case after i unmount it i wait until drive itself stop spinning then if everything the drive want to sort it out that is the time then i power it down and i don't think that way it's hurt my drive
thanks seth
Offline
I think i found a solution i was playing with hdparm
and i found out the best way to exit my drive thanks to seth i went installed hdparm and played with it a little
when i unmount my drive the drive still spin and still it's LED is on
and when i use udisksctl to power it off disk won't spin and LED start to blinks
but with the help of hdparm i found a way to stop activity with the help of seth it's correct that my external hard drive aren't fully supported with hdparm but it stop spinning and put it in sleep mode as manual say about it but it not completely off as i told to seth LED is still on but if i use udisksctl and turn the disk off we will be able to completely turn the disk off even LED Blinking won't happen on hard so that i used commands with this order
1# using any way to unmount the drive from gnome file manager or command
2# using hdparm to put your drive on sleep mode (it won't completely turn off the drive and in my case for the first time i used it didn't stop spinning but now it stop spinning but not turning LED off)
3# using udisksctl to completely power off your drive
but that rise a question for me is that is this way will surly be safe and don't hurt my disk i mean when i use udiscksctl like how i told you it pause for a long time at least 40 sec and sometime it freeze my screen i don't thinks the way i found is safe one but it completely turn my hard off so is my way i used this commands is correct or not?
Offline
I'd stay away from all IOCTLs that don't work, so if udisksctl rather blocks and stalls the system and makes the led blink instead of achieving what you want: don't use it.
If hdparm only issues an error and doesn't (consistently) idle the drive (check the status w/ "hdparm -C"), don't use that either.
The most important thing is that the drive isn't spinning, because then the head is flying for pretty much sure.
You may also try your luck w/ "eject" (from util-linux) or "sdparm eject" from https://archlinux.org/packages/core/x86_64/sdparm/
Do you btw. disable usb autosuspend for some reason? (The port should™ power down after a while)
Online
hdparm just give me a error i used --verbose and the error was unsupported device but it stop spinning hard disk whenever i use that but led won't turn off but after i use udisk power off it take time but it completely turn off the led (sometimes when i play "Games" when using command the program(Lutris) freeze only a second or two and then i found that the disk is completely off) and hdparm -C output for my device is unknow every time i use it
i used sdparm --command=eject it was unfortunate that didn't do anything even didn't stop spinning
no my arch was a fresh install and i didn't mess with that kind off things i even didn't install any laptop management because my laptop don't use to much power if i play games it's a different story but for using day to day like reading and editing stuff it hold at least 4 to 6 h battery working on my job and 2.5 h when gaming
the port power down after 10 or 30 minute i believe or when i use disk after 10 minute when i don't use the disk (even when disk mounted) disk go to idle and turn off led and disk stop spinning
Offline
UPDATE [[SOLVED]]
the problem solved with new update of arch i don't know when it's fixed but i don't need hdparm anymore.
thanks for all your help
Last edited by Mona5 (2024-10-29 06:53:40)
Offline