Results 1 to 10 of 10

Thread: Use of all HDD on Ubuntu Server Edition 9.10

  1. #1
    Join Date
    Mar 2010
    Beans
    24

    Wink Use of all HDD on Ubuntu Server Edition 9.10

    Hello

    On my home-server i have got three hard drives, but i only use one of them.
    I was wondering if anyone knew a guide, how to get use of the two other HDD?

    Thanks in advance

  2. #2
    Join Date
    Aug 2006
    Beans
    171

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    you can set up a link in your fstab.(do a search on fstab to find a bunch of howto's) once you create a mountpoint, you will be able to access your other drives.

  3. #3
    Join Date
    Mar 2010
    Beans
    24

    Smile Re: Use of all HDD on Ubuntu Server Edition 9.10

    Thanks!
    I'm gonna google it right away! :D

  4. #4
    Join Date
    Mar 2009
    Location
    Cork, Ireland
    Beans
    239
    Distro
    Ubuntu Development Release

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    If you like, I'll write a quick guide to mounting another drive on Ubuntu Server

    First, you need to find what your drive names are. Run

    Code:
    sudo fdisk -l
    and take a note of the drive names, and partition numbers of the drive you want to mount. This would be something like /dev/sdb1 or /dev/sdc3. If there are no partitions, you'll need to create some with fdisk.

    Now, create a mountpoint for your drive. You can make it whatever you want, but a common place to mount things is in the /mnt dir. Create a folder there with

    Code:
    sudo mkdir mount_name
    Of course, you can have "mount_name" as whatever you want.

    Finally, after that, we can try to mount the drive to the folder. If the partition you want to access is called /dev/sdb1 the command would be this

    Code:
    sudo mount -t auto -v /dev/sdb1 /mnt/mount_name
    The -t option is the filesystem type. Since we don't know it, leave it to auto and let the mount command figure it out. The -v option is for verbosity, and with luck, should show something like this.

    Code:
    mount: you didn't specify a filesystem type for /dev/sdb1
           I will try type vfat
    /dev/sdb1 on /mnt/mount_name type vfat (rw)
    Now we know that the filesystem is vfat. It could also be ntfs-3g, ext3, ext4 or a few others.

    Before we proceed, unmount the drive we just mounted with

    Code:
    sudo umount /dev/sdb1
    You don't want to manually mount the drive everytime you boot up the server no? In that case, let's set it up to mount automatically on boot.

    You need to edit you fstab file. The options here vary quite a bit, so this guide will be very useful. The following is just an example.

    Edit the file using Nano

    Code:
    sudo nano /etc/fstab
    As a general rule of thumb, assuming that /dev/sdb1 was an NTFS partition, you would add a line like this to the end of the file. The line with the # in front is commented out, and is just there for your own reference.

    Code:
    #Write whatever comment you want
    /dev/sdb1 /mnt/mount_name ntfs-3g defaults,uid=1000,umask=0 0 0
    UID is your user id. If your the first user created, this will most likely be 1000.

    For a Linux partition, the line would be a bit simpler.

    Code:
    #Write whatever comment you want
    dev/sdb1 /mnt/mount_name ext4 defaults 0 0
    Finally exit and save the file with Ctrl+X, press Shift+Y and then Enter.

    Test that your fstab line is correct by trying to mount it.

    Code:
    sudo mount /dev/sdb1 -v
    It should tell you that it has been successfully mounted.

    That's it. You may have to change the permissions of the mounted drive to allow you to read/write to it, but that's as simple as running

    Code:
    sudo chmod -Rv 777 /mnt/mount_name
    followed by

    Code:
    sudo chown -R you_user_name /mnt/mount_name
    That will change the permissions to 777 (Full access to everyone) and list every file as being owned by you.

    If you want help creating new partitions with fdisk, or even creating a software RAID with your two harddrives, I can give you a hand with that
    Last edited by The Real Dave; March 14th, 2010 at 11:17 AM.
    Acer Aspire T650, 3GHz PIV 1.4Gb RAM ATi Radeon Xpress 200
    320+80GB SATA Ubuntu 9.10 Karmic x86_64 Windows XP Home SP3

    Linux Expresso - Now featuring videos of my systems!

  5. #5
    Join Date
    Mar 2010
    Beans
    24

    Smile Re: Use of all HDD on Ubuntu Server Edition 9.10

    Thank you very much!

    That guide was very helpful indeed

  6. #6
    Join Date
    Mar 2009
    Location
    Cork, Ireland
    Beans
    239
    Distro
    Ubuntu Development Release

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    Quote Originally Posted by ipng View Post
    Thank you very much!

    That guide was very helpful indeed
    I'm glad it was useful I remember how impossible stuff like that seemed when I first started off lol
    Acer Aspire T650, 3GHz PIV 1.4Gb RAM ATi Radeon Xpress 200
    320+80GB SATA Ubuntu 9.10 Karmic x86_64 Windows XP Home SP3

    Linux Expresso - Now featuring videos of my systems!

  7. #7
    Join Date
    Mar 2010
    Beans
    24

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    Yeah, sometimes things seems very impossible, for an Ubuntu newbie like me
    But i was wondering... Can you help me repartition one of my linux partition? I really want to delete all the files on one of my HDD, but i really don't know how! I've tried to Google it, but the only thing i could find was an idea of using the Ubuntu Live CD (For the desktop edition), and partition the following HDD you want to delete. Is this possible?
    Thanks for your kindness
    p.s. what is a software RAID? - my guess is a way, to make two HDD into one virtual, is that right? - Best regards

  8. #8
    Join Date
    Jul 2008
    Beans
    10

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    Warning: The stuff I'm about to suggest may cause data loss if applied incorrectly.

    Use the command "mount" to find out which partitions are already being used. Use "sudo fdisk -l" to find out which partitions you have. From that, figure out which partitions you want to delete. If you can't figure it out, post the output of those commands and someone can probably help.

    Okay, so you've done this, and as an example I'm going to assume that you want to delete /dev/sdb3, /dev/sdb2, and the entire /dev/sdc. You will need to edit this as appropriate!

    Code:
    sudo fdisk /dev/sdb
    The commands most useful are: p will print the current table, d will prompt you for a partition to delete, w will write the altered table and exit. So: enter d, enter, at the prompt say 2. Repeat for 3. You now have a bunch of empty space. Enter n for new. It will ask for the number of the partition to make, try 2. It will suggest start and end values based around the empty space, you can use those or subdivide further. After you create the new partition, use the command t and enter 83 as the type when prompted, to identify these partitions as being linux.

    When done, enter p first. Check that the partitions you wanted to retain are still there, with the same start and end cylinders. If all's well, do w. Do the same for /dev/sdc, only deleting all the existing partitions and making a new sdc1 that comprises the whole disk.

    Once you're done, you need to format the new disks:

    Code:
    sudo mkfs.ext3 /dev/sdb2
    Repeat for the others. Now you can mount them as per earlier post.

    An easier way to partitioning is to boot the Ubuntu LiveCD and use the graphically-based tools available there.

  9. #9
    Join Date
    Mar 2009
    Location
    Cork, Ireland
    Beans
    239
    Distro
    Ubuntu Development Release

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    The above post is perfect for creating a new partition.

    You can also change

    Code:
    sudo mkfs.ext3 /dev/sdb2
    to

    Code:
    sudo mkfs.ext4 /dev/sdb2
    to format the partiton as ext4.

    Software RAID in Ubuntu is done with a program called Mdadm. With Mdadm, you can create various RAIDs. The Wikipedia page on RAIDs is a good way to explain what they can do.

    Here's a nice guide on setting up a software RAID in Ubuntu
    Acer Aspire T650, 3GHz PIV 1.4Gb RAM ATi Radeon Xpress 200
    320+80GB SATA Ubuntu 9.10 Karmic x86_64 Windows XP Home SP3

    Linux Expresso - Now featuring videos of my systems!

  10. #10
    Join Date
    Mar 2010
    Beans
    24

    Re: Use of all HDD on Ubuntu Server Edition 9.10

    "The Real Dave" - thanks for spendig time on my problem - your guides and links was me very helpful! - THANKS!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •