#[SOLVED] Sata hotplug detection

92 messages · Page 1 of 1 (latest)

fresh kiln
#

My motherboard supports SATA hotplug, and thats a really cool feature, but archlinux can't (atleast) for me see the new sata device without running a long ahh command. Can i make it detect the sata devices automatically

small storm
#

is it enabled in bios

#

also run lspci -k | grep -A 3 SATA

#

should say ahci

#

can try

#

sudo nano /etc/udev/rules.d/90-sata-hotplug.rules

#

paste: ACTION=="change", SUBSYSTEM=="scsi_host", RUN+="/bin/bash -c 'echo - - - > /sys/class/scsi_host/%k/scan'"

#

then reload rules

#

sudo udevadm control --reload-rules

fresh kiln
#

i enabled hotplug in bios personally

fresh kiln
molten rivetBOT
#

displaynamecodes received a thank you cookie!

fresh kiln
#

it worked

#

<3333

#

... solved

kind jackalBOT
#

#17640 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: https://media.discordapp.net/attachments/1377138685538992252/1394893287667667035/image.png?ex=6878771b&is=6877259b&hm=e490049052812fd977384de338fa0f0c0634c50ed75a6f5a00bc7c7a847ff278&=&format=webp&quality=lossless&width=628&height=122
Thank you

fresh kiln
#

[SOLVED] Sata hotplug detection

#

@small storm can i do something like with pendrives? so i can just press a button and it will remove it

#

and i can the unplug the cable

fresh kiln
fresh kiln
#

eject

small storm
#

yes

#

what de you on?

#

xfce/hyprland/other

small storm
fresh kiln
small storm
#

ok

#

what shell are you using

fresh kiln
#

zsh

small storm
#

bash/fish/zsh

#

do you want a command to eject all?

#

all usb devices

fresh kiln
#

for example

#

/dev/sda

small storm
#

i thought you said usb?

#

do you want a custom command or a snippet

#

for sata or usb

fresh kiln
#

to eject them

small storm
#

ALL of them/

fresh kiln
#

so i can safely remove the cables

small storm
#

?

fresh kiln
#

im gonna tell you exactly what i would like

small storm
#

ok

fresh kiln
#

a command which ejects a sata disk (for example: /dev/sda)

small storm
#

first unmount partition then power off

#

udisksctl unmount -b /dev/sda1 && udisksctl power-off -b /dev/sda

fresh kiln
small storm
#

add to ~/.zshrc (better than alias):

eject_sata() { udisksctl unmount -b ${1}1 && udisksctl power-off -b ${1}; }
#

then eject_sata /sda/whatever to run it

fresh kiln
small storm
#

:)

small storm
small storm
fresh kiln
small storm
#

echo $XDG_CURRENT_DESKTOP

#

or echo $DESKTOP_SESSION

fresh kiln
#

plasma

small storm
#

ok

fresh kiln
#

OHHH U WERE ASKING ABOUT THE DESKTOP ENVIORMENT

small storm
#

yeah

fresh kiln
#

OKAY IM A DUMBASS SORRY

small storm
#

np np

#

ok

#

where do you want the button/thing to eject drives to be?

#

you can run kde-partitionmanager

fresh kiln
small storm
#

hmm

#

i dont really know much about writing guis for plasma/similar

#

idk

fresh kiln
molten rivetBOT
#

displaynamecodes received a thank you cookie!

small storm
fresh kiln
small storm
#

?

fresh kiln
# small storm ?

like when i decide to umount (for example) /dev/sda3 manually, and then run the command that you provided

#

wont it throw an error saying that nothing is mounted

small storm
#

idk

#

im not focused rn sorry

fresh kiln
#

oke

fresh kiln
#

it used python