Description of problem: Swap partition is not restored by hts after running hts storage test in RHEL4.x. This bug is fixed in RHEL5.x (BZ#437227), but the same bug is reproduced in RHEL4.x. hts seems to use blkid command to get the label name of swap, but blkid does not display the label name in RHEL4.x. So hts fails to get the label name of swap, then hts fails to restore swap partition. RHEL5: # blkid /dev/sda3: TYPE="swap" LABEL="SWAP-sda3" RHEL4: # blkid /dev/sda3: TYPE="swap" hts version is as follows. # rpm -q hts hts-5.2-16.el4 How reproducible: Always Steps to Reproduce: * In this case, swap partition is /dev/sda3 and label name is "SWAP-sda3" 1) Run the storage test. # hts certify --test storage 2) Confirm the swap is enabled. # swapon -s Filename Type Size Used Priority /dev/sda3 partition 10241428 0 -2 3) Disable swap. # swapoff -a 4) Confirm the swap is disabled. # swapon -s # 5) Enable swap. # swapon -a swapon: cannot find the device for LABEL=SWAP-sda3 6) Confirm the swap is not enabled. # swapon -s # 7) Set label name to the swap partition. # cat /etc/fstab |grep swap LABEL=SWAP-sda3 swap swap defaults 0 0 # mkswap -L SWAP-sda3 /dev/sda3 Setting up swapspace version 1, size = 10487226 kB 8) Enable swap again. # swapon -a 9) Confirm the swap is enabled. # swapon -s Filename Type Size Used Priority /dev/sda3 partition 10241428 0 -3 Actual results: After the storage test, the label name of swap partition is broken. Expected results: After the storage test, the label name of swap partition is restored. Additional info: This error caused in RHEL4.x only.
could you please provide the file "/var/hts/results.xml" ? Thanks -YK
Created attachment 315824 [details] results.xml Hello, I updated results.xml. Please check it. Regards.
Hi, The file you uploaded seems to be "results.xml.gz". I tried to gunzip it, but I can not open/read it after the gunzip. could you please upload it again without the compression ? Thanks very much. -YK
(In reply to comment #3) > Hi, > > The file you uploaded seems to be "results.xml.gz". I tried to gunzip it, but I > can not open/read it after the gunzip. > > could you please upload it again without the compression ? > > Thanks very much. > -YK the uploaded file was compressed twice, I gunzipped it twice and then can read it.
Hi, In the uploaded results.xml file. I saw 18 swap partitions in total, and they were all restored correctly after the testing. Could you please point out where the error is ? Did I miss anything ? Thanks -YK
Hello, The problem caused to /dev/sda3. The other swaps don't set label, so they are all restored succesfully. Regards.
Hi, I checked the uploaded results.xml file again, turns out the "/dev/sda3" was also restored succesfully: ===================================================================== 3182 *** Raw I/O testing passed. 3183 3184 swap device has no label. 3185 restoring swap device /dev/sda3 ... 3186 done. 3187 restored the swap device. 3188 3189 Storage test on device sda passed 3190 ...finished running ./storage.py, exit code=0 3191 3192 </output> 3193 </run> 3194 </test> 3195 <test name='storage' label='' logical-device='sdb' device-class='STORAGE' device-bus='SCSI' udi='' interactive='no'> 3196 <run end-time='2008-08-05 08:57:22' run-time='2008-08-05 08:20:37' mode='normal' return-value='0' number='1'> 3197 <kudzu>generic sg1 3198 bus SCSI 3199 driver ignore ....... 3267 +---------- /proc/swaps ----------+ 3268 Filename Type Size Used Priority 3269 /dev/sdc1 partition 10239936 0 -1 3270 /dev/sdd1 partition 10239936 0 -2 3271 /dev/sde1 partition 10239936 0 -3 3272 /dev/sdf1 partition 10239936 0 -4 3273 /dev/sdg1 partition 10239936 0 -5 3274 /dev/sdh1 partition 10239936 0 -6 3275 /dev/sdi1 partition 10239936 0 -7 3276 /dev/sdj1 partition 10239936 0 -8 3277 /dev/sdk1 partition 10239936 0 -9 3278 /dev/sdl1 partition 10239936 0 -10 3279 /dev/sdm1 partition 10239936 0 -11 3280 /dev/sdn1 partition 10239936 0 -12 3281 /dev/sdo1 partition 10239936 0 -13 3282 /dev/sdp1 partition 10239936 0 -14 3283 /dev/sdq1 partition 10239936 0 -15 3284 /dev/sdr1 partition 10239936 0 -16 3285 /dev/sda3 partition 10239968 0 -19 3286 /dev/sdb1 partition 10239936 0 -18 3287 +---------- /proc/diskstats ----------+ ...... ===================================================================== Please notice that after testing on sda, the test continued to run on sdb and other HDDs, and I did see "/dev/sda3" showed up in "/proc/swaps" while testing on other HDDs. If sda3 was not restored successfully, it will not be in "/proc/swaps". Or did I miss anything ? -YK
Hello, After the storage test, swap partition is still enabled. But when I restart the system, swap partition is not mounted because of the label name is not restored. 1. Before the test, swap partition is enabled. # cat /proc/swaps Filename Type Size Used Priority /dev/sdc1 partition 10239936 0 -1 2. Test storage # hts certify --test storage 3. After the test, swap partition is restored # cat /proc/swaps Filename Type Size Used Priority /dev/sdc1 partition 10239936 0 -1 4. Restart the system # shutdown -r now 5. After the system restart, swap partition is NOT mounted # cat /proc/swaps 6. Mount swap partition manually, but mount failed # swapon -a swapon: cannot find the device for LABEL=SWAP-sda3 Regards.
Hi, Please see my inline comments below. > > After the storage test, swap partition is still enabled. But when I restart the > system, swap partition is not mounted because of the label name is not > restored. > > 1. Before the test, swap partition is enabled. > # cat /proc/swaps > Filename Type Size Used Priority > /dev/sdc1 partition 10239936 0 > -1 I'm confused, I think you've mentioned "The problem caused to /dev/sda3." in comment#8 . why sdc now ? > > 2. Test storage > # hts certify --test storage > > 3. After the test, swap partition is restored > # cat /proc/swaps > Filename Type Size Used Priority > /dev/sdc1 partition 10239936 0 > -1 > > 4. Restart the system > # shutdown -r now > > 5. After the system restart, swap partition is NOT mounted > # cat /proc/swaps > > 6. Mount swap partition manually, but mount failed > # swapon -a > swapon: cannot find the device for LABEL=SWAP-sda3 > > Regards. could you please attach the /etc/fstab file here ? Thanks -YK
Created attachment 320651 [details] /etc/fstab Hello, > I'm confused, I think you've mentioned "The problem caused to /dev/sda3." in > comment#8 . why sdc now ? I'm sorry. comment#10 is wrong. The correct /proc/swaps is follows: Filename Type Size Used Priority /dev/sda3 partition 10241428 0 -2 > could you please attach the /etc/fstab file here ? OK. I attached fstab. Regards.
Hi, Thanks for your information. I re-produced this error on my testing machine. This should be a "blkid" command's problem, I've escalated this issue, please check the details in https://bugzilla.redhat.com/show_bug.cgi?id=467679 Thanks -YK
closing this bug as duplicate of bug#467679 now. Please track this issue in that bug. *** This bug has been marked as a duplicate of bug 467679 ***