Red Hat Bugzilla – Bug 453799
Unable to toggle the 'swap' flag
Last modified: 2014-03-31 19:44:40 EDT
I'm tryinto to toggle the 'swap' flag, but parted refuses to accept it. See
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 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
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
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.