---
title: "Set Up an Additional Disk in Linux | Hostman Docs"
description: "Partition, format, and mount an additional disk on your Linux server, then add it to /etc/fstab to keep it mounted after a reboot."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

After you [add a disk in the dashboard](https://hostman.com/docs/cloud-servers/server-configuration/#add-a-disk), set it up in the operating system.

## Check Disk Names

On Hostman, disks are usually named `sd*`. On servers created before May 2025, disks are named `vd*`.

The disk name in the dashboard may not match the actual name in your system. To see the actual disk names, run:

```shell
lsblk
```

Example output:

```shell
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop1    7:1    0 63.9M  1 loop /snap/core20/2318
loop2    7:2    0   87M  1 loop /snap/lxd/29351
loop3    7:3    0 50.9M  1 loop /snap/snapd/24505
loop4    7:4    0 63.8M  1 loop /snap/core20/2599
loop5    7:5    0 89.4M  1 loop /snap/lxd/31333
loop6    7:6    0 50.9M  1 loop /snap/snapd/24718
sda      8:0    0   15G  0 disk 
└─sda1   8:1    0   15G  0 part /
sdb      8:16   0   10G  0 disk 
vda    252:0    0    1M  1 disk
```

In this example, `sdb` is the new disk. `sda` is the main system disk, and `vda` is reserved for `cloud-init` by default.

The commands below use `sdb`. Replace it with the actual disk name on your system.

## Step 1. Create a Partition

Start `fdisk`:

```shell
fdisk /dev/sdb
```

In `fdisk`:

1.  Press `n` to create a new partition.
2.  Press `p` to select a primary partition.
3.  Press `Enter` to accept the default values for the remaining options.
4.  Press `w` to write the changes and exit.

![1964dcf0 B9a0 4c0f 9787 34ce903ce011](https://content.hostman.com/assets/561a81ca-719a-4b72-845f-b515809a875e.png?width=726&height=498)

To verify that the partition was created, run `lsblk`:

```shell
lsblk
```

The new partition is `sdb1`.

```shell
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part
sdb       8:16   0   10G  0 disk
└─sdb1    8:17   0   10G  0 part
vda     252:0    0    1M  1 disk
```

## Step 2. Create a Filesystem

Create a filesystem on the new partition. This example uses `EXT4`:

```shell
mkfs.ext4 /dev/sdb1
```

## Step 3. Mount the Disk

Mount the disk to a directory to start using it. Each disk needs its own mount point. For example, if you add another disk (`sdc`) later, mount it to a different directory.

Create a mount directory:

```shell
mkdir /mnt/disk2
```

Mount the disk:

```shell
mount -o barrier=0 /dev/sdb1 /mnt/disk2
```

Files you store in `/mnt/disk2` are now written to the new disk.

## Step 4. Add an Entry to /etc/fstab

To keep the disk mounted after a reboot, add an entry to `/etc/fstab`.

You can reference the disk by its device name (for example, `sdb1`), but the name can change if you reattach disks or remove others. We recommend using a UUID instead, because it is unique and doesn't change.

To find the UUID, run:

```shell
lsblk -o NAME,UUID
```

Example output:

```shell
sda    
└─sda1 fcafbb78-fd6c-4083-82d8-3c06bd6ad4b1
sdb    
└─sdb1 534c6694-d2b0-4867-843b-b8a934bf0e5d
vda    041E-4E90
```

Here, the UUID of the new partition is `534c6694-d2b0-4867-843b-b8a934bf0e5d`.

Open `/etc/fstab`:

```shell
nano /etc/fstab
```

Add the following line, replacing `<disk-uuid>` with the corect value:

```shell
UUID=<disk-uuid> /mnt/disk2 ext4 defaults 0 2
```
