Bug 460608 - Swap partition is not restored by hts after running hts storage test in RHEL4.x.
Summary: Swap partition is not restored by hts after running hts storage test in RHEL4.x.
Keywords:
Status: CLOSED DUPLICATE of bug 467679
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Test Suite (tests)
Version: 5.2
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: YangKun
QA Contact: Lawrence Lim
URL:
Whiteboard:
Depends On: 467679
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-29 00:36 UTC by NIWA Hideyuki
Modified: 2014-03-26 00:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-07 02:51:19 UTC
Embargoed:


Attachments (Terms of Use)
results.xml (185.98 KB, application/x-gzip)
2008-09-05 01:23 UTC, NIWA Hideyuki
no flags Details
/etc/fstab (603 bytes, application/octet-stream)
2008-10-17 10:23 UTC, NIWA Hideyuki
no flags Details

Description NIWA Hideyuki 2008-08-29 00:36:44 UTC
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.

Comment 1 YangKun 2008-08-29 03:01:52 UTC
could you please provide the file "/var/hts/results.xml" ?

Thanks
-YK

Comment 2 NIWA Hideyuki 2008-09-05 01:23:02 UTC
Created attachment 315824 [details]
results.xml

Hello,

I updated results.xml. Please check it.

Regards.

Comment 3 YangKun 2008-09-08 08:02:39 UTC
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

Comment 6 YangKun 2008-09-09 10:01:43 UTC
(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.

Comment 7 YangKun 2008-09-09 10:08:51 UTC
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

Comment 8 NIWA Hideyuki 2008-09-11 09:26:56 UTC
Hello,

The problem caused to /dev/sda3.

The other swaps don't set label, so they are all restored succesfully.

Regards.

Comment 9 YangKun 2008-09-17 08:01:46 UTC
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

Comment 10 NIWA Hideyuki 2008-10-03 09:57:13 UTC
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.

Comment 11 YangKun 2008-10-06 03:56:25 UTC
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

Comment 12 NIWA Hideyuki 2008-10-17 10:23:35 UTC
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.

Comment 13 YangKun 2008-10-20 07:53:35 UTC
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

Comment 14 YangKun 2008-11-07 02:51:19 UTC
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 ***


Note You need to log in before you can comment on or make changes to this bug.