Author Topic: Advice About Raid Cards And Large Hard Drives.  (Read 2026 times)

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 638
  • I Only 'Clean' Windows !.
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #15 on: June 23, 2012, 06:40:22 AM »
Is your RAID card and actual, hardware RAID card?  If so, you should be able to go into the BIOS of the card (access during boot, usually after the the BIOS is finished initializing), and setup the RAID configuration there.  After that, they should appear as a single device to any OS, and you just create your file system, etc, etc.

If it isn't a "true hardware RAID" card (many consumer-grade RAID cards are essentially just multiple controllers, that use software to build the RAID configuration), then, yes, you will use mdadm to build the set.


I got this card from Amazon uk
http://www.amazon.co.uk/Neewer-Serial-Adapter-SIL3114-Cables/dp/B0058M903S/ref=sr_1_sc_1?ie=UTF8&qid=1340454590&sr=8-1-spell

I did set it up in the Bios and created a 'Logical' drive 'Sil Raid1set'
But I can not see that in 'Dolphin'  only see two 1.8TB drives !.
 
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #16 on: June 23, 2012, 09:45:48 AM »

I did set it up in the Bios and created a 'Logical' drive 'Sil Raid1set'
But I can not see that in 'Dolphin'  only see two 1.8TB drives !.
 

Once configured as RAID1, the two drives should look to the OS as a single drive.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 638
  • I Only 'Clean' Windows !.
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #17 on: June 25, 2012, 04:34:15 AM »
After 11 hours to create the raid I hope this looks ok.


[root@localhost ~]# mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Sun Jun 24 22:09:48 2012
     Raid Level : raid1
     Array Size : 1953513408 (1863.02 GiB 2000.40 GB)
  Used Dev Size : 1953513408 (1863.02 GiB 2000.40 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon Jun 25 09:48:34 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 8e1d6643:1239dd50:bfe78010:bc810f04 (local to host localhost.localdomain)
         Events : 0.18

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
[root@localhost ~]#



Now I have Three 1.8TB drives showing in Dolphin :(

Edit .. I have just re-booted, now I have No storage drives showing in Dolphin !
How do I get the storage one showing ?.


Edit2... The drive shows up in pcc>diskdrake as..

 Device: md0
Type: Journalised FS: XFS
Size: 1.8TB
Formatted
Level 1
Chunk size 64 KiB
RAID-disks sdb1, sdc1


I have added the details in 'fstab'

# Entry for raid added
UUID=8e1d6643-1239dd50-bfe78010-bc810f04 /raid1 xfs noatime,rw 0 0
#/dev/md0 /raid1 xfs noatime,rw 0 0
# Entry for /dev/sda1 :
UUID=09db2276-132f-4593-9e1c-e3da366b317a / reiserfs defaults 1 1
# Entry for /dev/sda6 :
UUID=9a88e253-64bc-4343-b360-c523f6085d56 /home reiserfs defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=3e74b30c-2f7f-44b2-b133-163e83af8f2e swap swap defaults 0 0
none /dev/pts devpts defaults 0 0


« Last Edit: June 25, 2012, 01:59:33 PM by pclinmike »
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 638
  • I Only 'Clean' Windows !.
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #18 on: June 25, 2012, 03:14:05 PM »
Found a problem, but not sure how to fix it.


[root@localhost ~]# fdisk -l

Disk /dev/sda: 7948 MB, 7948206080 bytes
255 heads, 63 sectors/track, 966 cylinders, total 15523840 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: 0x00085ba0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    10233404     5115678+  83  Linux
/dev/sda2        10233405    15518789     2642692+   5  Extended
/dev/sda5        10233468    10426184       96358+  82  Linux swap / Solaris
/dev/sda6        10426248    15518789     2546271   83  Linux

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00045fe6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907028991  1953513472   83  Linux

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000348a1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907028991  1953513472   83  Linux

Disk /dev/md0: 2000.4 GB, 2000397729792 bytes
2 heads, 4 sectors/track, 488378352 cylinders, total 3907026816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
[root@localhost ~]#
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #19 on: June 26, 2012, 11:18:08 PM »

Disk /dev/md0: 2000.4 GB, 2000397729792 bytes
2 heads, 4 sectors/track, 488378352 cylinders, total 3907026816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
[root@localhost ~]#


I wonder if the difference in Sector size (logical/physical): 512 bytes / 4096 bytes is causing a problem? Although I see sdb1 and sdc1 have the same layout without an error warning. From what I've read so far, using and creating logical volumes should not be a problem on /dev/md0, althought I'd be leery of partitioning like that.

I'm going to create a soft RAID1 comparable to yours (but much smaller) and see what happens.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 638
  • I Only 'Clean' Windows !.
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #20 on: June 28, 2012, 03:16:48 AM »
Hi.

Just going over in my mine the steps I took, this one rings alarm bells.

When I got to # mkfs -t XFS /dev/md0       it came up with             "Warning file system already on disk" ! 
I just did nothing and went to the next stage.

Because you said that that FAT 32 was not suitable I formatted the disks to XFS file system BEFORE I started to grow the raid !.

I think I will re look at that tonight.
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 638
  • I Only 'Clean' Windows !.
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #21 on: June 29, 2012, 03:37:45 PM »
mkfs -t xfs /dev/md0 , formatted it again and it now takes live data  ;D

It shows up as /raid1 not as a drive icon on the LHS in Dolphin (but I have made a link to it with a icon !).

/raid1 has got root/root permissions, now if I'm going to add backups via 'Luckybackup Super User' should I leave them as such  ?.
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Advice About Raid Cards And Large Hard Drives.
« Reply #22 on: June 30, 2012, 05:56:30 PM »
Mike, sorry I didn't get back to you sooner.


/raid1 has got root/root permissions, now if I'm going to add backups via 'Luckybackup Super User' should I leave them as such  ?.


Root's ownership of the directory/mountpoint won't matter. What will be of importance are the user/group/other's access permissions. If you are just going to store backups there, then it's enough for root user to have read, write and execute privileges. In other words, 750, or drwxr-x---. However, if you are going to use it as a data repository for all users, you can set the /raid1 directory's permissions to 777, or drwxrwxrwx. Create a folder for each user and limit access to that folder to that one user and group. For example, /raid/user1 would be 750, or drwxr-x---. It depends on how you're going to use the md0 partition.

I spent a couple of days trying to get something working for an LVM GUI like RHEL uses, but no luck, so far. I partially replicated your setup, apart from not having the same hardware as yours. I set up a software RAID1 using two 10GB HDs. Started by creating sdb1 and sdc1 partitions with fdisk.

Code: [Select]
[root@localhost ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     2088449     1044193+  82  Linux swap / Solaris
/dev/sda2         2088450    16771859     7341705   83  Linux

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
[root@localhost ~]# fdisk /dev/sdb

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):
Using default value 20971519

Command (m for help): p

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    20971519    10484736   83  Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# fdisk /dev/sdc

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):
Using default value 20971519

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    20971519    10484736   fd  Linux raid autodetect

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     2088449     1044193+  82  Linux swap / Solaris
/dev/sda2         2088450    16771859     7341705   83  Linux

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    20971519    10484736   fd  Linux raid autodetect

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    20971519    10484736   fd  Linux raid autodetect
[root@localhost ~]#

Next, I created the RAID1 array and formatted /dev/md0 as xfs.

Code: [Select]
[root@localhost ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: array /dev/md0 started.
[root@localhost ~]# mkfs.xfs /dev/md0
meta-data=/dev/md0               isize=256    agcount=4, agsize=655292 blks
         =                       sectsz=512   attr=2, projid32bit=0
data     =                       bsize=4096   blocks=2621168, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@localhost ~]#

Check the results with fdisk again.

Code: [Select]
[root@localhost ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     2088449     1044193+  82  Linux swap / Solaris
/dev/sda2         2088450    16771859     7341705   83  Linux

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    20971519    10484736   fd  Linux raid autodetect

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders, total 20971520 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    20971519    10484736   fd  Linux raid autodetect

Disk /dev/md0: 10.7 GB, 10736304128 bytes
2 heads, 4 sectors/track, 2621168 cylinders, total 20969344 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/md0 doesn't contain a valid partition table
[root@localhost ~]#

Notice the invalid partition table. Made a mount point for md0, mounted it, checked space on the drives, and unmounted md0.

Code: [Select]
[root@localhost ~]# mkdir /mnt/raid1
[root@localhost ~]# mount /dev/md0 /mnt/raid1
[root@localhost ~]# df -H
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda2              7.4G   2.1G   5.0G  30% /
/dev/md0                11G    34M    11G   1% /mnt/raid1
[root@localhost ~]# umount /mnt/raid1
[root@localhost ~]#

At this point, I used PCC to set the mount parameters for the partition because it's much easier to let the GUI do the work. The mount point for md0 is /mnt/raid1.



And sdb1, sdc1 and md0 look like the following:







Changed permissions on /mnt/raid1 to give all users full access, partially because I chose to allow ordinary users to mount and unmount the partition.

Code: [Select]
[root@localhost ~]# chmod 777 -R /mnt/raid1
[root@localhost ~]# ls -l /mnt | grep raid1
drwxrwxrwx 2 root root 4096 Jun 29 03:49 raid1/
[root@localhost ~]#

One more step to take. As root, edit the file /etc/mdadm.conf. The entire file is commented, so I just added the line below to the bottom of the file.

ARRAY /dev/md0 devices=/dev/sdb1,/dev/sdc1 level=1 num-devices=2 auto=yes

Like you, I created a desktop file that I can click to access the contents of the RAID1 array. I also created a shortcut to the mountpoint on my home directory.

Code: [Select]
[darrel@localhost ~]$ ln -s /mnt/raid1 ~/RAID1
My desktop and home directory look like this:



Once you get the array working, setting the permissions on the directories is easy. I haven't really done anything with LVM setup because, at this point, it would be all done in CLI. It's much easier to do with visual tools. If you want to experiment with it, install the lvm2 package.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378