Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Trying to ¨start over¨ and following this guide:

I used fdisk and mdadm to create a raid 5, and I believe I should have used 4096 size.

Following those instructions I get: GNU Parted 2.3 Using /dev/md0 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt
Warning: The existing disk label on /dev/md0 will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes
(parted) unit s
(parted) mkpart primary 2048s 100%
Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel?

I stopped at that point because I need to realign. Here is fdisk info:

Disk /dev/md0: 3000.2 GB, 3000211537920 bytes 255 heads, 63 sectors/track, 364754 cylinders, total 5859788160 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 65536 bytes / 196608 bytes Disk identifier: 0x00000000

Device Boot      Start         End      Blocks   Id  System

/dev/md0p1 1 4294967295 2147483647+ ee GPT Partition 1 does not start on physical sector boundary.

My goal is to set this drive up right, and mount it so I know that I can start transferring files that I plan to store. I set up the raid and let it build before, then used Samba to set up a share. I transferred files with my Windows machine over. I turned everything off and the network link was no longer valid in Windows. That is when I backtracked and started getting alignment errors.

This is my first server, btw. Trying to get this drive shared permanently each time I boot/reboot.

------- EDIT --------------- So I am still confused if I have selected the correct size for my array.

Also, I have tried to add to fstab but I am not sure what (options) to use.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You don't need to realign the partitions on the individual disks. If you want to create partitions in the raid array, then they have a much higher alignment requirement depending on the stripe size of the raid array. Parted is warning you because you explicitly asked for the partition to start on sector 2048, which is not properly aligned. Since you are just creating a single partition using 100% of the array, it doesn't make sense to partition the array in the first place, so don't bother.

If you do want to subdivide the array, then the best way to do so is with lvm.

share|improve this answer
Thanks for taking the time to answer me. What steps do I need to always have access to this 3.0TB drive when my server is turned on. I was under assumption I mount it once and set up a Samba share for the location. – skidawgz Mar 24 '14 at 22:45
@skidawgz, you need to add an entry to /etc/fstab to have it automatically mounted at boot time. – psusi Mar 25 '14 at 1:33
Is my sector size correct? I am not sure what options to use when editing fstab. – skidawgz May 11 '14 at 1:27
@skidawgz, no idea what you mean; sector size doesn't come into it. – psusi May 11 '14 at 3:03
I have on /dev/md0 sector size (logical/physical): 512 / 4096 bytes..... That is my software RAID5 and I am not sure if i built the raid correctly. I followed a youtube video. Do logical and physical need to match? What is the most efficient sector size? – skidawgz May 11 '14 at 3:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.