[arch-dev-public] [RFC] the storage group

Tom Gundersen teg at jklm.no
Fri Aug 26 18:07:11 EDT 2011

Hi guys,

I'm refactoring our support for the "storage" group, due to a recent
bug report about it being incomplete:
<https://bugs.archlinux.org/task/22337>. I thought I'd ask for some

A few words about the usage of the storage group:

For most people the storage group is not needed any more, if all you
want is to mount your device and access the files on it. However, if
you want to use fdisk or any tools accessing the device node directly
you need to have the correct permissions. The main use is therefore to
allow people to use fdisk and dd with their usb sticks.

Our current rules are quite low-level, and hence it's a bit difficult
to tell if they are correct and complete [1]. I suggest that we adopt
the following informal policy:
"All block devices that are removable, or belong to the usb, firewire,
mmc or pcmcia subsystem, and that do not belong to any other group,
are assigned to the storage group."

My suggestion is based on the Debian rules that were pointed out to me by Seblu:

SUBSYSTEM=="block", ATTRS{removable}=="1", GROUP="storage"
SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="storage"

The only difference between my proposal and Debian's rules is that I
want to put these with a very low priority (20) instead of a very high
(91), the reason is that other rules should be able to override them
(e.g. a cdrom should end up in the "optical" group). [they also have
support for cbm devices, but unless someone tells me they are relevant
I'll skip them.]

Any comments highly appreciated.



[1]  current rules:

# permissions for removable devices like cardreaders or sticks
KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="0", GROUP="storage"

# permissions for firewire external drives
KERNEL=="sd*", ATTRS{scsi_level}=="5", GROUP="storage"

# permissions for usb to scsi external adapters
KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="7", GROUP="storage"

# permissions for ide storage like pcmcia card readers
ACTION!="add", GOTO="pcmcia_end"
SUBSYSTEM!="block", GOTO="pcmcia_end"
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*", IMPORT{parent}=="ID_*"
KERNEL=="hd*", ENV{ID_TYPE}=="generic", GROUP="storage"

More information about the arch-dev-public mailing list