Double your Manjaro eMMC speed
#2
And now to resize the root partition.  I don't know of any way to move the partition while it's in use, so it's necessary to boot from an SD card to do this.

sfdisk can adjust the partition to move all the data over.  This involves copying about 58 GB and takes over an hour.

If anything interrupts this process, you've pretty much lost the root partition and will need to re-install.  So make sure you have plenty of power in the battery and are plugged in and don't suspend in the middle!

One should run lsblk and make sure nothing from /dev/mmcblk2 is mounted.  At some point the desktop environment might auto-mount a partition after a command.  So always check and umount them first.

This will use sfdisk to move the entire partition and all its data to be 289 sectors earlier.  So far, the size remains the same and the contents aren't altered.
Quote:$ echo "-289," | sudo sfdisk -N 2 /dev/mmcblk2 --move-data

Checking that no-one is using this disk right now ... OK 

Disk /dev/mmcblk2: 58.24 GiB, 62537072640 bytes, 122142720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x87129214

Old situation:

Device         Boot  Start       End   Sectors   Size Id Type
/dev/mmcblk2p1       62500    499711    437212 213.5M  c W95 FAT32 (LBA)
/dev/mmcblk2p2      500001 122142719 121642719    58G 83 Linux 

/dev/mmcblk2p2:
New situation:
Disklabel type: dos
Disk identifier: 0x87129214 

Device         Boot  Start       End   Sectors   Size Id Type 
/dev/mmcblk2p1       62500    499711    437212 213.5M  c W95 FAT32 (LBA)
/dev/mmcblk2p2      499712 122142430 121642719    58G 83 Linux

Data move:
 start sector: (from/to) 500001 / 499712
 sectors:  121642719
 step size: 1048576 bytes

Moved 121642719 from 121642719 sectors (100%).

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Notice how the start sector, 499712, is now a multiple of 8192.  Much better.

We could stop here, but there are now 289 wasted sectors at the end of the device.  We can enlarge the filesystem to fill them.  The next command is to make the partition larger, in this case to fill all available space and then resize the filesystem to fill the larger partition.

Quote:
$ echo ",+" | sudo sfdisk -N 2 /dev/mmcblk1

Checking that no-one is using this disk right now ... OK 

Disk /dev/mmcblk2: 58.24 GiB, 62537072640 bytes, 122142720 sectors
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: dos 
Disk identifier: 0x87129214

Old situation: 

Device         Boot Start       End    Sectors   Size Id Type
/dev/mmcblk2p1       62500    499711    437212 213.5M  c W95 FAT32 (LBA) 
/dev/mmcblk2p2      500001 122142430 121642719    58G 83 Linux 

/dev/mmcblk2p2: 
New situation: 
Disklabel type: dos 
Disk identifier: 0x87129214 

Device         Boot  Start       End   Sectors   Size Id Type 
/dev/mmcblk2p1       62500    499711    437212 213.5M  c W95 FAT32 (LBA)
/dev/mmcblk2p2      499712 122142719 121643008    58G 83 Linux

$ sudo e2fsck -f -y /dev/mmcblk2p2

e2fsck 1.45.6 (20-Mar-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
ROOT_MNJRO: 235853/312624 files (0.6% non-contiguous), 1103444/15205340 blocks

$ sudo resize2fs /dev/mmcblk2p2

resize2fs 1.45.6 (20-Mar-2020)
Resizing the filesystem on /dev/mmcblk2p2 to 15205376 (4k) blocks.
The filesystem on /dev/mmcblk1p2 is now 15205376 (4k) blocks long.


Messages In This Thread
Double your Manjaro eMMC speed - by xyzzy - 11-23-2020, 08:52 PM
RE: Double your Manjaro eMMC speed - by xyzzy - 11-23-2020, 10:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is the same DD command appropriate for writing EMMC and SD cards wpeckham 4 122 09-23-2021, 09:19 PM
Last Post: KC9UDX
  Manjaro - Internet connection sharing requires dnsmasq (but the dep isn't declared) Dendrocalamus64 0 113 09-11-2021, 05:25 PM
Last Post: Dendrocalamus64
  Pinebook pro nearly unusable after using manjaro-arm-installer TheCounselor 2 735 09-07-2021, 08:34 PM
Last Post: TRS-80
  Working suspend on Manjaro brzegorz 2 526 07-30-2021, 06:21 AM
Last Post: vssz
  Manjaro and Arch repository with privacy oriented software as400 78 48,387 07-28-2021, 05:24 AM
Last Post: llsf
  Manjaro [ARM Stable Update] 2021-07-23 issues Bocanila 0 287 07-24-2021, 09:09 AM
Last Post: Bocanila
  Sound stuttering on Manjaro gnome after latest kernel upgrade? pjsf 0 303 07-13-2021, 10:37 PM
Last Post: pjsf
  Kernel crash on Manjaro ARM mfashby 0 268 07-06-2021, 03:17 PM
Last Post: mfashby
  Manjaro wont recognize eMMC after booting with it disabled peasant 1 404 06-27-2021, 02:39 AM
Last Post: Arwen
  Pinebook Pro Manjaro Power Savinng Tips HelpMyBatteryIsDraining 1 626 06-15-2021, 08:42 AM
Last Post: moonwalkers

Forum Jump:


Users browsing this thread: 1 Guest(s)