The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HDD won't show up?

Discussion in 'General Discussion' started by element3303, Feb 9, 2013.

  1. element3303

    element3303 Registered

    Joined:
    Feb 9, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello guys,
    I have a server with 2x 500 GB hard drives. I can see the first HDD (look at this picture View lMhu3i.jpg on ScreenSnapr ) but for some reason I can not see the second one. Can you please tell me what to do step by step to add my second drive? Thank you.
     
  2. StephenC

    StephenC Registered

    Joined:
    Jan 8, 2013
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    3
    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!
     
  3. element3303

    element3303 Registered

    Joined:
    Feb 9, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for your answer, here are the results:
    Code:
    root@alpha [~]# 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
    root@alpha [~]# 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
    
    root@alpha [~]#
    
     
  4. StephenC

    StephenC Registered

    Joined:
    Jan 8, 2013
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    3
    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!
     
  5. element3303

    element3303 Registered

    Joined:
    Feb 9, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator

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

    Code:
    root@alpha [~]# 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)
    
    
     
  6. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    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.
     
Loading...

Share This Page