On 4/25/2011 8:47 AM, Anton Aylward wrote:
There are all manner of saying about the horrible consequences when you get what you ask for. The thread that unravels .. a little knowledge. So now he's got rid of the Windows partitions he's asking for more.
The man page on fdisk warns
fdisk doesn't understand GUID Partition Table (GPT) and it is not designed for large partitions. In particular case use more advanced GNU parted(8).
So he did. OUCH!
It also says
fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can.
Well it seems the current state of the partition table arose from the initial use of fdisk.
Parted gives off results. In places it seems to want to work in megabytes and not sector or cylinders, but it can report great detail. This is what it gives in text-mode
(parted) print free Model: ATA IC25N080ATMR04-0 (scsi) Disk /dev/sda: 80.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 32.3kB 1049kB 1016kB Free Space 1 1049kB 213MB 212MB primary ext3 boot, type=83 213MB 214MB 996kB Free Space 2 214MB 1283MB 1069MB primary linux-swap(v1) type=82 3 1283MB 2361MB 1078MB primary ext3 type=83 2361MB 21.0GB 18.6GB Free Space 4 21.0GB 80.0GB 59.0GB extended lba, type=0f 21.0GB 23.4GB 2426MB Free Space 5 23.4GB 80.0GB 56.6GB logical lvm, type=8e 80.0GB 80.0GB 2613kB Free Space
As in "Oh Look At All That Free Space Wasted" and "Can't I move 1, 2 and 3 along?" and "Parted says I can"
Which gets back to parted and its funny ideas
It says move partition start end Move partition so that it begins at start and ends at end. Note: move never changes the minor number
and
unit unit Set unit as the unit to use when displaying locations and sizes, and for interpreting those given by the user when not suffixed with an explicit unit. unit can be one of "s" (sectors), "B" (bytes), "kB", "MB", "GB", "TB", "%" (percentage of device size), "cyl" (cylinders), "chs" (cylinders, heads, sectors), or "compact" (megabytes for input, and a human-friendly form for output).
Which eventually gives
(parted) print free Model: ATA IC25N080ATMR04-0 (scsi) Disk /dev/sda: 156301488s Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 63s 2047s 1985s Free Space 1 2048s 415743s 413696s primary ext3 boot, type=83 415744s 417689s 1946s Free Space 2 417690s 2506139s 2088450s primary linux-swap(v1) type=82 3 2506140s 4610654s 2104515s primary ext3 type=83 4610655s 40965749s 36355095s Free Space 4 40965750s 156296384s 115330635s extended lba, type=0f 40965813s 45704924s 4739112s Free Space 5 45704988s 156296384s 110591397s logical lvm, type=8e 156296385s 156301487s 5103s Free Space
(sorry about the wrap)
While all this makes sense I'm reluctant to try parted's "move" on a production system without some reassurance. Are there margins I need to allow for?
Can I really do a unit s move 1 63 39384
? Perhaps I need to convert the ext3 to ext2 first ???
I found this http://www.hermann-uwe.de/blog/resizing-ext3-partitions-with-parted
Any comments or advice?
"What happened when you tried it?" Hint, a free ramdisk (file-backed loop device), and a few minutes and you can answer that and many other questions that the manual leaves too ambiguous, and you won't have to rely on anyone elses word or understanding or even the correctness or completeness of the manual. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org