Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #180867 > unrolled thread

Question about Increasing the size of the Primary Partition

Started by"Martin McCormick" <martin.m@suddenlink.net>
First post2017-05-09 03:00 +0200
Last post2017-05-09 15:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  Question about Increasing the size of the Primary Partition "Martin McCormick" <martin.m@suddenlink.net> - 2017-05-09 03:00 +0200
    Re: Question about Increasing the size of the Primary Partition Michael Milliman <michael.e.milliman@gmail.com> - 2017-05-09 03:10 +0200
    Re: Question about Increasing the size of the Primary Partition Felix Miata <mrmazda@earthlink.net> - 2017-05-09 03:20 +0200
      Re: Question about Increasing the size of the Primary Partition "Martin McCormick" <martin.m@suddenlink.net> - 2017-05-09 15:20 +0200

#180867 — Question about Increasing the size of the Primary Partition

From"Martin McCormick" <martin.m@suddenlink.net>
Date2017-05-09 03:00 +0200
SubjectQuestion about Increasing the size of the Primary Partition
Message-ID<tF1Fo-2Nz-1@gated-at.bofh.it>
	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.

	I did all this several years ago and have forgotten the
details.

	Thank you very much.

Martin McCormick WB5AGZ

[toc] | [next] | [standalone]


#180868

FromMichael Milliman <michael.e.milliman@gmail.com>
Date2017-05-09 03:10 +0200
Message-ID<tF1P3-36F-3@gated-at.bofh.it>
In reply to#180867

[Multipart message — attachments visible in raw view] — view raw

I'm looking at some possibilities now, but need a little more info on your
exact situation. Is the current image file large enough to accommodate the
new partitioning, or does its size have to be increased as well?

73's,
de WB5VQX -- The Very Quick X-ray

On May 8, 2017 7:50 PM, "Martin McCormick" <martin.m@suddenlink.net> wrote:

        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.

        I did all this several years ago and have forgotten the
details.

        Thank you very much.

Martin McCormick WB5AGZ

[toc] | [prev] | [next] | [standalone]


#180869

FromFelix Miata <mrmazda@earthlink.net>
Date2017-05-09 03:20 +0200
Message-ID<tF1YJ-3a7-5@gated-at.bofh.it>
In reply to#180867
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/

[toc] | [prev] | [next] | [standalone]


#180880

From"Martin McCormick" <martin.m@suddenlink.net>
Date2017-05-09 15:20 +0200
Message-ID<tFddv-2bT-13@gated-at.bofh.it>
In reply to#180869
Felix Miata <mrmazda@earthlink.net> writes:
> If the original is EXT#, then resize2fs following forced fsck is all it 
> takes,
> no mkfs.

Great news, it's ext4 done last Saturday.

	I had a SSD fail so built the desired on an old 10 GB
Maxtor drive and when it worked, i used dd to save the image,
knowing that it could be resized up anyway.

> 
> 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.

	One thing I did do that turned out to be a bad idea was
to use dd with the minimum of parameters. The first time, the
image took over 24 hours to copy. I needed to make some more
changes so I blew another image but this time added bs=5000000 so
that it transferred 5-million bytes at a time and the image took
about ten minutes.

	If I had been using two separate disk controllers, the
image might have taken much less time but you fight the war with
the hardware you have rather than what you wish you had.

Thank you and all others who responded. Also I totally forgot
about resize2fs which is what reformats any new space in the file
system. It all worked like it should.

Martin WB5AGZ

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web