Advance

5 Awesome Tips About Partition Ubuntu 20.04 with NVME Storage

5 Awesome Tips About Partition Ubuntu 20.04 with NVME Storage

5 Awesome Tips About Partition Ubuntu 20.04 with NVME Storage. In the following Ubuntu 20 tutorials, in this article, you will learn how to partition Ubuntu 20.04 with NVME storage. To let this tutorial be more useful for you, try to buy Ubuntu VPS with Instant Setup.

1) How to Partition Ubuntu 20.04 with NVME Storage

Previously, you learned how to Install Ubuntu 20.04 server, join us to review what should be done when you need to add a New Disk Drive to an Ubuntu 20.04 System.

2) What is NVME

Non-Volatile Memory Express (non-volatile memory host control interface), a communication interface for SSDs developed by a consortium of companies such as Intel, Samsung, Sandisk, Dell, and Seagate; This protocol actually makes it possible to use the PCIe bus for SSDs. NVM Express allows host software and hardware to maximize parallelism on modern SSDs. NVMe technology used to be considered an unnecessary but widely used option in the data storage industry. But now this feature has become an important issue and buyers of new computers should pay attention to having it. If you have just bought a computer and you want to increase its speed, you can use this technology to achieve your goal.

 

How to use an NVME memory

PCs with PCIe ports can add NVMe memory to their PC by purchasing an adapter. In this case, the speed of the computer increases dramatically.

 

How To Manage Partition On Ubuntu 20.04

After installing a server, you may face the problem of disk space to store data. But this issue is now one of the cheapest IT commodities and you just need to learn how to partition a new hard disk and free up hard disk space.

Recommended Article: How to add a second IP to Debian by terminal commands

How To Configure A New Disk Drive On An Ubuntu System

You can use one of the two ways of configuring a new disk drive on the Ubuntu system. Mounted File Systems or Logical Volumes. The first way is a very simple method is to create one or more Linux partitions on the new drive, create Linux file systems on those partitions and then mount them at specific mount points so that they can be accessed. But the second way is to add the new space to an existing volume group or create a new volume group. A volume group is created and named vgubuntu after installing Ubuntu with the logical volume management option. There are two logical volumes in this volume group which are called root and swap.

How To Find The New Hard Drive

While you have installed a new physical or virtual hard drive and made it visible to the operating system. Then, you should see the new drive automatically be detected by the operating system. You can find the disk drives in a system with hd or sd beginnings and followed by a letter to indicate the device number.

How To Create Linux Partitions

To create one or more Linux partitions on the new disk drive run the following command-line argument for the device to be partitioned:

fdisk /dev/sdb
Welcome to fdisk (util-linux 2.32.1).  Changes will remain in memory only, until you decide to write them.  Be careful before using the write command.     Device does not contain a recognized partition table.  Created a new DOS disklabel with disk identifier 0xbd09c991.     Command (m for help):

Also, you can run the command below to view the current partitions on the disk:

Command (m for help): p  Disk /dev/sdb: 8 GiB, 8589934592 bytes, 16777216 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  Disklabel type: dos  Disk identifier: 0xbd09c991

As you see, there is no partition on the disk. So, you will need to create a new partition on the disk.

Command (m for help): n  Partition type     p   primary (0 primary, 0 extended, 4 free)     e   extended (container for logical partitions)  Select (default p): p  Partition number (1-4, default 1):
Next, you can choose where the partition will begin and end. The above partition was your first one, so it is clear that you need to start at the first available sector. And if you want to use it as the entire disk, specify the last sector as the end. Remember to specify the size of each partition by sectors, bytes, kilobytes, or megabytes if you want to create multiple partitions.
Partition number (1-4, default 1): 1  First sector (2048-16777215, default 2048):   Last sector, +sectors or +size{K,M,G,T,P} (2048-16777215, default 16777215):
Created a new partition 1 of type 'Linux' and of size 8 GiB.  
Command (m for help):

Till here, you succeeded to specify the partition. So, start to write it to the disk.

Command (m for help): w  The partition table has been altered.  Calling ioctl() to re-read partition table.  Syncing disks.
At this point, you can see the new partition is visible as /dev/sdb1 at the devices.
ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1
Recommended Article: Tutorial How to Migration Guide from cPanel to Directadmin

How To Create a File System On A Disk Partition

Since you have a new disk installed, Ubuntu could access it and you can configure a Linux partition on the disk. In this step, you need to create a Linux file system on the partition so that the operating system can use it to store files and data. Let’s use the easiest way of creating a file system on a partition.

# apt install xfsprogs  # mkfs.xfs /dev/sdb1  meta-data=/dev/sdb1       isize=512    agcount=4, agsize=524224 blks           =                sectsz=512   attr=2, projid32bit=1           =                crc=1        finobt=1, sparse=1, rmapbt=0           =                reflink=1  data     =                bsize=4096   blocks=2096896, imaxpct=25           =                sunit=0      swidth=0 blks  naming   =version 2       bsize=4096   ascii-ci=0, ftype=1  log      =internal log    bsize=4096   blocks=2560, version=2           =                sectsz=512   sunit=0 blks, lazy-count=1  realtime =none            extsz=4096   blocks=0, rtextents=0    

3) How To Mount a File System

Mount the new file system on the Linux partition of our new disk drive, after creating this. The way you pass is to create a mount point.

mkdir /backup

Next, The file system may then be manually mounted.

mount /dev/sdb1 /backup

 

4) How To Configure Ubuntu To Automatically Mount A File System

If you consider to set up the system in a way that the new file system is automatically mounted at boot time an entry needs to be added to the etc/fstab file, the format for an fstab entry is as follows:
<device>	<dir>	<type>	<options>	<dump>	<fsck>
But if I want to display the summary of these entries, the below list is ready:

<device> – The device on which the filesystem is to be mounted.

<dir> – The directory that is to act as the mount point for the filesystem.

<type> – The filesystem type (xfs, ext4 etc.)

<options> – Additional filesystem mount options, for example making the filesystem read-only or controlling whether the filesystem can be mounted by any user. Run man mount to review a full list of options. Setting this value to defaults will use the default settings for the filesystem (rw, suid, dev, exec, auto, nouser, async).

<dump> – Dictates whether the content of the filesystem is to be included in any backups performed by the dump utility. This setting is rarely used and can be disabled with a 0 value.

<fsck> – Whether the filesystem is checked by fsck after a system crash and the order in which filesystems are to be checked. For journaled filesystems such as XFS this should be set to 0 to indicate that the check is not required

5) How To Free Up Hard disk Space in Ubuntu

While installing some apps or system updates, the package manager downloads and then caches them before installing them, the Ubuntu doesn’t go and delete the left cache – it’s just leftover garbage. So, you are recommended to clean up these packages to gain hard disk space, improve the performance of your PC, and speed up boot times.
To do this, type the following command from the Terminal to clean up those files.
sudo apt-get -s clean

Conclusion

In this article, you reviewed the ways you can provide more space on your Ubuntu 20.04 server by partitioning it. From now on you can use the NVME storage to free up your disk space. In case you are interested in reading more bout Ubuntu, find our article on Initial server setup on Ubuntu 20.04.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.
  • Martin McAlonan
    Martin McAlonan
    2 months ago

    Ubuntu 20.04 with NVME Storage: NOT ANSWERED OR ADRESSED. iD 10 T

    Reply
    • Richard
      Richard
      2 months ago

      Hello Martin,

      What virtualization did you the install on?

      Reply
  • Rob Glover
    Rob Glover
    6 months ago

    What is the size of root partition?

    Reply
  • Douglas Tate
    Douglas Tate
    6 months ago

    good tutorial. Is it possible to increase the size of partition and do not lose any data?

    Reply
  • Marc Reid
    Marc Reid
    6 months ago

    Is home partition vital?

    Reply
  • Adepero Chalk
    Adepero Chalk
    6 months ago

    What should be done for install Ubuntu in UEFI mode?

    Reply
  • Steve Ziegler
    Steve Ziegler
    6 months ago

    Should I use swap in Ubuntu?

    Reply

Leave Your Comment

Your email address will not be published.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+18054214518

7 days a week, 24 hours a day