[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about Increasing the size of the Primary Partition

Martin McCormick composed on 2017-05-08 19:50 (UTC-0500):

> 	After using dd to copy a smaller disk image on to a
> larger drive, I get the general idea that one leaves the starting
> sector alone, deletes the remaining partition which is swap and
> then changes the end point of the Primary partition to the
> maximum number of sectors minus the swap space so that swap gets
> moved and recreated as the last N sectors like it was on the
> small drive.

> 	This should leave the primary partition properly
> formatted with all it's files still intact but with a swath of
> unformatted space which ends at the start of the swap sectors.

> 	What is the safe way to format that so that the primary
> partition's files don't get clobbered and sda1 just gets larger?
> In other words, the new formatting from mkfs shouldn't reset all
> the used tracks and sectors which are what was the smaller drive.

If the original is EXT#, then resize2fs following forced fsck is all it takes,
no mkfs.

Using dd might have been a bad idea, depending on the age of the old disk. If
the old disk was partitioned long enough ago, it unlikely conformed to the
technique preferred for disks with 4k internal sectors. If so, doing as you did
almost certainly will cause a performance penalty with the new.
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

Reply to: