Extending storage space


I have an external server running Yunohost (v and a few stable apps (Nextcloud/Collabora et Matrix/Element) hosted in a Hetzner VPS. This server is reaching his SSD storage space limit (40GB).

Here is a translation of the Yunohost admin panel.

Storage space (on /dev/sda1) has 1.3 GiB (4%) left from the total space (in 36 GiB). Be careful.

The host of my server allow me easily to add some SSD storage space. I thus proceed and created a volume of 20 GiB (EXT4).
However, i don’t know how to attribute this storage space to the disk used by Yunohost (/dev/sda1) to extend its initial 40GiB storage space by the new 20 GB volume (/dev/sdb).

First, is it possible? If yes can someone guide me on how to proceed?

Here are informations from the disk obtain with lsblk, fdisk -lu and df -h

root@server:~# lsblk
sda       8:0    0 38.1G  0 disk
├─sda1    8:1    0   38G  0 part /
├─sda14   8:14   0    1M  0 part
└─sda15   8:15   0  122M  0 part /boot/efi
sdb       8:16   0   20G  0 disk /mnt/HC_Volume_24561422
sr0      11:0    1 1024M  0 rom

root@server:~# fdisk -lu
Disk /dev/sda: 38.15 GiB, 40961572864 bytes, 80003072 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: gpt
Disk identifier: 3D8B7C76-927B-4324-8E9A-FB36589680FA

Device      Start      End  Sectors  Size Type
/dev/sda1  253952 80003038 79749087   38G Linux filesystem
/dev/sda14   2048     4095     2048    1M BIOS boot
/dev/sda15   4096   253951   249856  122M EFI System

Partition table entries are not in disk order.

Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Disk model: Volume
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

root@server:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            947M     0  947M   0% /dev
tmpfs           194M  916K  193M   1% /run
/dev/sda1        38G   35G  1.3G  97% /
tmpfs           968M  8.6M  959M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda15      121M  130K  120M   1% /boot/efi
/dev/sdb         20G   24K   19G   1% /mnt/HC_Volume_24561422
tmpfs           194M     0  194M   0% /run/user/1007

Many thanks.

Yunohost has nothing to do with the process.

You have to mount the new drive in a directory system (Debian level).

The global idea:

  • Stop Nexcloud app
  • Rename /var/www/nextcloud/ to /var/www/nextcloud_OLD/
  • Mount sdb (20G volume) in /var/www/nextcloud/
  • Migrate the content of /var/www/nextcloud_OLD/ to /var/www/nextcloud/
  • Make a sacrifice of a rubber duck :duck:
  • Start Nexcloud app

You have to find a real tutorial for Debian/Ubuntu on the web and to be extremy careful. Ex:

These exemples are for home directory but the process is the same

1 Like

I bookmarked that page, as I’m going to add an external drive to my current Yunohost installation (just waiting for my nohost.me subdomain to be freed :smirk: ). You should take a look.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.