Enable Managed Disks

1. List the disks

lsblk

2. Find the disk and grep for SCSI

dmesg | grep SCSI

siftuser@docker-registry:~$ dmesg | grep SCSI

[ 0.784137] SCSI subsystem initialized

[ 2.239054] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)

[ 3.236693] sd 0:0:0:0: [sda] Attached SCSI disk

[ 3.598509] sd 1:0:1:0: [sdb] Attached SCSI disk

[ 5.124510] sd 3:0:0:0: [sdc] Attached SCSI disk

[ 14.038539] Loading iSCSI transport class v2.0-870.

Here sdc is the disk that we want to Partition

3. PARTITION DISK - Start the FDISK PROCESS

sudo fdisk /dev/sdc

siftuser@docker-registry:~$ sudo fdisk /dev/sdc

Welcome to fdisk (util-linux 2.31.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 0x5ad69206.

Command (m for help): n

Partition type

p primary (0 primary, 0 extended, 4 free)

e extended (container for logical partitions)

Select (default p):

Using default response p.

Partition number (1-4, default 1):

First sector (2048-104857599, default 2048):

Last sector, +sectors or +size{K,M,G,T,P} (2048-104857599, default 104857599):

Created a new partition 1 of type 'Linux' and of size 50 GiB.

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

4. Write a file system to the partition using mkfs

siftuser@docker-registry:~$ sudo mkfs -t ext4 /dev/sdc1

mke2fs 1.44.1 (24-Mar-2018)

Discarding device blocks: done

Creating filesystem with 13106944 4k blocks and 3276800 inodes

Filesystem UUID: 19c887b9-27d6-4e8e-a4d9-ee87d72e02b9

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424

Allocating group tables: done

Writing inode tables: done

Creating journal (65536 blocks): done

Writing superblocks and filesystem accounting information: done

5. Make a DataDirectory

siftuser@docker-registry:~$ sudo mkdir /datadrive

6. Mount the data directory

sudo mount /dev/sdc1 /datadrive