Block storage with cPanel

Rens

Member
Nov 5, 2018
9
1
1
Tilburg
cPanel Access Level
Root Administrator
Hey all,

I bought some block storage at my VPS company Hetzner.
They gave me this instruction for adding it to my vps.
But how to use it with cPanel? Anyone who can help me?
Configure volume

To configure your volume, use the following commands on your server.

FORMAT VOLUME
sudo mkfs.ext4 -F /dev/disk/by-id/scsi-0HC_Volume_1232690

CREATE DIRECTORY
mkdir /mnt/home2

MOUNT VOLUME
mount -o discard,defaults /dev/disk/by-id/scsi-0HC_Volume_1232690 /mnt/home2

The volume is now accessible at /mnt/home2 for data storage.

I named it home2 because i readed it on this forum but it won't work when i rearrange an account.

Greetings,
Rens
 

Rens

Member
Nov 5, 2018
9
1
1
Tilburg
cPanel Access Level
Root Administrator
I did these commands:

ORMAT VOLUME
sudo mkfs.ext4 -F /dev/disk/by-id/scsi-0HC_Volume_1232690

CREATE DIRECTORY
mkdir /home2

MOUNT VOLUME
mount -o discard,defaults /dev/disk/by-id/scsi-0HC_Volume_1232690 /home2

Still no new disk found, see
Schermafbeelding 2018-11-05 om 18.56.09.png
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,760
314
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Yeah, its not mounted at all, otherwise it would show up in there.

I would adjust your /etc/fstab file so that it includes that volume in there (otherwise it won't mount at boot time) and try mounting it again.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,760
314
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
/dev/disk/by-id/scsi-0HC_Volume_1232690
Also, this in general does not look right at all. I would use

ll /dev/disk/by-uuid/

The uuid you find in that folder when adding to your fstab.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,760
314
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Your /etc/fstab should get a line added that looks like this

UUID=8ba4095a-7cdd-470c-803f-fd2b25dafa49 /home2 ext4 defaults,uquota 1 1

Though your UUID should be different.
 

Rens

Member
Nov 5, 2018
9
1
1
Tilburg
cPanel Access Level
Root Administrator
Also, this in general does not look right at all. I would use

ll /dev/disk/by-uuid/

The uuid you find in that folder when adding to your fstab.
cPanel sees the disk when i migrate a user i get this error how to fix?
The “Account” restore module failed because of an error: Failed to create the account: Unable to add user mensenkn: add_system_user failed due to an error: (XID n5nsb6) The system failed to create the directory “/mnt/home2/mensenkn” because of an error: Read-only file system at /usr/local/cpanel/Whostmgr/Accounts/Create.pm line 1364.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,760
314
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
That would imply its trying to create it in /mnt which is wrong, and that the drive is read-only which also is a problem.

You may have to contact your provider for more assistance.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
I'd like to chime in here and note that I would definitely contact your provider about this. They should be able to provide some assistance with ensuring that the server is set up properly.


Thanks!