Systems90 by Webglobe
  • Help
  • API Documentation
  • Login
Explore help topics
  • General questions
  • First steps
  • Operating systems
  • Backup & Storages
  • Network settings
  • Configuration changes
  • User interface
  • Billing
  1. Virtual servers (VPS)
  2. Operating systems
  3. Linux
  4. How to mount direct storage in Linux?

How to mount direct storage in Linux?

You need to connect to a remote VPS screen with root authority for all the steps.

lsblk command:

Use the "lsblk" command to list the blocking devices and their mount points. Disks can be labeled as /dev/sda, /dev/sdb or /dev/vda, /dev/vdb (depending on the disk controller settings in the "Virtualization" tab of the user interface). The output that you get after entering the command can be easily navigated through the "SIZE" column, where the correct interlock device will write the same size you selected when ordering direct storage.

Example output:
NAME                                                                                        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                                                                                           8:0    0   80G  0 disk
├─sda1                                                                                        8:1    0  500M  0 part /boot
└─sda2                                                                                        8:2    0 79.5G  0 part
  ├─VirtVG-root                                                                             253:0    0 77.5G  0 lvm  /
  └─VirtVG-swap                                                                             253:1    0    2G  0 lvm  [SWAP]
sdb                                                                                           8:16   0  1.1T  0 disk
└─sdb1                                                                                        8:17   0  1.1T  0 part /mnt/folder
mkfs command

Using the "mkfs" command, you format a disk and it has several variants, depending on the file system you want to use. For basic use, the mkfs.ext4 command is sufficient, which will format some block device as ext4.


				mkfs.ext4 /dev/the_disk_I_want_to_format
			
mount command:

With the "mount" command, you simply tell the system that a particular block device will be mounted in a particular folder and everything stored in that folder will be stored on that block device.


				mount /dev/the_disk_I_want_to_mount /path/whereto/mount
			
The mount command - After restart the server

The mount command itself will mount the disk only for the current boot, after the reboot the disk would not be mounted again. This can be corrected using the /etc/fstab file, where Linux will tell what to mount after booting. So just add this line to /etc/fstab particular block device will be mounted in a particular folder and everything stored in that folder will be stored on that block device.


				/dev/the_disk_I_want_to_mount /path/whereto/mount ext4 defaults 1 2