LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2012, 11:07 PM   #1
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Rep: Reputation: Disabled
Partitioning for Raid 5


I'm having issues trying to partition 4x 1tb harddrives. I booted in to the usb linux, tried "Everything Else" and selected the drives individually to partition, but then it gives me an error. Since I already have a OS drive (80gb drive son /sde/sde1), I don't actually want to install ubuntu again.

I would prefer to do it in bash, but I can't seem to find a HOWTO with clear directions. Any suggestions?
 
Old 08-09-2012, 12:17 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As root
Code:
cat /etc/*release*

df -h

# lowercase L option switch here
fdisk -l
That will get the basic info.
You'll want eg

1. background info concepts https://raid.wiki.kernel.org/index.php/Linux_Raid
2. HOWTO http://www.linuxhomenetworking.com/w...re_RAID#RAID_5

Last edited by chrism01; 08-09-2012 at 12:18 AM.
 
Old 08-09-2012, 01:40 AM   #3
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
at fdisk -l, this was the return:

Quote:
root@evocati-desktop:/home/evocati# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table

[...]
This continues on with the other three disks.

Also:
Quote:
evocati@evocati-desktop:~$ sudo -H -s
[sudo] password for evocati:
root@evocati-desktop:/home/evocati# cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
root@evocati-desktop:/home/evocati# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sde1 67G 3.5G 60G 6% /
udev 3.9G 4.0K 3.9G 1% /dev
tmpfs 1.6G 944K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 76K 3.9G 1% /run/shm
[...]

Last edited by Evocati; 08-09-2012 at 01:51 AM. Reason: display cat /etc/*release*
 
Old 08-09-2012, 09:49 AM   #4
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
root@evocati-desktop:/home/evocati# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x96ba8f41

Device Boot Start End Blocks Id System
/dev/sda1 2048 1953525167 976761560 b W95 FAT32

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009745c

Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953523711 976760832 b W95 FAT32

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00070991

Device Boot Start End Blocks Id System
/dev/sdc1 2048 1953523711 976760832 b W95 FAT32

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0bbe68ef

Device Boot Start End Blocks Id System
/dev/sdd1 2048 1953525167 976761560 b W95 FAT32

Disk /dev/sde: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000962e4

Device Boot Start End Blocks Id System
/dev/sde1 * 2048 139599871 69798912 83 Linux
/dev/sde2 139601918 156301311 8349697 5 Extended
/dev/sde5 139601920 156301311 8349696 82 Linux swap / Solaris
root@evocati-desktop:/home/evocati#
Got it. Thanks for your help! I was exhausted lastnight... and frustrated after 4 days.
 
Old 08-09-2012, 09:45 PM   #5
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
So I managed get everything partitioned, awesome, but now it's giving me a wierd error.

Quote:
root@evocati-desktop:/home/evocati# mdadm --create --verbose /dev/md0 --level=5 \ --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm: only give one device per ARRAY line: /dev/md/Server and 1
mdadm: no raid-devices specified.
How do I handle that? I looked for it online, but I can't seem to find a answer.

Suggestions?
 
Old 08-09-2012, 11:56 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think the implications of this page http://linux.die.net/man/8/mdadm (both syntax defn & examples) imply that the /dev/mdX name should come immediately after the -C
Code:
# also, use a single long line (ie no '\') & short circuit dev names
mdadm --create /dev/md0 --verbose --level=5 --raid-devices=4 /dev/sd{a,b,c,d}1
 
1 members found this post helpful.
Old 08-11-2012, 01:36 AM   #7
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Wwwooootttt!!! Thanks!!
 
Old 08-11-2012, 06:43 PM   #8
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
So, that all worked (YAY!), but after I managed to get the network set up and mapped in to windows, I saw that it was only 800gb. so with a simple cat /proc/mdstat:

Code:
root@evocati-desktop:/home/evocati# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md127 : active raid5 sda1[0] sdc1[2] sdd1[4] sdb1[1]
      2930280960 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      
unused devices: <none>
root@evocati-desktop:/home/evocati#
Any idea why there's an issue with the size not showing correctly in properties?
 
Old 08-12-2012, 05:25 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Tricky to say; did you fdisk those to stay as FAT32, or as Linux RAID : partition type fd in fdisk ?
http://www.win.tue.nl/~aeb/partition...n_types-1.html
Try
Code:
fdisk -l
to check as above.
Note that RAID5 'loses' 1 disk for parity https://en.wikipedia.org/wiki/Standa..._levels#RAID_5 and when you mkfs.ext3 (or mkfs.ext4), you 'lose' 5% reserved to root/OS usage.
You can amend that at the mkfs time http://linux.die.net/man/8/mkfs.ext3 or later with tune2fs http://linux.die.net/man/8/tune2fs
 
Old 08-12-2012, 06:16 PM   #10
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Tricky to say; did you fdisk those to stay as FAT32, or as Linux RAID : partition type fd in fdisk ?
http://www.win.tue.nl/~aeb/partition...n_types-1.html
Try
Code:
fdisk -l
to check as above.
Note that RAID5 'loses' 1 disk for parity https://en.wikipedia.org/wiki/Standa..._levels#RAID_5 and when you mkfs.ext3 (or mkfs.ext4), you 'lose' 5% reserved to root/OS usage.
You can amend that at the mkfs time http://linux.die.net/man/8/mkfs.ext3 or later with tune2fs http://linux.die.net/man/8/tune2fs
They're 1tb harddrives, so they should come out to roughly 3tb when in Raid 5. After some perusing, I've found that it's most likely that I'm running 64 bit and the kernel doesn't have large block support incorporated. Now, I have to figure out how to add large block support in. Why isn't that standard, I wonder.


Also:
Code:
evocati@evocati-desktop:~$ sudo fdisk -l
[sudo] password for evocati: 

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d85e0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1953525167   976761560    b  W95 FAT32

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xcd5266e8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  1953525167   976761560    b  W95 FAT32

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6c8d855f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  1953525167   976761560    b  W95 FAT32

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001417d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048  1953525167   976761560    b  W95 FAT32

Disk /dev/sde: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000962e4

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *        2048   139599871    69798912   83  Linux
/dev/sde2       139601918   156301311     8349697    5  Extended
/dev/sde5       139601920   156301311     8349696   82  Linux swap / Solaris

WARNING: GPT (GUID Partition Table) detected on '/dev/md0'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/md0: 3000.6 GB, 3000607703040 bytes
2 heads, 4 sectors/track, 732570240 cylinders, total 5860561920 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes
Disk identifier: 0x00000000

    Device Boot      Start         End      Blocks   Id  System
evocati@evocati-desktop:~$

Last edited by Evocati; 08-12-2012 at 06:17 PM.
 
Old 08-15-2012, 09:08 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'm not sure how mdadm will handle MS FAT32 disks and in any case you are limited by FAT32 itself, which is very old(!) tech and will not address that size of disk I believe.
Why don't you use a native Linux FS eg ext3/ext4?
If you want to mount this afterwards from MSWin, there are drivers for ext3 under MS I believe, or (better) use network mounting via Samba or NFS.

Actually, the disk partition types need to be set to 'fd' = Linux RAID.
ext3/ext4 is the Filesystem type.

Last edited by chrism01; 08-15-2012 at 09:10 PM.
 
Old 08-16-2012, 02:00 PM   #12
Evocati
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
I managed to get this all working last weekend. As it turns out, if you just use an EXT4 partition on the raid and a Fat32 (or MSDOS w/e) on the drives themselves with a GPT selection, it works just fine. I had some issues getting things cleaned up, but once I was able to get the system to recognize the full raid size, I was golden.

Now, I'm needing to go through and clean out the auto-mount fstab file so it stops pausing during boot and then change the raid name so it isn't some long list of numbers/letters... that's annoying. I'd prefer to have it auto-mount with a particular name so the rest of the comps can connect to it immediately.

One odd thing is that one of the machines keeps having connectivity issues and dropping the connection. I've heard that that's been an issue, but I figured it was resolved. I'll have to get a screen shot the next time it happens.

Either way, I now have 4Tb+ on a network. Yay. (2.73Tb WD Black Raid5 + 1.8Tb WD Green solo)


Lastly, I didn't want to have to fool with the windows boxes incase there were something I needed to do to them. I wanted something that you could just plug a computer in to the router and be able to communicate with it immediately. The drivers seemed like one more thing to remember to get if I were to do a wipe.

Last edited by Evocati; 08-16-2012 at 02:03 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble after partitioning with linux raid pherako Linux - Server 5 06-02-2012 06:11 PM
[SOLVED] Partitioning a RAID drive? djspits Linux - Newbie 1 11-19-2010 01:46 AM
partitioning a RAID array with kernel 2.6.26 garydale Linux - Server 2 09-07-2010 11:40 AM
Partitioning: Where to mount raid 0 musicman_ace Linux - Hardware 1 05-11-2004 05:34 PM
raid partitioning guest Linux - Newbie 1 03-15-2004 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration