Linux Format External Drive

broken image


  1. Script To Format Linux Disk
  2. Format Drive F Windows 10

If you have two hard drives you can mount second hard drive to be used for (cPanel/WHM) backups or for hosting more sites. The hard drives must not be in any kind of Raid setup. Process of partitioning, formatting and mounting is quite simple.

First check what disk drives do you have. Usually disk drives on Linux are named /dev/sda (first HDD), /dev/sdb (second HDD) or something similar.
You can get a list of disk drives in system using this command

To create a partition on our new drive, we need to know the file format we intend on using, and the starting and ending position for that partition. For example, if we wanted to create a 2GB partition on our empty 4GB USB, we would set the start position at 0 and the end position at 2GB. This part of this guide applies to format external or portable hard drive to Ext2, Ext3 or Ext4 file system under Windows 10/8/7, so that the drive can be used under Linux. Step 1: Connect the portable drive to computer and launch Eassos PartitionGuru. Then you can see the drive is displayed in the software.

The output should be something like this:

So those are two 500 GB hard drives…

External

If you execute command like the one below you'll get more detailed preview of your hard discs and their partitions:

Ios 10 space requirements. Output should looks like this:

You should notice that second hard disk (/dev/sdb) has no partition and that probably means that it's un-partitioned yet.

Format

If you execute command like the one below you'll get more detailed preview of your hard discs and their partitions:

Ios 10 space requirements. Output should looks like this:

You should notice that second hard disk (/dev/sdb) has no partition and that probably means that it's un-partitioned yet.

So let's make the partition on /dev/sdb by executing

and then use following in the prompt
– 'n' for new partion
– 'p' for primary partition
– '1' for the first partition
– 'Enter' / 'Enter' for the first AND last cylinders (automatically use the entire disk)
– 'w' to save what I have done

That has created and saved new partition and it will be called /dev/sdb1 (first partition on /dev/sdb). Next step is to format it.

On newer distributions (CentOS 6.3 for eg) use this command to format a new partition.

If you want to use this hard disk for backup make /backup folder or if you want to use it to store more sites make new home folder called /home2

Now just mount the backup partition or the new home partition

Now you can use the additional hard drive for cPanel/WHM backups or storing new sites. cPanel should automatically detect /home2 and should ask you whether you like to setup new account on /home or at /home2.

If you want the partition to auto mount on server (re)boot edit fstab file located at /etc/fstab and add one of following lines at the bottom of it depending if you for /backup folder or the line below for /home2 folder:

Note: After adding one of these lines press add one more empty line below since fstab requires the new line symbol at the end of every config line. Before you issue the following command, be aware that this re-mounts ALL Filesystems, and will more than likely disconnect most other users

To make sure this mounts automatically, issue the following command:

If you got no errors – your mount worked, try df -h once more to see if everything is fine.

This post helped you out?
Why not buy me a coffee?

Script To Format Linux Disk

Tags: mounting a storage drive in linux mint, Setup hard drives in Linux, linux add second drive fdisk, linux centos mount and format a drive, linux how to format a second drive with permissions, linux mint format hd, linux mint mount hard drive, linux mount /dev/sdb, linux mount additional drive, linux mount brand new hard drive, linux mount dev sdb, linux mount hard drive, mount a formatted disc linux mint, mount sdb linux, mounting a hdd in linux, mounting second disk linux mint, mx linux: how access internal hard disk, install linux second hdd, how to mount /dev/sdb, adding a second hard drive to linux mint, best commands for mint linux using internal hard drive, best format for HD to run linux, centos 8 mount second disk at boot, command to swtich to 2nd hard disk lunix, debian wsl mount second hardrive, format a partition linux sdb, format a second hard drive, format hdd in linux, Format the New Hard Drive amount in centos linux, FORMATTING second hdd in ubuntu, how format hdd for linux mint, how to configure HDD in linux, how to format a second hard drive for storage data linux and windows, how to format second hard drive in linux, how to go to second disk in linux

Related Posts

Format Drive F Windows 10

Validating URL in PHP without regular expressions




broken image