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
  Manjaro Sway Theme Broken Eighty8 1 166 03-08-2024, 08:41 AM
Last Post: tophneal
Question Manjaro with Full Disk Encryption and GRUB dumetrulo 1 1,605 02-02-2024, 02:45 AM
Last Post: frankkinney
  Manjaro network problem late 2023 acruhl 1 213 01-19-2024, 11:32 PM
Last Post: Kevin Kofler
  Help installing Manjaro on eMMC of Pinebook Pro pine4546464 4 1,912 12-13-2023, 07:22 PM
Last Post: trillobite
  Need Help Recovering Manjaro /boot Contents on Pinebook Pro calinb 6 1,979 12-11-2023, 03:47 AM
Last Post: calinb
  Manjaro 20.04 not loading from SD (with Manjaro on eMMC) zaius 1 291 12-07-2023, 03:11 PM
Last Post: wdt
  Manjaro ARM: enabling external monitors & fixing Broadcom WiFi after updating trifleneurotic 2 746 11-14-2023, 10:57 AM
Last Post: trifleneurotic
  Manjaro [ARM Stable Update] 2021-07-23 issues Bocanila 1 1,913 08-21-2023, 09:10 PM
Last Post: vanessadonald
  [Manjaro] u-boot won't boot from eMMC with (unbootable) SD card present zackw 1 1,852 08-21-2023, 09:08 PM
Last Post: vanessadonald
  Manjaro - HIbernate - brcmfmac clk issue pompeyPinePro 1 709 08-18-2023, 02:06 AM
Last Post: juliamenendez

Forum Jump:


Users browsing this thread: 1 Guest(s)