StephenC

Registered
Jan 8, 2013
4
2
78
cPanel Access Level
Root Administrator
Howdy,

Login via ssh as the root user, and paste the outputs of these two commands into this post.

First:

df -h

Then:

fdisk -l

From here we'll know if the drives are recognized.

Thanks!
 

element3303

Registered
Feb 9, 2013
3
0
1
cPanel Access Level
Root Administrator
Howdy,

Login via ssh as the root user, and paste the outputs of these two commands into this post.

First:

df -h

Then:

fdisk -l

From here we'll know if the drives are recognized.

Thanks!
Thank you for your answer, here are the results:
Code:
[email protected] [~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/sys--XLIK-root
                      447G   11G  414G   3% /
tmpfs                 3.9G     0  3.9G   0% /dev/shm
/dev/sda1              97M   79M   14M  86% /boot
/dev/mapper/sys--XLIK-tmp
                      2.0G   68M  1.9G   4% /tmp
/dev/mapper/sys--XLIK-vartmp
                      2.0G   68M  1.9G   4% /var/tmp
[email protected] [~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00094651

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        1033     8192000   82  Linux swap / Solaris
/dev/sda3            1033       60802   480091136   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b417b

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/mapper/sys--XLIK-root: 487.3 GB, 487311015936 bytes
255 heads, 63 sectors/track, 59245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/sys--XLIK-vartmp: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/sys--XLIK-tmp: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[email protected] [~]#
 

StephenC

Registered
Jan 8, 2013
4
2
78
cPanel Access Level
Root Administrator
Howdy,

I'm guessing the 2nd 500GB is the drive you're wanting to use? It currently is device sdb, located at /dev/sdb. It looks like it currently does not have any partitions, so we will have to create a partition and then format it.

To create a partition run this command:

Code:
# fdisk /dev/sdb
This will launch fdisk modifying only drive sdb. When in fdisk, first you will want to use the letter "n" to create a new partition. It will prompt a few options that you will select. If you want to use the whole drive, then most likely you can just hit enter to get through all of this, but I do suggest reading the prompts before continuing.

After you finish this, and you're returned to the input line, you would then use the letter "w" to write these changes to the partition and exit fdisk. This is the step that will save the changes to the disk. It could take a few moments to run.

From here, you want to format the partition we just created. (this too may take a few moments):

Code:
# mkfs.ext3 /dev/sdb1
From here, we'll make the directory we would like the hard drive to be mounted on, then mount it:

Code:
# mkdir /home2
# mount /dev/sdb1 /home2
# df -H
The last df -h code, should now show sdb1 mounted to home. If so, we're good to go on. If not, you probably had some errors somewhere that we'll want to take a look at

After verifying the drive was mounted, we'll add it to /etc/fstab so it always mounts. Something like this:

Code:
# vi /etc/fstab
Then add:
Code:
/dev/sdb1               /home2           ext3    defaults        1 2

Save the file and close, and you should be good to go. Please keep me updated on how it turns out.

Thanks!
 

element3303

Registered
Feb 9, 2013
3
0
1
cPanel Access Level
Root Administrator
Howdy,

I'm guessing the 2nd 500GB is the drive you're wanting to use? It currently is device sdb, located at /dev/sdb. It looks like it currently does not have any partitions, so we will have to create a partition and then format it.

To create a partition run this command:

Code:
# fdisk /dev/sdb
This will launch fdisk modifying only drive sdb. When in fdisk, first you will want to use the letter "n" to create a new partition. It will prompt a few options that you will select. If you want to use the whole drive, then most likely you can just hit enter to get through all of this, but I do suggest reading the prompts before continuing.

After you finish this, and you're returned to the input line, you would then use the letter "w" to write these changes to the partition and exit fdisk. This is the step that will save the changes to the disk. It could take a few moments to run.

From here, you want to format the partition we just created. (this too may take a few moments):

Code:
# mkfs.ext3 /dev/sdb1
From here, we'll make the directory we would like the hard drive to be mounted on, then mount it:

Code:
# mkdir /home2
# mount /dev/sdb1 /home2
# df -H
The last df -h code, should now show sdb1 mounted to home. If so, we're good to go on. If not, you probably had some errors somewhere that we'll want to take a look at

After verifying the drive was mounted, we'll add it to /etc/fstab so it always mounts. Something like this:

Code:
# vi /etc/fstab
Then add:
Code:
/dev/sdb1               /home2           ext3    defaults        1 2

Save the file and close, and you should be good to go. Please keep me updated on how it turns out.

Thanks!

Thank you very much! However when I click at enter it shows the same, let me show you:

Code:
[email protected] [~]# fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)

Command action
   e   extended
   p   primary partition (1-4)
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
At this point, you really need to ask your data center for help. Installing, partitioning, formatting and mounting is the responsibility of your data center, and they should be able to correctly partition, format and mount the second hard drive so that it is available for your use.

You will lose data if you make a mistake in running fdisk at this point.

fdisk will not prompt you or give you a second chance if you inadvertently make a wrong selection and will destroy data if you give it bad input.

Partitioning a hard drive is something you need to be extremely careful with, and if you are not familiar with the process, you need to let your data center do it for you. There is great risk of losing all of your data if you make a mistake, and no way to retrieve the data once lost.

You should also make backups of your accounts before asking your data center for help, and store those backups somewhere other than on the server. This is a good practice in general, not just before making partition-altering changes that carry with them a real and imminent danger of data loss if done incorrectly.