Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ubuntu 12.04 Hot Plug SATA Safe removal

Featured Replies

I have been scowering the internet trying to work out how to remotely via ssh safely remove a hot plug sata drive on Ubuntu 12.04 desktop

 

I know how to replicate unity mouting via SSH (udisks) and I know how to safely remove via ssh (sync, udisks, sg_start, cat to device in sys)  but it seems Unity (gvfs) auto detects the drive just after i do all this and makes it "less" safe to remove again.

 

Has anyone any experience/tips on how to deal with hot plug in Ubuntu 12.04

 

Cheers

 

Commands used in the process

 

#Detecting drive
blkid

#Mounting
udisks --mount /dev/sdc1

#Removing
sync
udisks --unmount /dev/sdc1
sg_start /dev/sdc --stop
echo 1 > /sys/block/sdc/device/delete

#Needs
sd-utils

 

Errors seen after i remove the drive include:

 

[39591.460304] ata2.00: disabled
[39605.572436] ata2: exception Emask 0x50 SAct 0x0 SErr 0x4090800 action 0xe fro                                               zen
[39605.572441] ata2: irq_stat 0x00400040, connection status changed
[39605.572445] ata2: SError: { HostInt PHYRdyChg 10B8B DevExch }
[39605.572453] ata2: hard resetting link
[39606.293054] ata2: SATA link down (SStatus 0 SControl 300)
[39606.309045] ata2: EH complete

 

 

  • Author

OK so this method whilst showing some errors seems to have no negative effects. it is also better than just umounting and pulling a disk whilst it is till spinning.

 

I am sure there is a proper way out there somewhere but it is beyond me to find it.

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.