avoid that permanently mounted sata disks be shown in device notifier

On my desktop pc running leap 42.3 how can I avoid that permanently mounted sata disks be shown in device notifier??
In >system settings>removable storage>removable devices the ones (cantina, capanno, garage, fienile) that are shown in device notifier have a different icon (the same as device notifier icon), the ones that are not shown in device notifier have an icon something like a screen.
I noted that in fstab the disks with one partition (not considering /, swap, /home, /suse3.1, that are partitions of the same disk) that are shown in device notifier are mounted by UUID, the other by label.
is this the why becouse they are shown in device notifier??
if this, how can I have disks mounted by UUID not shown in device notifier??
or it is a bug??

manythanks, ciao pier

this is my fs tab:
UUID=3d916134-d98d-42fa-bab1-8807f05f622b / ext4 acl,user_xattr 1 1
UUID=e2c58b5d-0ab7-48a0-80e3-66f24c55ec95 swap swap defaults 0 0
UUID=0ae4c677-ef30-48fd-85ee-ae08ea350fa2 /home ext4 defaults 1 2
UUID=38f5fec9-a6e3-41f3-9d77-a2bfab0912be /suse3.1 ext4 defaults 1 2
LABEL=abbaino /abbaino ext3 defaults 1 2
LABEL=attico1 /attico ext3 defaults 1 2
LABEL=casalmare2 /casalmare ext3 defaults 1 2
LABEL=mansarda /mansarda ext3 defaults 1 2
LABEL=piedaterre2 /piedaterre ext3 defaults 1 2
UUID=fb960121-6b29-4953-ae21-061a4cb55549 /cantina ext3 defaults 1 2
UUID=1e2e2cf0-fca6-476a-b22e-14c3662df099 /capanno ext3 defaults 1 2
UUID=668139e6-b331-4dd3-a61a-688b3eb08630 /garage ext3 defaults 1 2
UUID=1a5abd51-3c72-4214-a709-37327f8356dd /fienile ext3 defaults 1 2

Please, please post output between CODE tags.
AFAIK this is not a bug, but just a sign that these partitions are on external disks.

uh, sorry

manythanks :slight_smile: , but they are internal disks attached to a board ( Syba SATA III 4 Port PCI-e X1 Controller Card) attached to the motherboard.
And on which parameters the system identify these disks as external?? and how can I modify this wrong behaviour and have my disks identified as internal??

You can use ‘udevinfo’ to report the attributes for a given partition. For example

udevinfo info -b /dev/sda2

Attributes such as ‘HintAuto’, ‘HintSystem’, ‘MediaRemovable’ can define how udisks then treats the drives/partitions. I’ve read somewhere that it may be configurable in the UEFI BIOS to inhibit ‘Hot Plug’ (or similar) behaviour for given devices if necessary, so you might want to see if this is a possibility with your system.

The other option is to create a custom udev rule eg /etc/udev/rules.d/60-system-disk.rules

# don't notify partitions of disk sda or sdb
KERNEL=="sd[a-b]*",ENV{UDISKS_IGNORE}="1" 

^ Adjust the rule as necessary to suit your system.

Hope this helps.

Manythanks deano, I tried udevinfo but it didn’t worked, googling it seems to be obsolete, now udevadm seems to be in use :slight_smile:

server3TW:/home/procuste # udevadm info  /dev/sdg  
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7/host6/target6:0:0/6:0:0:0/block/sdg
N: sdg
S: disk/by-id/ata-WDC_WD20EARX-00AZ6B0_WD-WCC070219152
S: disk/by-id/scsi-0ATA_WDC_WD20EARX-00A_WD-WCC070219152
S: disk/by-id/scsi-1ATA_WDC_WD20EARX-00AZ6B0_WD-WCC070219152
S: disk/by-id/scsi-350014ee207a3e757
S: disk/by-id/scsi-SATA_WDC_WD20EARX-00A_WD-WCC070219152
S: disk/by-id/scsi-SATA_WDC_WD20EARX-00_WD-WCC070219152
S: disk/by-id/wwn-0x50014ee207a3e757
S: disk/by-path/pci-0000:01:00.0-ata-1
S: disk/by-path/pci-0000:01:00.0-scsi-6:0:0:0
E: COMPAT_SYMLINK_GENERATION=1
E: DEVLINKS=/dev/disk/by-id/scsi-350014ee207a3e757 /dev/disk/by-path/pci-0000:01:00.0-scsi-6:0:0:0 /dev/disk/by-id/wwn-0x50014ee207a3e757 /dev/disk/by-id/ata-WDC_WD20EARX-00AZ6B0_WD-WCC070219152 /dev/disk/by-path/pci-0000:01:00.0-ata-1 /dev/disk/by-id/scsi-0ATA_WDC_WD20EARX-00A_WD-WCC070219152 /dev/disk/by-id/scsi-SATA_WDC_WD20EARX-00_WD-WCC070219152 /dev/disk/by-id/scsi-1ATA_WDC_WD20EARX-00AZ6B0_WD-WCC070219152 /dev/disk/by-id/scsi-SATA_WDC_WD20EARX-00A_WD-WCC070219152
E: DEVNAME=/dev/sdg
E: DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7/host6/target6:0:0/6:0:0:0/block/sdg
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_BUS=ata
E: ID_MODEL=WDC_WD20EARX-00A
E: ID_MODEL_ENC=WDC\x20WD20EARX-00A
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=000d0434
E: ID_PATH=pci-0000:01:00.0-ata-1
E: ID_PATH_COMPAT1=pci-0000:01:00.0-scsi-6:0:0:0
E: ID_PATH_COMPAT2=pci-0000:01:00.0-scsi-6:0:0:0
E: ID_PATH_TAG=pci-0000_01_00_0-ata-1
E: ID_REVISION=0A80
E: ID_SCSI=1
E: ID_SCSI_COMPAT=SATA_WDC_WD20EARX-00A_WD-WCC070219152
E: ID_SCSI_COMPAT_TRUNCATED=SATA_WDC_WD20EARX-00_WD-WCC070219152
E: ID_SCSI_INQUIRY=1
E: ID_SERIAL=WDC_WD20EARX-00AZ6B0_WD-WCC070219152
E: ID_SERIAL_SHORT=WD-WCC070219152
E: ID_TYPE=disk
E: ID_VENDOR=ATA
E: ID_VENDOR_ENC=ATA\x20\x20\x20\x20\x20
E: ID_WWN=0x50014ee207a3e757
E: ID_WWN_WITH_EXTENSION=0x50014ee207a3e757
E: MAJOR=8
E: MINOR=96
E: SCSI_IDENT_LUN_ATA=WDC_WD20EARX-00AZ6B0_WD-WCC070219152
E: SCSI_IDENT_LUN_NAA_REG=50014ee207a3e757
E: SCSI_IDENT_LUN_T10=ATA_WDC_WD20EARX-00AZ6B0_WD-WCC070219152
E: SCSI_IDENT_LUN_VENDOR=WD-WCC070219152
E: SCSI_IDENT_SERIAL=WD-WCC070219152
E: SCSI_MODEL=WDC_WD20EARX-00A
E: SCSI_MODEL_ENC=WDC\x20WD20EARX-00A
E: SCSI_REVISION=0A80
E: SCSI_TPGS=0
E: SCSI_TYPE=disk
E: SCSI_VENDOR=ATA
E: SCSI_VENDOR_ENC=ATA\x20\x20\x20\x20\x20
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=4724014

server3TW:/home/procuste # 


and seems that the equivalent of udevinfo be udevadm info --attribute-walk

server3TW:/home/procuste # udevadm info --attribute-walk  /dev/sdg

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7/host6/target6:0:0/6:0:0:0/block/sdg':
    KERNEL=="sdg"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{alignment_offset}=="0"
    ATTR{badblocks}==""
    ATTR{capability}=="51"
    ATTR{discard_alignment}=="0"
    ATTR{events}=="media_change"
    ATTR{events_async}==""
    ATTR{events_poll_msecs}=="-1"
    ATTR{ext_range}=="256"
    ATTR{inflight}=="       0        0"
    ATTR{make-it-fail}=="0"
    ATTR{range}=="16"
    ATTR{removable}=="1"
    ATTR{ro}=="0"
    ATTR{size}=="3907029168"
    ATTR{stat}=="     821        0    34826    44428       42      123     1248     1252        0     4612    45680"

  looking at parent device '/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7/host6/target6:0:0/6:0:0:0':
    KERNELS=="6:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sd"
    ATTRS{device_blocked}=="0"
    ATTRS{device_busy}=="0"
    ATTRS{dh_state}=="detached"
    ATTRS{eh_timeout}=="10"
    ATTRS{evt_capacity_change_reported}=="0"
    ATTRS{evt_inquiry_change_reported}=="0"
    ATTRS{evt_lun_change_reported}=="0"
    ATTRS{evt_media_change}=="0"
    ATTRS{evt_mode_parameter_change_reported}=="0"
    ATTRS{evt_soft_threshold_reached}=="0"
    ATTRS{inquiry}==""
    ATTRS{iocounterbits}=="32"
    ATTRS{iodone_cnt}=="0x8050b"
    ATTRS{ioerr_cnt}=="0x241a"
    ATTRS{iorequest_cnt}=="0x8050c"
    ATTRS{model}=="WDC WD20EARX-00A"
    ATTRS{ncq_prio_enable}=="0"
    ATTRS{queue_depth}=="31"
    ATTRS{queue_ramp_up_period}=="120000"
    ATTRS{queue_type}=="simple"
    ATTRS{rev}=="0A80"
    ATTRS{scsi_level}=="6"
    ATTRS{state}=="running"
    ATTRS{timeout}=="30"
    ATTRS{type}=="0"
    ATTRS{vendor}=="ATA     "
    ATTRS{vpd_pg80}==""
    ATTRS{vpd_pg83}==""
    ATTRS{wwid}=="t10.ATA     WDC WD20EARX-00AZ6B0                         WD-WCC070219152"

  looking at parent device '/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7/host6/target6:0:0':
    KERNELS=="target6:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7/host6':
    KERNELS=="host6"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ata7':
    KERNELS=="ata7"
    SUBSYSTEMS==""
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1c.0/0000:01:00.0':
    KERNELS=="0000:01:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="ahci"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x010601"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{device}=="0x9215"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="123"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{msi_bus}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{resource1}==""
    ATTRS{resource3}==""
    ATTRS{subsystem_device}=="0x9215"
    ATTRS{subsystem_vendor}=="0x1b4b"
    ATTRS{vendor}=="0x1b4b"

  looking at parent device '/devices/pci0000:00/0000:00:1c.0':
    KERNELS=="0000:00:1c.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="pcieport"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x060400"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{d3cold_allowed}=="0"
    ATTRS{device}=="0xa295"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="17"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{msi_bus}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{subsystem_device}=="0x7a70"
    ATTRS{subsystem_vendor}=="0x1462"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

server3TW:/home/procuste # 

and I found what could be what you intend,

ATTR{removable}=="1"

I did not investigate about bios, so I propended for custom udev rule

my disks are /dev/sdg, sdh, sdi, sdj.
so I create a text file called /etc/udev/rules.d/60-system-disk.rules and in it I inserted:

KERNEL=="sd[g-j]*",ENV{UDISKS_IGNORE}="1"

and it worked, now the disks are non more visible in device notifier, but are always shown with device notifier icon in >system settings>removable storage>removable devices, I can live with this :-).
I don’t know how to write udev rules but I wander if it is possible to use the

ATTR{removable}=="1"

in an udev rule to have also the icon in >system settings>removable storage>removable devices coherent wit the other non removable disks…
manythanks again, ciao, pier

Yes, that was a typo on my part - ‘udevadm info…’

my disks are /dev/sdg, sdh, sdi, sdj.
so I create a text file called /etc/udev/rules.d/60-system-disk.rules and in it I inserted:

KERNEL=="sd[g-j]*",ENV{UDISKS_IGNORE}="1"

and it worked, now the disks are non more visible in device notifier, but are always shown with device notifier icon in >system settings>removable storage>removable devices, I can live with this :-).
I don’t know how to write udev rules but I wander if it is possible to use the

ATTR{removable}=="1"

in an udev rule to have also the icon in >system settings>removable storage>removable devices coherent wit the other non removable disks…
manythanks again, ciao, pier

Writing udev rules isn’t generally too hard given the appropriate attributes for matching, but I don’t understand what you’re trying to achieve beyond what you’ve already done already done.

Some good references:
http://www.reactivated.net/writing_udev_rules.html
https://wiki.archlinux.org/index.php/udev#Writing_udev_rules