peterfido
Posts: 4
Joined: Sat Dec 13, 2014 8:43 am

Resize Filesystem in a correct way?

Sat Dec 13, 2014 8:51 am

Hello,

i am looking for a correct Resize-Script. The Built-In Tool is not so smart. Because whenn i buy a new SD-Card it could be that the Image from behavior do not fit on it. So the Script should take a little bit Reserve at the end of the current SD-Card or use an internal table for resizing to make sure that it doesn´t matter which Tricks use the manufacturer for size indication.

beta-tester
Posts: 1382
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Resize Filesystem in a correct way?

Sun Dec 14, 2014 10:40 am

peterfido wrote:Hello,

i am looking for a correct Resize-Script. The Built-In Tool is not so smart. Because whenn i buy a new SD-Card it could be that the Image from behavior do not fit on it. So the Script should take a little bit Reserve at the end of the current SD-Card or use an internal table for resizing to make sure that it doesn´t matter which Tricks use the manufacturer for size indication.
what do you mean with "the built-in tool"? (raspi-config)
what do you mean with "the built-in tool is not smart"?
what do you try? (grow/shrink filesystem, backup/transfer from one sd card to an other)
what are the sizes of your sd cards (source/destination)

when you try to use a sector based image of a bigger sd card to put it on a smaller sd card, then you should not use a sector based method.
in that case you should use a filesystem based transfer.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Resize Filesystem in a correct way?

Sun Dec 14, 2014 10:57 am

beta-tester wrote:what do you mean with "the built-in tool"? (raspi-config)
Yes, I took this to mean raspi-config
what do you mean with "the built-in tool is not smart"?
I'm assuming that the OP is suggesting (as has been mentioned before) the possibility that the resize could be set to leave a little "wiggle room" at the end of the card so the image could be copied to similar sized cards without having to make sure the card is exactly the same size or larger.

beta-tester
Posts: 1382
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Resize Filesystem in a correct way?

Sun Dec 14, 2014 11:45 am

so in fact, you bought a second sd card, with the same GB size, but the real available size is slightly less than the source sd card.

this is not the fault of the raspi-config tool.
if that tool would not use the full size of sd card, other people would complain, why that tool do not use the whole available size.
so the tool is doing its job very well.

you have to shrink the source filesystem and the partition to the size, that is available on your destination sd card first.
then make a backup of the source sd card.
and then you can put the image to the slightly smaller sd card.

see parted
see resize2fs
see gparted

you can shrink the filesystem in the source sd card by a bigger value, to be shure that it will fit to most of different sd cards.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

peterfido
Posts: 4
Joined: Sat Dec 13, 2014 8:43 am

Re: Resize Filesystem in a correct way?

Sun Dec 14, 2014 3:35 pm

Yes, thanks.

It is (for me) better, when i let a wiggle room than i must later shrink the filesystem cause the stupid manufactor has tricksed. :mrgreen: The Raspi-Config could do it optional. Yesterday i have resized my filesystem manually.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Resize Filesystem in a correct way?

Sun Dec 14, 2014 5:08 pm

The real point of all this is that this problem keeps coming up over and over and there doesn't seem to be any fully satisfactory solution - one that meets all needed requirements. Sure, here are lots of technically valid solutions, but they are all too complicated for the type of user that needs them.

It seems to me that the real problem is whatever mechanism or system is in place that gives new users the idea that the right (mom-approved) way of making SD card backups is to do it at the image level. That is, using Win32diskwhatever or whatever other tools there are that work at the image level.

Instead, the right way to do this is at the file level. Yes, it is somewhat more difficult to do than the image level - but the trick is, that it works. It has the all important attribute of actually working.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Resize Filesystem in a correct way?

Sun Dec 14, 2014 6:38 pm

Joe Schmoe wrote:Instead, the right way to do this is at the file level. Yes, it is somewhat more difficult to do than the image level - but the trick is, that it works. It has the all important attribute of actually working.
But almost impossible in Windows...

Return to “Raspberry Pi OS”