You are not logged in.

#1 2016-02-05 14:19:22

ormu
Member
Registered: 2013-05-14
Posts: 22

[SOLVED] Hard disk partitions showing up as removable devices

After a system upgrade today morning, the KDE taskbar widget that shows USB sticks and other removable devices is now showing all hard disk partitions too. Also, Wine automatically adds a bunch of virtual drives, most/all of which seem to point to the partitions/mount points I have: /, /home, /var, /mnt/windows and so on.

Is this an intended change, and what is the correct/best way to disable such behavior?

I did "udisksctl dump" which shows "Removable:" and "MediaRemovable:" flags as true for all disks.


I was suggested to add udev rules like

DEVPATH=="/devices/<...>", ENV{UDISKS_SYSTEM_INTERNAL}="1"

to set them as "internal" so that they would not appear as removable. Is it the best way, and is there anything else to do?


edit:

In KDE System Settings -> Removable devices, "Enable automatic mounting of removable media" is disabled.

Last edited by ormu (2016-02-17 17:42:51)

Offline

#2 2016-02-06 08:04:17

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices

Same here, but i noticed no udisk package were upgraded; could this be related to kernel upgrade instead?

Last edited by kokoko3k (2016-02-06 08:04:38)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#3 2016-02-06 09:19:39

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices

udisks think my sata internal segate HD is removable, see:

Gozer ~ # udisksctl info -b /dev/sda
/org/freedesktop/UDisks2/block_devices/sda:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/sda
    DeviceNumber:               2048
    Drive:                      '/org/freedesktop/UDisks2/drives/ST500DM002_1BD142_Z3T1C8M1'
    HintAuto:                   true
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         
    IdLabel:                    
    IdType:                     
    IdUUID:                     
    IdUsage:                    
    IdVersion:                  
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sda
    ReadOnly:                   false
    Size:                       500107862016
    Symlinks:                   /dev/disk/by-id/ata-ST500DM002-1BD142_Z3T1C8M1
                                /dev/disk/by-id/wwn-0x5000c5004dccc623
                                /dev/disk/by-path/pci-0000:00:1f.2-ata-1
  org.freedesktop.UDisks2.PartitionTable:
    Type:               dos
Gozer ~ # udisksctl info -d ST500DM002_1BD142_Z3T1C8M1
/org/freedesktop/UDisks2/drives/ST500DM002_1BD142_Z3T1C8M1:
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                false
    Configuration:              {}
    ConnectionBus:              
    Ejectable:                  true
    Id:                         ST500DM002-1BD142-Z3T1C8M1
    Media:                      
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:         
    MediaRemovable:             true                       <----------- REMOVABLE !?
    Model:                      ST500DM002-1BD142
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  true
    Revision:                   KC45
    RotationRate:               7200
    Seat:                       seat0
    Serial:                     Z3T1C8M1
    SiblingId:                  
    Size:                       500107862016
    SortKey:                    00coldplug/12removable/sd____a
    TimeDetected:               1454660378972184
    TimeMediaDetected:          1454660378972184
    Vendor:                     
    WWN:                        0x5000c5004dccc623
  org.freedesktop.UDisks2.Drive.Ata:
    AamEnabled:                                 true
    AamSupported:                               true
    AamVendorRecommendedValue:                  208
    ApmEnabled:                                 false
    ApmSupported:                               false
    PmEnabled:                                  true
    PmSupported:                                true
    SecurityEnhancedEraseUnitMinutes:           78
    SecurityEraseUnitMinutes:                   78
    SecurityFrozen:                             true
    SmartEnabled:                               true
    SmartFailing:                               false
    SmartNumAttributesFailedInThePast:          0
    SmartNumAttributesFailing:                  0
    SmartNumBadSectors:                         0
    SmartPowerOnSeconds:                        96379200
    SmartSelftestPercentRemaining:              0
    SmartSelftestStatus:                        success
    SmartSupported:                             true
    SmartTemperature:                           307.15000000000003
    SmartUpdated:                               1454749829
    WriteCacheEnabled:                          true
    WriteCacheSupported:                        true

Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#4 2016-02-06 11:13:51

ormu
Member
Registered: 2013-05-14
Posts: 22

Re: [SOLVED] Hard disk partitions showing up as removable devices

Udisks were not upgraded in my case either, but kernel was.

I checked udisksctl on my laptop with Linux Mint, and it does not show the hard disk as removable (Removable, MediaRemovable and Ejectable flags are all false). Also, Wine doesn't set up any extra drives on that computer.

Last edited by ormu (2016-02-06 11:14:24)

Offline

#5 2016-02-06 12:28:35

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices

Same here on a non updated laptop.
this monday I will check if downgrading kernel will "fix" it on my office pc.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#6 2016-02-06 12:46:58

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#7 2016-02-06 17:21:47

ScratQ
Member
Registered: 2016-02-06
Posts: 1

Re: [SOLVED] Hard disk partitions showing up as removable devices

Same here; downgrading the kernel back to 4.3 "solved" it.

Offline

#8 2016-02-08 16:33:21

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices

It is definitely a kernel issue, see:

# for file in /sys/class/block/*/removable ; do echo $file :$(cat $file); done

/sys/class/block/sda/removable :1
/sys/class/block/sdb/removable :1
/sys/class/block/sdc/removable :1
/sys/class/block/sdd/removable :1
/sys/class/block/sde/removable :1
/sys/class/block/sdf/removable :1
/sys/class/block/sr0/removable :1

With the old kernel i get:

/sys/class/block/sda/removable :0
/sys/class/block/sdb/removable :0
/sys/class/block/sdc/removable :1
/sys/class/block/sdd/removable :1
/sys/class/block/sde/removable :1
/sys/class/block/sdf/removable :1
/sys/class/block/sr0/removable :1

Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#9 2016-02-12 13:54:00

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Hard disk partitions showing up as removable devices

$ uname -a
Linux obelix 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 GNU/Linux
$  for file in /sys/class/block/*/removable ; do echo $file :$(cat $file); done
/sys/class/block/dm-0/removable :0
/sys/class/block/sda/removable :0
/sys/class/block/sdb/removable :0
/sys/class/block/sdc/removable :0
/sys/class/block/sdd/removable :0
/sys/class/block/sr0/removable :1
/sys/class/block/sr1/removable :1
$ 

IF it is a kernel issue, it's specific to some systems.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2016-02-12 14:29:44

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#11 2016-02-12 14:39:57

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Hard disk partitions showing up as removable devices

Some chipsets have the ability to mark individual ports as "Hot plug" or such in the BIOS. In Windows, this causes the drive to be treated as removable. Maybe something similar could be at work here, and the kernel just began to support it?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#12 2016-02-15 07:44:17

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Hard disk partitions showing up as removable devices

alphaminer, you were absolutely right; disabling the hotplug functionality in the bios fixed the issue on the newer kernel.
Thanks!


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#13 2016-02-15 12:07:34

ormu
Member
Registered: 2013-05-14
Posts: 22

Re: [SOLVED] Hard disk partitions showing up as removable devices

kokoko3k wrote:

alphaminer, you were absolutely right; disabling the hotplug functionality in the bios fixed the issue on the newer kernel.
Thanks!

This solved the problem here as well. How about hotplugging the CD/DVD drive? I didn't disable it yet as it does not show up in the device notifier.

Offline

#14 2016-02-15 14:06:21

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Hard disk partitions showing up as removable devices

I don't know anything about device notifier. But as I understand it, hot plug is for removable devices (eg eSATA) rather than devices with removable media. So unless your disc drive is in an external enclosure I don't think hot plug should be enabled for it.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#15 2016-02-17 17:42:36

ormu
Member
Registered: 2013-05-14
Posts: 22

Re: [SOLVED] Hard disk partitions showing up as removable devices

Ok, I disabled hotplug for the CD/DVD drive too. Thanks to everyone for help. I mark this as solved.

Offline

#16 2016-02-22 08:13:08

DonJaime
Member
From: Berlin
Registered: 2013-01-16
Posts: 7

Re: [SOLVED] Hard disk partitions showing up as removable devices

If your BIOS won't let you change the hotplug flag, you can work around this with udev rules. For example:

#/etc/udev/rules.d/62-internal-disk.rules

# don't show any partition of disk sda or sdb on the desktop
KERNEL=="sd[a-b]*",ENV{UDISKS_IGNORE}="1"
# don't show any member of lvm volume group j on the desktop
ENV{DM_VG_NAME}=="j",ENV{UDISKS_IGNORE}="1"

This will also remove the devices from the 'Places' panel in Dolphin.

Offline

Board footer

Powered by FluxBB