https://access.redhat.com/solutions/173583
SOLUTION 已验证 - 已更新 2014年一月3日01:41 -
环境
- RHEL 5.3, upgrading to RHEL 6
问题
-
Before upgrade:
-
Entry in /etc/fstab file:
/dev/sda2: LABEL="/partB" UUID="a69619e1-649a-43e6-85bf-c072f8c39e14" SEC_TYPE="ext2" TYPE="ext3”
- Output of sudo blkid command:
/dev/sda2: LABEL="/partB" UUID="a69619e1-649a-43e6-85bf-c072f8c39e14" SEC_TYPE="ext2" TYPE="ext3”
-
During upgrade:
-
Entry in /etc/fstab file:
/dev/sda2: LABEL="/partB" UUID="a69619e1-649a-43e6-85bf-c072f8c39e14" SEC_TYPE="ext2" TYPE="ext3”
- Output of
sudo blkid
command:
/dev/sda2: LABEL="/partB" UUID="1c9eb856-2976-4f4d-a500-b6f3e1accdc8" SEC_TYPE="ext2" TYPE="ext3"
决议
- In order to resolve this issue changes for partition /dev/sda2 in /etc/fstab file. Instead of reffering it from UUID we are now referring it by using LABEL(as in RHEL5):
LABEL=/partB /partB ext4 defaults 1 0
-
After this change upgrade proceeds further.
-
Or
-
To preserve UUID, try using a kickstart %pre script to save the current UUID (using blkid) and then restore it in the kickstart %post script (using tune2fs).
%pre
blkid -o export /dev/sda2 | grep UUID | sed 's/^UUID=//' > /tmp/sda2-uuid
%end
%post --nochroot
tune2fs -U $(cat /tmp/sda2-uuid) /dev/sda2
%end
根源
- It was learned that the customer's upgrade process actually does a mkfs which is expected to change the UUID. This is not an Issue but an expected behavior.
诊断步骤
- Before upgrade:
# BLKID_DEBUG=0xffff blkid /dev/sda2
- During upgrade:
# BLKID_DEBUG=0xffff blkid /dev/sda2
- It was also understood that during upgrade, mkfs was being run on the partition which
is expected to generate a new UUID.