Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: RAID-5, fdisk and unable to partion?

  1. #11
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,775
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: RAID-5, fdisk and unable to partion?

    Very weird. I wonder if that fat32 is a left over. It shouldn't say ext4, because the filesystem is created on md0, not on sdb1/sdc1/sdd1.

    For raid partitions, the parted printed listing should show the number of the partition, start/end/size, primary/logical (for msdos tables) and flags. No filesystem actually. You will also see that in my screenshot later.

    Another thought, you can actually use gpt tables on the 2TB disks even though you don't need to. For larger than 2.2GB you have to, but with 2TB you can still do msdos like you have.

    But many people say gpt has some advantages. Note that if you do decide to do this, it's best to create small 1MiB partition with NO filesystem (don't format it with anything, that's very important) so that grub2 can use it if you even want to add it on the MBR. This is because on gpt disks the MBR is smaller compared to msdos and grub2 can't fit. That partition needs a flag bios_grub and with that flag grub2 knows to use it, without filesystem.

    I usually use parted to create it since parted by default doesn't create a filesystem. On a new disk, making a clan gpt table, you would do for example:
    Code:
    sudo parted /dev/sdX #(select the correct disk you want to manipulate)
    unit MiB #(change unit to easily create partition of exactly 1MiB)
    mklabel gpt #(new blank gpt table)
    mkpart GRUB 1 2
    set 1 bios_grub on #(set the flag of partition #1 to On)
    quit
    Before exiting parted you can continue doing partitions for the raid, and marking them with the raid flag too.

    The syntax of mkpart for gpt tables is:
    mkpart <label> <start> <end>

    With gpt you have no primary/logical, so instead of specifying the type, you specify label. Using precise start/end you have excellent control where you want partitions created.

    Always leave the first 1MiB free (unpartitioned), that's a standard these days.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  2. #12
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,775
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: RAID-5, fdisk and unable to partion?

    OK, here it is. I attached two images, first one is parted listing and the second is the fstab.

    As you can see, I have two 2TB disks for raid1 and I used gpt table on them (msdos would have worked too for 2TB disks). Since I used gpt and want to have grub2 on the MBRs, as first partition on both disks I created a 1MiB partition with no filesystem and with the bios_grub flag active. Note in the parted listing that sda1 and sdb1 don't have filesystem.

    After that, since I wanted 15GiB / partition and the rest for /data, I created 15GiB sda2 and sdb2 partitions with the raid flag (again, no need to create filesystem on them).

    The rest of the big space goes to sda3 and sdb3 which will be the big device for /data, except 2GiB at the end for swap.

    I decided not to put swap on the array, instead to use the partitions directly, that's why parted shows sda4 and sdb4 as linux-swap filesystem.

    If you look at the parted listing for md0 and md1, this is where you can see the ext4 filesystem because /dev/md0 and /dev/md1 are formatted, not sda2, sdb2, etc.

    I also posted the fstab so you can see the md0 entry for /, md1 for /data and both swap partitions which are used in paralel.

    You need as many physical partitions as you want different mount points. You will have to create separate mdX devices for each mount point.

    Another alternative, is to have a single md0 device and use LVM so that you can create several LVs. But as mentioned, LVM will add another layer, and there is really no great benefit.
    Attached Images Attached Images
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  3. #13
    Join Date
    Jan 2009
    Beans
    22

    Re: RAID-5, fdisk and unable to partion?

    Thank you so much for all the help, and I have everything working now which is awesome.
    I did not make it GPT, maybe I will regret it later, but I don't think so, although everything else is up to speed. Thanks once again.

  4. #14
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,775
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: RAID-5, fdisk and unable to partion?

    No problem, msdos still works for 2TB. Glad you got it going.

    Please support my memebership application, the link is in my signature.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

Page 2 of 2 FirstFirst 12

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
  •