Re: eSATA removable drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2010-07-11 at 23:07 -0400, D. Hugh Redelmeier wrote:
> | From: D. Hugh Redelmeier <hugh@xxxxxxxxxx>
> | Date: Tue, 6 Apr 2010 15:23:17 -0400 (EDT)
> 
> This is a bit old.  Here's the start of thread in the archives: 
>  <http://lists.fedoraproject.org/pipermail/users/2010-April/370236.html>
> 
> | I have an eSATA external hard drive case.  I want to hotplug / unplug it.
> | 
> | My system is Fedora 11.
> 
> I've since upgraded for Fedora 13.  I still have this problem.
> 
> | I added an external eSATA port on my desktop computer by adding a bracket 
> | (with an internal cable connected to one of the ordinary SATA sockets on 
> | the motherboard.)
> | 
> | The SATA controller is an intel ICH9R.  To make hotplug work, I needed
> | to go the computer's BIOS and change the SATA mode to AHCI (it was
> | IDE).
> | 
> | I can now hotplug the drive.
> | 
> | I cannot unplug the drive.  If I tell the system to eject the drive,
> | it complains:
> | 
> |     # eject /dev/sdi
> |     eject: device "/dev/sdi" doesn't have a removable or hotpluggable flag
> |     # cat /sys/block/sdi/removable 
> |     0
> | (I don't know where or what a hotpluggable flag is.)
> 
> | My guess is some kind of HAL rule but I'm not an initiate.  Maybe
> | something in here would work:
> |   <http://www.thinkwiki.org/wiki/How_to_hotswap_UltraBay_devices>
> 
> I still don't know, but lshal(1) tells me a bit:
> 
> 	udi = '/org/freedesktop/Hal/devices/storage_serial_ST31500341AS_9VS0N5K1'
> 	  block.device = '/dev/sdi'  (string)
> 	  block.is_volume = false  (bool)
> 	  block.major = 8  (0x8)  (int)
> 	  block.minor = 128  (0x80)  (int)
> 	  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_ST31500341AS_9VS0N5K1'  (string)
> 	  info.capabilities = {'storage', 'block'} (string list)
> 	  info.category = 'storage'  (string)
> 	  info.parent = '/org/freedesktop/Hal/devices/pci_8086_2922_scsi_host_5_scsi_device_lun0'  (string)
> 	  info.product = 'ST31500341AS'  (string)
> 	  info.udi = '/org/freedesktop/Hal/devices/storage_serial_ST31500341AS_9VS0N5K1'  (string)
> 	  info.vendor = 'ATA'  (string)
> 	  linux.hotplug_type = 3  (0x3)  (int)
> 	  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdi'  (string)
> 	  storage.automount_enabled_hint = true  (bool)
> 	  storage.bus = 'pci'  (string)
> 	  storage.drive_type = 'disk'  (string)
> 	  storage.firmware_version = 'CC1J'  (string)
> =>	  storage.hotpluggable = false  (bool)
> 	  storage.lun = 0  (0x0)  (int)
> 	  storage.media_check_enabled = false  (bool)
> 	  storage.model = 'ST31500341AS'  (string)
> 	  storage.no_partitions_hint = false  (bool)
> 	  storage.originating_device = '/org/freedesktop/Hal/devices/computer'  (string)
> 	  storage.partitioning_scheme = 'mbr'  (string)
> =>	  storage.removable = false  (bool)
> 	  storage.removable.media_available = true  (bool)
> 	  storage.removable.media_size = 1500301910016  (0x15d50f66000)  (uint64)
> =>	  storage.requires_eject = false  (bool)
> 	  storage.serial = 'ST31500341AS_9VS0N5K1'  (string)
> 	  storage.size = 1500301910016  (0x15d50f66000)  (uint64)
> 	  storage.vendor = 'ATA'  (string)
> 
> All those marked settings look wrong to me.  I guess HAL rules could
> fix this.  Surely I'm not the first to hit this problem.
Hi

I do this very regularly with F13 for SSDs, memory sticks and mech disks
using USB and eSATA.  I have a crude solution.

I am using XFCE but find KDE's "dolphin" is best for umounting the
partitions as all the partitions show up in the sidebar

Because I'm not interested in physical security I hack
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy

SElinux is permissive but not sure that is relevant

<action id="org.freedesktop.udisks.filesystem-mount-system-internal">
                <allow_any>yes</allow_any>
                <allow_inactive>yes</allow_inactive>
                <allow_active>yes</allow_active>
<action id="org.freedesktop.udisks.filesystem-unmount-others">
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>

This "should" be enough to get things working
---------------------------------------------------
If I require more control of the mount then
I force udev to do the "hotplug" mount instead of HAL using a script
which I can let you have.
This will set mount options eg
noatime, discard for SSDs
It changes the disk scheduler to noop for SSDs
It also fools dolphin into thinking HAL did the mount
so that it will do the umount.

John


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux