Bug 453799

Summary: Unable to toggle the 'swap' flag
Product: Red Hat Enterprise Linux 5 Reporter: David Kovalsky <dkovalsk>
Component: partedAssignee: Hans de Goede <hdegoede>
Status: CLOSED WONTFIX QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: benl
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-07 07:20:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Kovalsky 2008-07-02 15:24:26 UTC
I'm tryinto to toggle the 'swap' flag, but parted refuses to accept it. See
reproducer below.

(parted) p

Model: DELL PERC 6/i (scsi)
Disk /dev/sda: 4998GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  107MB   107MB   primary  ext2         boot
 2      107MB   21.1GB  21.0GB  primary  ext3
 3      21.1GB  37.7GB  16.6GB  primary  ext3

(parted) help toggle
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition
NUMBER

        NUMBER is the partition number used by Linux.  On MS-DOS disk labels,
the primary partitions number from 1 to 4, logical partitions from 5 onwards.
        FLAG is one of: boot, root, swap, hidden, raid, lvm, lba, hp-service,
palo, prep, msftres
(parted) toggle 3 swap
Flag to Invert?  boot/hidden/raid/lvm/lba/palo/prep? swap
Flag to Invert?  boot/hidden/raid/lvm/lba/palo/prep?



[root@bordell ~]# uname -a
Linux bordell.englab.brq.redhat.com 2.6.18-92.1.6.el5xen #1 SMP Fri Jun 20
02:51:52 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
[root@bordell ~]# rpm -q parted
parted-1.8.1-17.el5
parted-1.8.1-17.el5

Comment 1 Joel Andres Granados 2008-11-05 17:46:46 UTC
In the code it does not appear swap as a valid dos flag to set on msdos labels(parition tables).  It appears as valid for dvh and mac.
This is stated in the code but does not appear to be in the man pages or in the help command.  It be good to place a comment there.

It be also good to write the info node for toggle command.
thx for the report

Comment 2 Hans de Goede 2009-10-07 07:20:45 UTC
This was just (as in yesterday) fixed in Fedora, so it will be fixed in RHEL-6. Given that the changes required are non trivial (not really hard either), and that we are limited on manpower, and that this bug has existed for over a year without any interest from other reporters / users, I'm going to close this as wontfix.