Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

Adding a new partition to an existing Linux server

Posted on 20/09/202003/09/2026 Christian By Christian No Comments on Adding a new partition to an existing Linux server
  1. Home
  2. Linux
  3. Adding a new partition to an existing Linux server
Graphic illustrating the process of creating a disk partition in Linux, featuring an icon of a hard drive and text 'How to Create a Disk Partition in Linux' against a blue background.

Suppose you have an up and running Linux server and you have a need for a new partition, here is an easy way to do that from the command line. For this demonstration, I am using a CentOS. Read on to learn how to add a new partition to an existing Linux server. Error code 15601: How to resolve DISM unspecified error when removing preinstalled packages, Error 0xc1420127-The specified image in the specified wim is already mounted for read and write access, and Error 740-Elevated permissions are required to run DISM. The below image is the output I got while trying to add packages to an install.wim file.

Here is a summary of the partitions available on my server before creating the new partition using the lsblk command.

Linux server

For this post, I will be using the dd tool, other tools similar to dd in Linux are clonezilla, KDE Partition Manager, BXImage etc

  1. First, we use the dd command below to create a partition image. I will be creating a 1GB partition
dd if=/dev/zero of=1GB_HDD.img bs=1M count=1024

Once the above command is executed, the output should be something like this

add partition
  1. 2 Create a partition with the fdisk command.
fdisk 1GB_HDD.img

When you use the fdisk command, this automatically create a DOS partition table. Switch to a GPT table by entering “g” on the first fdisk prompt. To make this easy, accept the default values for partition number, first sector and last sector at the fdisk prompt by hitting the enter button when prompted.

Input “n” at the next prompt. This creates a new partition;

Then input “w” to write the changes made.

existing server
  1. 3 Now format the partition with a file system of your choice; I will be using the mkfs command
mkfs.ext4 1GB_HDD.img

press “y” for yes at the prompt

new partition

Next, use the losetup utility to assign the next available loop device to the newly created partition

Terminal command showing the use of 'losetup' to display information about a loop device for a 1GB HDD image file.

If all these steps have been carried out properly, the partition should be available. Thus, the lsblk command should confirm that

Terminal output displaying disk partitions and loop devices using the command 'lsblk'. The output includes multiple entries such as 'sda', 'sr0', 'loop0', 'loop1', and 'loop3', with highlighted focus on 'loop3'.

However, Create a new directory for the new partition and mount it there

Command line interface displaying the creation of a directory named 'loop3' and mounting it to '/dev/loop3'.

With the steps above, you should be able to create a new partition and mount it to an existing Linux server. Furthermore, Try this and let me know if it works for you.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Linux Tags:Partitions

Post navigation

Previous Post: ESXI 6.7 ALARM: Seat disk exhaustion on 10
Next Post: DISM failed with error 0x800f081f: Source file could not be found

Related Posts

  • featuredpkg
    How to solve /var/lib/dpkg/lock Error in Ubuntu Linux Linux
  • How to Set Up and Configure a Squid Proxy Server Linux
  • image 129
    How to deploy Ansible AWX on centos 8 Linux
  • featureunions
    How to Install Unison on Linux System Linux
  • feature image
    How to Configure Advanced PAM in Linux Linux
  • ubuntu 1479782 1280
    Ubuntu Linux post installation of Network Properties, Guest Integration and Web Administration using Cockpit Linux

More Related Articles

featuredpkg How to solve /var/lib/dpkg/lock Error in Ubuntu Linux Linux
How to Set Up and Configure a Squid Proxy Server Linux
image 129 How to deploy Ansible AWX on centos 8 Linux
featureunions How to Install Unison on Linux System Linux
feature image How to Configure Advanced PAM in Linux Linux
ubuntu 1479782 1280 Ubuntu Linux post installation of Network Properties, Guest Integration and Web Administration using Cockpit Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

veeaam100

Veeam Vanguard

  • nonRDP admin
    Allow RDP access for non administrators: Add User to Remote Desktop Users Group in Active Directory Windows Server
  • GitMarkdown
    Install Git on Windows: Practical Git use with markdown Version Control System
  • 1723152 3cc3 2 750x405 1
    Cluster creation in Proxmox VE Virtualization
  • VMware workstation networking issues
    Network cable Unplugged: Fix VMware “Warning – Multiple default gateways are intended to provide redundancy to a single network Virtualization
  • Screenshot 2020 06 22 at 11.33.46
    How to fix Bluetooth not available on MacBook Mac
  • How to Lock the Find My Device Option in Windows 11
    How to Lock the Find My Device Option in Windows 11 Windows
  • images
    How to fix you are not allowed to view this folder on SSRS: MBAM reports cannot be accessed because it could not load folder contents Windows Server
  • screenshot 2020 02 08 at 15.53.31
    Enable Automatic Logon on Windows Windows Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,752 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.