Announcement

Collapse
No announcement yet.

RAID problems - trying to set up RAID 1

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RAID problems - trying to set up RAID 1

    Hi folks,

    Having some difficulty setting up RAID 1. This is a fairly long post, so please be patient with me.

    I have three nice big 400GB disks - . I have a whole bunch of stuff on one of them - and want to use the other two as a Samba/NFS RAID share to hold 'common' data available to the network.

    I have tried using gparted to set up the partitions etc. There seems to be a persistent /dev/md1 block device already created - creation date shows as September 7th 2007, although I wiped the drive and installed Hardy from scratch, so presume that this refers to something that is a default in 8.04. The other drives - three 400GB SATA and one 250GB external USB drive show up fine.

    I have looked at my sdb and sdc drives in gparted - and have created a single 400GB partition on each one of them (Reiserfs). The moment that the partitions are created and flagged as Raid, the md1 device changes and shows that it has a partition, md1p1. The p1 bit makes sense of course, being partition 1 (??) on the md. However, if I look under /dev, there's no md1p1 there. And then I get some funny error messages from gparted telling me that the file/device /dev/md1p1 doesn't exist.

    In addition, when I run the command
    Code:
    mdadm --detail /dev/md1
    I get the following output:

    Code:
    /dev/md1:
        Version : 00.90.03
     Creation Time : Fri Sep 7 19:12:51 2007
       Raid Level : raid1
       Array Size : 390711296 (372.61 GiB 400.09 GB)
     Used Dev Size : 390711296 (372.61 GiB 400.09 GB)
      Raid Devices : 2
     Total Devices : 2
    Preferred Minor : 1
      Persistence : Superblock is persistent
    
      Update Time : Wed Jun 25 22:23:48 2008
         State : clean
     Active Devices : 2
    Working Devices : 2
     Failed Devices : 0
     Spare Devices : 0
    
          UUID : 6e221738:a2a47658:f4bafbd1:e641a630
         Events : 0.6
    
      Number  Major  Minor  RaidDevice State
        0    8    16    0   active sync  /dev/sdb
        1    8    32    1   active sync  /dev/sdc
    I have used the UUID to update /etc/fstab to try and mount the device on startup. My /etc/fstab now looks like:

    Code:
     /etc/fstab: static file system information.
    #
    # <file system> <mount point>  <type> <options>    <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda3
    UUID=dc33ffc6-3193-4d0f-819d-5bdd96eae958 / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
    # /dev/sda1
    UUID=99cab34c-089e-43d5-8a73-79e75cf8a153 /boot ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    # /dev/sda7
    UUID=75560e4e-d0c6-4809-a98b-494149cdd5ab /distros ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    # /dev/sda8
    UUID=eb356766-dc38-4314-9dff-11e0d46c7850 /home ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    # /dev/sda6
    UUID=692cd76f-8b58-4024-8e66-a91be3f9c531 /restore ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    # /dev/sda5
    UUID=88e6ee03-65a2-442b-87ed-71a592051a73 /tmp ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    # /dev/sda2
    UUID=bdfb2c72-3923-4ac3-94b3-9607a7727cc8 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,utf8,atime,noauto,rw,dev,exec,suid 0 0
    /dev/scd1 /media/cdrom1 udf,iso9660 user,utf8,atime,noauto,rw,dev,exec,suid 0 0
    
    # RAID block - Raid1 type, two disks of 400GB each
    # /dev/md1
    UUID=6e221738:a2a47658:f4bafbd1:e641a630 /common reiserfs nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    but when I reboot, it fails on fsck and tells me that the device with UUID=6e221738:a2a47658:f4bafbd1:e641a630 does not exist. This might seem to suggest that either md1 doesn't exist, or md1p1 doesn't exist.

    So I'm stuck.

    What I'm trying to do is:

    1. Find out why md1p1 appears in gparted but doesn't seem to be recognised by anything else. Should this device exist? If so, how can I get this device to show up in the system and be recognised?

    2. Am I on the right track by adjusting my fstab? If so, is the UUID correct? I noted that it's very different to the others in the fstab...

    3. Should I just be deleting md1 and trying from scratch with this? If so, how do I do it? There doesn't seem to be much info about this type of thing in ubuntu/kubuntu, just lots of info on installing the base filesystem on a RAID system...

    Any help you could give me would be most appreciated. I'm getting tired going round in circles on this one - and can't seem to find relevant info about this.

    Thanks in advance

    Bag.


    #2
    more info...

    Ok, so a closer inspection of the error messages from gparted show that it complains that /dev/md1p1 is not mounted.

    So I tried mounting it:

    Code:
    sudo mount UUID=6e221738:a2a47658:f4bafbd1:e641a630 /common
    mount: wrong fs type, bad option, bad superblock on UUID=6e221738:a2a47658:f4bafbd1:e641a630,
        missing codepage or helper program, or other error
        (for several filesystems (e.g. nfs, cifs) you might
        need a /sbin/mount.<type> helper program)
        In some cases useful info is found in syslog - try
        dmesg | tail or so
    I'm not sure what the deal is here. The partition md1p1 picked up reiserfs as the filesystem type directly itself. I did not state the filesystem.

    Running
    Code:
    dmesg | tail
    picks up the following...

    Code:
    [ 2194.903253] sd 9:0:0:0: [sdi] Assuming drive cache: write through
    [ 2194.915050] sd 9:0:0:0: [sdi] 8058880 512-byte hardware sectors (4126 MB)
    [ 2194.918233] sd 9:0:0:0: [sdi] Write Protect is off
    [ 2194.918238] sd 9:0:0:0: [sdi] Mode Sense: 23 00 00 00
    [ 2194.918240] sd 9:0:0:0: [sdi] Assuming drive cache: write through
    [ 2194.918245] sdi: sdi1
    [ 2194.948763] sd 9:0:0:0: [sdi] Attached SCSI removable disk
    [ 2194.948798] sd 9:0:0:0: Attached scsi generic sg10 type 0
    [ 4383.862179] RPC: Registered udp transport module.
    [ 4383.862183] RPC: Registered tcp transport module.
    which I presume doesn't mean a whole lot in this case. I presume it's referring to a USB stick that I have in the computer at the moment... which was done before the mount command (and therefore meaning that there's nothing of interest in dmesg).

    Any help would be appreciated.

    Thanks,

    Bag

    Comment


      #3
      Re: RAID problems - trying to set up RAID 1

      I am no expert on raid stacks but I hope this points you in the right direction:
      http://starnixhacks.blogspot.com/200...ware-raid.html

      and this

      http://lists.alioth.debian.org/piper...ry/000273.html

      Or may be consider installing ubuntu server version first, setting it up , and then (if you need it) kubuntu- desktop or if you want lean and mean:

      Code:
      sudo apt-get install xorg kdm kde-core pmount synaptic -y
      + the apps you may need.

      Sorry I can't be of more help
      HP Pavilion dv6 core i7 (Main)
      4 GB Ram
      Kubuntu 18.10

      Comment


        #4
        Re: RAID problems - trying to set up RAID 1

        Fintan,

        Thanks for the reply. Much appreciated.

        Have taken a look at http://starnixhacks.blogspot.com/200...ware-raid.html and I think I can use this link to help me get to where I want to be.

        But have hit on another problem. When inputting the command:

        Code:
        mdadm --build /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
        I get the complaint that...
        Code:
         mdadm: Cannot open /dev/sdb: Device or resource busy
        This confuses me generally. I've tried a few things but can't seem to change the response... Any ideas why that would be?

        To just clarify - sdb and sdc are not in my fstab or mtab files. Should they be?

        There is already a block device called /dev/md1 in the filesystem, so when I run the same command asking it to build /dev/md1 it returns:

        Code:
        mdadm: SET_ARRAY_INFO failed for /dev/md1: Invalid argument
        So, having seen a different command elsewhere on the web, I changed --build to --create and tried again to create on md1
        This then returned:

        Code:
        mdadm: another array by this name is already running.
        Which now utterly confuses me...! Does this mean that I already have a system up and running?

        I am a bear of little brains and mdadm commands confuse me...

        Comment


          #5
          Re: RAID problems - trying to set up RAID 1

          As I said I am no expert and am probably as confused as yourself :P

          I did come across this:
          http://kubuntuforums.net/forums/inde...opic=3094108.0

          and remembered that the alternate CD has the option of setting a raid installation
          so maybe that path may be worth investigating?

          Sorry I can't be of more help
          HP Pavilion dv6 core i7 (Main)
          4 GB Ram
          Kubuntu 18.10

          Comment

          Working...
          X