linux-base: Don't identify LVM2 PVs by UUID (Closes: #585852)
svn path=/dists/sid/linux-2.6/; revision=15873
This commit is contained in:
parent
9f92eae041
commit
451c8336ee
|
@ -24,6 +24,7 @@ linux-2.6 (2.6.32-16) UNRELEASED; urgency=low
|
|||
- Enable BLK_DEV_SD as built-in on all platforms
|
||||
* Revert "vlan/macvlan: propagate transmission state to upper layers"
|
||||
(Closes: #585770)
|
||||
* linux-base: Don't identify LVM2 PVs by UUID (Closes: #585852)
|
||||
|
||||
[ Aurelien Jarno ]
|
||||
* [sh4] fix sh_tmu clocksource following recent nohz changes.
|
||||
|
|
|
@ -1267,7 +1267,7 @@ sub scan_devices {
|
|||
if (-x '/sbin/vol_id') {
|
||||
$id_command = '/sbin/vol_id';
|
||||
} else {
|
||||
$id_command = 'blkid -o udev -s LABEL -s UUID';
|
||||
$id_command = 'blkid -o udev -s LABEL -s UUID -s TYPE';
|
||||
}
|
||||
for (`blkid -o device`) {
|
||||
chomp;
|
||||
|
@ -1275,10 +1275,14 @@ sub scan_devices {
|
|||
for (`$id_command '$bdev'`) {
|
||||
if (/^ID_FS_(LABEL|UUID)_ENC=(.+)\n$/) {
|
||||
add_tag($bdev, $1, $2);
|
||||
} elsif (/^ID_FS_TYPE=(.+)\n$/ && exists($bdev_map{$bdev})) {
|
||||
$bdev_map{$bdev}->{type} //= $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Discard UUIDs for LVM2 PVs, as we assume there are symlinks for all
|
||||
# UUIDs under /dev/disk/by-uuid and this is not true for PVs.
|
||||
# Discard all labels and UUIDs(!) that are ambiguous.
|
||||
# Discard all labels with 'unsafe' characters (escaped by blkid using
|
||||
# backslashes) as they will not be usable in all configuration files.
|
||||
|
@ -1286,10 +1290,14 @@ sub scan_devices {
|
|||
# Sort each device's IDs in reverse lexical order so that UUIDs are
|
||||
# preferred.
|
||||
for my $bdev (keys(%bdev_map)) {
|
||||
@{$bdev_map{$bdev}->{ids}} =
|
||||
sort({$b cmp $a}
|
||||
grep({ @{$id_map{$_}} == 1 && $_ !~ /[\\#]/ }
|
||||
@{$bdev_map{$bdev}->{ids}}));
|
||||
if ($bdev_map{$bdev}->{type} eq 'LVM2_member') {
|
||||
@{$bdev_map{$bdev}->{ids}} = ();
|
||||
} else {
|
||||
@{$bdev_map{$bdev}->{ids}} =
|
||||
sort({$b cmp $a}
|
||||
grep({ @{$id_map{$_}} == 1 && $_ !~ /[\\#]/ }
|
||||
@{$bdev_map{$bdev}->{ids}}));
|
||||
}
|
||||
}
|
||||
|
||||
# Add persistent aliases for CD/DVD/BD drives
|
||||
|
|
Loading…
Reference in New Issue