Mailinglist Archive: opensuse (963 mails)

< Previous Next >
Re: [opensuse] How to re-shuffle disk partitions - Part Three
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.

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

(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"
"Can't I move 1, 2 and 3 along?"
"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


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)
3 2506140s 4610654s 2104515s primary ext3
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

Any comments or advice?

The fact is that my native land is a prey to barbarism, that in it men's
only God is their belly, that they live only for the present, and that
the richer a man is the holier he is held to be.
-- Saint Jerome, Letter
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups