Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

How to Format and Mount a Disk on a Linux VPS

A safe, provider-neutral guide to identifying a VPS disk, formatting only the intended target, mounting it, and validating a persistent UUID-based fstab entry.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To make a newly attached VPS disk usable and keep it mounted after reboot, identify the correct device, create a filesystem only if needed, mount it at a directory, then add its filesystem UUID to /etc/fstab and test the entry with mount -a. Device names and provider steps vary, so verify the disk on your own server rather than assuming it is /dev/sdb.

Before you start: attach and identify the disk

First attach the volume through your VPS provider’s control panel or CLI, following that provider’s current instructions. There is no universal attachment command: the required steps depend on the provider and host configuration.

After attachment, inspect the Linux device tree and filesystem identifiers:

lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,UUID,MOUNTPOINTS
sudo blkid

Compare the candidate disk’s size, device relationships, existing filesystem, UUID and mount points. Confirm it is not the boot or root device, swap, an existing data volume, or otherwise in use. Do not select a target based on a device name alone. If the volume was just attached and does not appear, device discovery information may not have refreshed yet; follow the appropriate instructions for your distribution and provider.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

The lsblk default output can vary, so specifying columns makes the information easier to interpret. Its documentation also notes that udev information may lag recent device changes; consult the lsblk manual.

Choose the disk layout and filesystem

Whole disk or partition

You can put a filesystem directly on a block device or create a partition and put the filesystem on that partition. A partitioned disk is useful when the intended layout requires a partition table or multiple partitions; a simple data volume may use either layout. Provider or organizational policy, the existing layout and future use should guide the choice. Inspect the parent-and-child relationships shown by lsblk before deciding which device to format.

The mkfs manual describes a partition as the usual target while allowing a block device. Use the actual device or partition confirmed on your host, not a guessed name.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Filesystem choice

For a straightforward Linux-only data volume, ext4 is a reasonable general-purpose choice if the provider and workload do not require something else. It is not universally best: consider provider support, workload, existing filesystem, administrative and recovery needs, and whether another operating system must access the volume. The ext4 manual describes ext4’s general-purpose design.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a filesystem only if the target needs one

Formatting writes a filesystem to the selected device or partition and can destroy existing data. Stop if the target contains anything you need to retain. Confirm the target again immediately before running the command.

If you confirmed that a newly created partition is the intended target and want ext4, use this command form, replacing the placeholder with the verified partition name:

Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
sudo mkfs.ext4 /dev/CONFIRMED_PARTITION

If your inspected layout deliberately uses the whole disk, substitute that confirmed device instead. Match the target to the layout: do not format a child partition when you intend to use the whole disk, or format the parent disk when you intend to use a partition. Prefer a filesystem-specific utility such as mkfs.ext4 to the generic mkfs frontend; see the mkfs manual and mke2fs manual.

Mount the filesystem for immediate use

Create the directory where the filesystem should appear, then mount the confirmed device there. The following example uses /mnt/data; choose a path that suits your system and applications.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo mkdir -p /mnt/data
sudo mount /dev/CONFIRMED_DEVICE /mnt/data
findmnt /mnt/data

Replace /dev/CONFIRMED_DEVICE with the device or partition that contains the filesystem. Check that findmnt shows the intended source at the intended path, then check available space before directing applications to it. Linux presents mounted filesystems within one directory tree; mounting over a directory changes what you see there while the filesystem is mounted. Plan the mount point with any files already in that directory in mind. The mount manual documents attaching and detaching filesystems.

Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Make the mount persist after reboot

A manual mount command does not by itself configure a boot-time mount. Add the new filesystem to /etc/fstab, using its UUID or label rather than relying on a kernel device name such as /dev/sdb1, which can change as devices are added or removed.

Find the filesystem UUID after formatting:

lsblk -f
sudo blkid

Confirm that the UUID belongs to the new filesystem. Then back up /etc/fstab, preserve its existing entries, and add an entry in this illustrative form:

UUID=REPLACE_WITH_REAL_UUID  /mnt/data  ext4  defaults  0  2

Replace the UUID with the real value, and adjust the mount point, filesystem type and options to match your setup. This example is not a universal option set. The six fields are source, target, type, options, dump and pass. The fstab manual recommends UUID or LABEL tags because device names may change. If filesystems have been cloned or copied, check that the UUID is unique before using it. Red Hat’s RHEL 10 persistent-mount documentation also describes UUID-based entries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

Test the configuration before rebooting:

sudo mount -a
findmnt /mnt/data
lsblk -f

If mount -a reports an error, correct the entry and test again before rebooting. Do not delete or replace existing entries as a shortcut. Boot handling and mount options can depend on the distribution, installed systemd and util-linux versions, and whether a device is always present. For special devices or network-backed volumes, check the host’s documentation and your provider’s instructions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and fixes

  • The wrong disk is selected. Recheck size, mount points and device relationships in lsblk, and confirm the root, boot and swap devices before formatting. Never assume a name such as /dev/sdb identifies the new volume.
  • The wrong level of the layout is formatted. Inspect TYPE and parent-and-child relationships. Use the whole device or partition that matches the layout you chose.
  • Existing data would be erased. Do not run mkfs until you have verified the target and accounted for its contents. If you need the data, stop and determine the correct preservation or migration procedure.
  • The disk does not appear after attachment. Check the provider’s attachment status and follow its device-discovery guidance; recently changed device information may not yet be reflected by udev.
  • The mount disappears after reboot. A one-time mount is not persistent. Check that the correct UUID, path and filesystem type are in /etc/fstab, then test with sudo mount -a.
  • An invalid fstab entry disrupts startup. Validate before rebooting. For a device that may not always be available, verify suitable options for your distribution and provider rather than copying a generic example unchanged.
  • Files seem to vanish from the mount-point directory. A mounted filesystem overlays the directory view. Check the mount state and inspect the underlying directory only when the filesystem is safely unmounted.

Or let it run in the cloud

For a separate task—keeping a YouTube channel live with uploaded videos—StreamNeo runs the stream in the cloud rather than on your VPS or home computer. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams uploaded video, not a camera feed. Any quality up to 4K 60fps streams as uploaded at one price per slot, and StreamNeo automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$208.99

Start your free StreamNeo day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.