0

And will it lose my data?

I reduced the size of my filesystem. Now reducing the size of the partition in fdisk, I notice that fdisk wants to create the resized partition at a different sector.

Here's the partitions as they stood before I attempted to resize:

                start   end         sectors    size id type
/dev/sda1  *      2048    1499135    1497088   731M 83 Linux
/dev/sda2       1501182 976771071    975269890 465G  5 Extended
/dev/sda5       1501184 976771071    975269888 465G 83 Linux

I deleted partition 5, and went to create a new one in the same place at the reduced size.

But fdisk says:

Adding logical partition 5
First sector (1503230-976771071, default 1503232)

It wants to start the new partition in a different sector. Why would it want to do this and will it lose my data?

btw: fdisk reported, upon displaying the partitions originally: Partition 2 does not start on a physical sector boundary.

These were the partitions the Ubuntu installer created, using the standard settings for an encrypted lvm install, and opting to wipe the disk.

1 Answer 1

0

Actually, in a round about way, it didn't wipe the data. That still leaves the question why it chose different sectors. The question is now academic.

Inevitably, the extended partition that contained partition 5 (partition 2) had to be resized as well. It's not necessary to resize partition 5 first. Because to resize partition 2 you have to delete it, and then create a new extended partition of the desired size. That of course deletes partition 5. So you then create a new partition 5 of the desired size. And it gives some odd reports about what sectors it's using, but the end result is the sector starts remain the same as they were.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .