[CentOS] how do I stop automount of Hitichi Lifestudio USB drive

Fri Aug 14 18:00:54 UTC 2015
Jason Warr <jason at warr.net>

On Fri, 2015-08-14 at 12:39 -0500, Michael Hennebry wrote:
> On Thu, 13 Aug 2015, Leon Fauster wrote:
> 
> > Could you provide more context information?
> > Appliance setup, Dekstop setup, server setup?
> > There exist a lot scenarios where something
> > happen automagically?
> 
> It's a Chimera Desktop 2014.
> More specifically, I bought the case, the motherboard,
> the CPU, the RAM and the graphics card from
> another poster for the price of postage.
> They'd been in or on their way to the trash.
> I don't remember whether the DVD writer and the power supply were included.
> The two hard drives and the floppy drive
> are transplants from its predecessor.
> The monitor is of the same vintage.
> It's running gnome on CentOS 6.
> My current machine and its predecessor were mentioned in a previous thread.
> 
> On Thu, 13 Aug 2015, Jonathan Billings wrote:
> 
> > To disable the auto-mounting of USB disks via udisks, you'd need to
> > set up a custom udev rule.  Of course, it's hard to know which
> > existing udev rule is catching your disk, as you said, behavior is
> > different with an SD card than with a USB disk.
> > 
> > For CentOS6, the udev configuration for udisks is:
> > /lib/udev/rules.d/80-udisks.rules
> > 
> > ... while in CentOS7, the udisks2 udev config is:
> > /usr/lib/udev/rules.d/80-udisks2.rules
> > 
> > You'd put the custom rule in /etc/udev/rules.d/.
> > 
> > These rules depend on the device name, vendor and model ID, drivers
> > used, etc.  You'd have to write a custom udev rule either for that
> > particular device, or something more generic for that class of
> > device.
> 
> I've been trying to read 80-udisks.rules with little success.
> Would posting it (242 lines) be helpful?
> After I plug in a drive,
> is there a way to discover what udev rule was applied?

udevadm test /sys/<device_path>

should give you a whole lot of output.  This will include info about what rules apply to the device
and actions that udev would take.

>