RutaCubano

A cuban around the globe

How to expand an EXT partition on Hetzner Servers to increase storage quickly

In today’s fast-paced digital landscape, the demand for scalable and efficient server solutions has never been higher. When it comes to expanding storage capacity on your Hetzner server, time is of the essence. In this guide, we’ll unveil a streamlined process to swiftly increase storage by extending an EXT partition on Hetzner servers. With our step-by-step instructions, you’ll be equipped to effortlessly boost your server’s storage capacity, ensuring your system remains agile and responsive to your evolving needs. Let’s dive in and unlock the power of seamless storage expansion with Hetzner.

Last month I had to increase the size of a Storage in a Hetzner Cloud Server. The routine is simple and really fast.

Hetzner Cloud offers a fast, flexible, and cost-effective SSD based Block Storage which can be attach to your Hetzner Cloud Server. At this point in time its available in the Nuremberg and Helsinki regions.

Step 1 – Preparations

Check the current partition table (it should look similar to this depending on the model):

# fdisk -l /dev/sda

Result:

Disk /dev/sdb: 102.4 GB, 102399737856 bytes
255 heads, 63 sectors/track, 12449 cylinders, total 199999488 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
Disk identifier: 0x00051eb3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    52426752    26212352+  83  Linux

Step 2 – Checking the File System

Check the file system with:

# e2fsck -f -C0 /dev/sda1

Result:

e2fsck 1.42.5 (29-Jul-2012)
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
/dev/sdb1: 26283/1638400 files (5.6% non-contiguous), 283813/6553088 blocks

Step 3 – Expand the File System

Resize the file system with:

# resize2fs /dev/sda1

Result:

resize2fs 1.42.5 (29-Jul-2012)
Resizing the filesystem on /dev/sda1 to 24999680 (4k) blocks.
The filesystem on /dev/sda1 is now 24999680 blocks long.

Reboot and check if the disk is larger.

Ready to expand the storage of your Hetzner server quickly and easily? Follow this step-by-step guide. Don’t waste any more time dealing with storage limitations. Start today to enjoy the benefits of a server that is agile and adaptable to your needs!

Extra – Use Hetzner and get some free credits on your first use

Join Hetzner today and take advantage of the benefits of agile and reliable hosting! By signing up through our referral link, you can earn additional credits in your account. As soon you signs up using our referral link, you will receive €⁠20 in cloud credits.

Get Free Credits on Hetzner

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>