Default way to resizing SD card with raspi-config is not going to work on USB SSD disk so we have to do this old fashion i.e. command line fdisk. Let change partition table with fdisk. You need to remove exiting partition entries and then create a new partition that takes the all the free space on the disk we have. This will only change the disk partition table not the data on the disk.

First Part of this post about: Boot Raspberry Pi from USB SSD

Resizing usb ssd disk in raspberry pi with raspi-config

Resizing USB SSD disk in raspberry pi with raspi-config

Run fdisk -l to list all the partitions and all the disks attached to your raspberry pi.

fdisk -l

........
Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         8192   532480   524289  256M  c W95 FAT32 (LBA)
/dev/sda2       540672  6365183  5824512  2.8G 83 Linux
......

If you are not sure which disk is your root partition then you have to check it to be sure, first run df -h command to see whcih one is your root mount / and then you can check with findmnt command where root partition is sitting on actual disk.

Output from findmnt

You can see my / (root) partition is sitting on /dev/sda2

[email protected]:~# findmnt
TARGET                           SOURCE     FSTYPE     OPTIONS
/                                /dev/sda2  ext4       rw,noatime
├─/dev                           devtmpfs   devtmpfs   rw,relatime,size=494908k,nr_inodes=123727,mode=755

Output from df -h

Size of the partition and used capacity along with available capacity.

[email protected]:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.8G  1.8G  886M  67% /
devtmpfs        484M     0  484M   0% /dev
...

Lets get to work and extend /dev/sda2 partition to use full disk. Run fdisk /dev/sda command and follow steps below.

[email protected]:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 7.5 GiB, 8027897856 bytes, 15679488 sectors
Disk model: DataTraveler 410
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: 0xd02483c7

Device     Boot  Start     End Sectors  Size Id Type
/dev/sda1         8192  532480  524289  256M  c W95 FAT32 (LBA)
/dev/sda2       540672 6365183 5824512  2.8G 83 Linux
  1. p – Print exiting partition table and take note of /dev/sda2 start (in my case it was 540672 but this is very important)
  2. and then 2 – to delete exiting partition /dev/sda2
  3. np – 2 create new partition, set it primary, and its number 2
  4. First sector – this is the magic number in my case it was 540672  and press enter.
  5. You may get this message if you do type n to Partition #2 contains a ext4 signature. Do you want to remove the signature? 
  6. w to save partition table and exit fdisk
  7. reboot the pi
Partition contains a ext4 signature message

Partition contains a ext4 signature message

List of steps to Create Partition

[email protected]:~# fdisk -uc /dev/sda

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 7.5 GiB, 8027897856 bytes, 15679488 sectors
Disk model: DataTraveler 410
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: 0xd02483c7

Device     Boot  Start     End Sectors  Size Id Type
/dev/sda1         8192  532480  524289  256M  c W95 FAT32 (LBA)
/dev/sda2       540672 6365183 5824512  2.8G 83 Linux

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-15679487, default 2048): 540672
Last sector, +/-sectors or +/-size{K,M,G,T,P} (540672-15679487, default 15679487                                                                                                                                                             ):

Created a new partition 2 of type 'Linux' and of size 7.2 GiB.
Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: n

Command (m for help): p

Disk /dev/sda: 7.5 GiB, 8027897856 bytes, 15679488 sectors
Disk model: DataTraveler 410
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: 0xd02483c7

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         8192   532480   524289  256M  c W95 FAT32 (LBA)
/dev/sda2       540672 15679487 15138816  7.2G 83 Linux

Command (m for help): w
The partition table has been altered.
Syncing disks.

[email protected]:~# reboot

Resize Partition

After rebooting you can see disk size is still old one, now we need to resize file system with resize2fs command

Run df -h command to check size of the partition and used capacity along with available capacity, now run sudo resize2fs /dev/sda2 to resize root partition (This make take some time). Once partition is resized you can check disk capacity again with df -h

[email protected]:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.8G  1.8G  887M  67% /
devtmpfs        484M     0  484M   0% /dev
...
[email protected]:~# sudo resize2fs /dev/sda2
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/sda2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/sda2 is now 1892352 (4k) blocks long.

[email protected]:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.1G  1.8G  5.2G  26% /
devtmpfs        484M     0  484M   0% /dev
...

You can buy PiHome SSD disk with all os and

Note: You can buy PiHome Smart Heating SSD disk with the full LAMP stack (Apache, PHP 7.x and MySQL/MariaDB and phpMyAdmin) pre-installed and configured, PiHome SSD is tested with Raspberry pi and compatible with updates from PiHome.