Bug 453799 - Unable to toggle the 'swap' flag
Unable to toggle the 'swap' flag
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: parted (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Hans de Goede
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-02 11:24 EDT by David Kovalsky
Modified: 2014-03-31 19:44 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-07 03:20:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Kovalsky 2008-07-02 11:24:26 EDT
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 12:46:46 EST
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 03:20:45 EDT
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.

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