IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Using virtio-blk serial attributes add rules to extract drive serial numbers and
generate by-id links for the block device and partitions.
With these rules added, we now see the following symlinks in disk/by-id
% ls -al /dev/disk/by-id | grep vdb
lrwxrwxrwx. 1 root root 9 Jun 1 22:09 virtio-QM00001 -> ../../vda
lrwxrwxrwx. 1 root root 10 Jun 1 22:09 virtio-QM00001-part1 -> ../../vda1
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Some SCSI devices use the same WWN and have a WWN extension that we
need to take into account when creating the /dev/disk/by-id/wwn
symlinks. Thus, introduce ID_WWN_WITH_EXTENSION. This property will
contain either the WWN (if no extension is present) or the WWN with
the vendor extension appended.
Example:
# /lib/udev/ata_id/ata_id --export /dev/sda |grep WWN
ID_WWN=0x5001517387d61905
ID_WWN_WITH_EXTENSION=0x5001517387d61905
# /lib/udev/scsi_id --whitelisted --export -d /dev/sdb |grep WWN
ID_WWN=0x600508b400105df7
ID_WWN_VENDOR_EXTENSION=0x0000e00000d80000
ID_WWN_WITH_EXTENSION=0x600508b400105df70000e00000d80000
# /lib/udev/scsi_id --whitelisted --export -d /dev/sdc |grep WWN
ID_WWN=0x600508b400105df7
ID_WWN_VENDOR_EXTENSION=0x0000e00000db0000
ID_WWN_WITH_EXTENSION=0x600508b400105df70000e00000db0000
Signed-off-by: David Zeuthen <davidz@redhat.com>
Now that both ata_id and scsi_id exports the World Wide Name in the
ID_WWN property, use this to create persistent symlinks. Example
/dev/disk/by-id/wwn-0x500000e01b83f360 -> ../../sdn
/dev/disk/by-id/wwn-0x500000e01b83f440 -> ../../sdm
Signed-off-by: David Zeuthen <davidz@redhat.com>
The kernel IDE drivers get deprecated now:
http://article.gmane.org/gmane.linux.ide/43151
Almost everybody has switched over to libata devices long ago.
Recent services do not work with the now deprecated IDE drivers
at all and require libata drivers and SCSI infrastructure.
Systems who care about the old stuff need to add the rules to the
compat rules.
ID_CDROM_MEDIA_SESSION_LAST_OFFSET is not set for CDs with only a single
session (i. e. for the vast majority of CDs out there). The previous rules ran
blkid with invalid arguments for these, causing CD detection to fail in
DK-disks and gvfs.
Now check whether we actually have ID_CDROM_MEDIA_SESSION_LAST_OFFSET, and if
not, call blkid without -O for specifying the offset.
Many thanks to Maxim Levitsky for tracking this down!
https://launchpad.net/bugs/431055
We need to call ata_id as the default for libata sd* devices. We
want ID_BUS=ata, and the ATA device proeprties, and be independent
of the SCSI emulation with the truncated values. The links
in /dev/disk/by-id/{ata-*,scsi-*} are still the same.
Opening an optical drive device node without O_NONBLOCK autocloses the
tray, we run vol_id on every media change by kernel emitted "change"
events, which can make it hard to change the media when the tray closes
immediatey again.:) We check for cdrom_id to indicate an existing track,
if no media is found, we will not open the device with vol_id.
Thanks to Christian Krause and DavidZ for debugging and testing.
None of these rules is supposed to be changed by users, so move
them out of /etc. Custom rules, and automatically generated rules
stay in /etc. All rules are still processed in lexical order,
regardless which directory they live in.