How to use added harddrive

Discussion in 'Linux Virtual Machine' started by EricBrian, Jul 7, 2008.

  1. EricBrian

    EricBrian Junior Member

    Messages:
    10
    So, I ran out of room on my CentOS install. Now, added a 32G virtual hdd to the CentOS install but when I go into my install's Terminal window and type 'df' I don't see the additional harddrive space.

    How do I make use of the added space of the virtual hdd?

    Thanks
     
    Last edited: Jul 7, 2008
  2. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    If you added new drive, you should first create partition
    fdisk /dev/sdb
    then create file system mkfs
    then mount it
     
  3. EricBrian

    EricBrian Junior Member

    Messages:
    10
    Thanks.

    I did the following:

    # su -
    # fdisk /dev/sdb

    However, that resulted in 'Unable to open /dev/sdb.'

    Might it be that on my instance, there is no 'sdb' because it is called something else? If so, what do I look for?
     
  4. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    what is in dmesg, can you see new device?
    Maybe you attached it to chanel 1:0 or 1:1
    try /dev/sdc /dev/sdd
     
  5. EricBrian

    EricBrian Junior Member

    Messages:
    10
    I see:

    hdd
    hdc
    hdb
    hda
     
  6. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    so , did you try them try fdisk on them, I don't know your configuration.
    Perhaps you set CDrom to 0:1, or 1:0
    just use mount, it will show root , and check others
     
  7. EricBrian

    EricBrian Junior Member

    Messages:
    10
    Ok, so I did this now:

    # su -
    # fdisk /dev/hdd (and selected 'w')
    # mkfs /dev/hdd

    Now, how do I mount this? I tried this:

    # mount /dev/hdd

    But that resulted in:
    mount: can't find /dev/hdd in /etc/fstab or /etc/mtab

    Thanks
     
  8. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    sudo mkdir /somedir
    sudo mount /dev/hdd /somedir
    or edit /etc/fstab and add option to mount at startup
     
  9. EricBrian

    EricBrian Junior Member

    Messages:
    10
    Great. This worked! :)

    Thank you John.
     

Share This Page