Page 11 of 13 FirstFirst ... 910111213 LastLast
Results 101 to 110 of 124

Thread: HOWTO: Linux Software Raid using mdadm

  1. #101
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by mintfrish View Post
    I leave everything else alone except that i choose /dev/sda as 'device for boot loader' installation and that's it ?
    I don't know RAID configurations but, the above statement would be true. Grub has to be installed on sda not sda1, etc.

  2. #102
    Join Date
    Sep 2012
    Beans
    8

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by Cavsfan View Post
    Not sure about the rest of the problem but, sudo grub-install /dev/sda would be the correct command not sda1.
    Okay I tried it by using /dev/sda. But still I get an error message during installation.


    Code:
    Executing 'grub-install /dev/sda' failed.
    
    This is a fatal error.
    What do I do wrong with the boot partition? Can I create it manually after installation procedure?

    Last edited by mintfrish; September 25th, 2012 at 07:27 PM.

  3. #103
    Join Date
    Sep 2012
    Beans
    8

    Re: HOWTO: Linux Software Raid using mdadm

    Hmm after checking fdisk -l again

    Code:
    sudo fdisk -l
    
    Disk /dev/sda: 16.0 GB, 16001269760 bytes
    255 heads, 63 sectors/track, 1945 cylinders, total 31252480 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: 0x00017dbe
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048      309247      153600   83  Linux
    /dev/sda2          309248    22247423    10969088   83  Linux
    /dev/sda3        22247424    31252479     4502528    5  Extended
    /dev/sda5        22249472    31150079     4450304   82  Linux swap / Solaris
    
    Disk /dev/sdb: 16.0 GB, 16001269760 bytes
    255 heads, 63 sectors/track, 1945 cylinders, total 31252480 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: 0x000d958a
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048    21940223    10969088   83  Linux
    /dev/sdb2        21940224    31252479     4656128    5  Extended
    /dev/sdb5        21942272    30842879     4450304   82  Linux swap / Solaris
    
    Disk /dev/sdc: 31.6 GB, 31641829376 bytes
    255 heads, 63 sectors/track, 3846 cylinders, total 61800448 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: 0xc3072e18
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *        2048    61800447    30899200    c  W95 FAT32 (LBA)
    
    Disk /dev/md0: 22.5 GB, 22464675840 bytes
    255 heads, 63 sectors/track, 2731 cylinders, total 43876320 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 4096 bytes / 8192 bytes
    Disk identifier: 0x00014576
    
        Device Boot      Start         End      Blocks   Id  System
    /dev/md0p1              64    43875055    21937496   83  Linux
    I tried this:

    Code:
    sudo mkdir /home/tempo
    Code:
    sudo mount /dev/md0p1 /home/tempo
    Code:
    sudo grub-install --root-directory=/home/ubuntu/tempo /dev/sda1
    gave me
    Code:
    grub-probe: error: cannot find a device for /boot (is /dev mounted?).
    /usr/sbin/grub-probe: error: cannot find a device for /home/ubuntu/tempo/boot/grub (is /dev mounted?).

  4. #104
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: HOWTO: Linux Software Raid using mdadm

    Sorry, this is out of my league. Hopefully Old Fred or someone with grub knowledge will come along and help.

  5. #105
    Join Date
    Mar 2009
    Location
    Akron, OH
    Beans
    27
    Distro
    Ubuntu 16.04 Xenial Xerus

    Smile Re: HOWTO: Linux Software Raid using mdadm

    All I can say is YESSSSSSSSSSS!!!!!!!

    I have a home storage server, self-made. AsRock Intel mobo, dual-core CPU, and 4 western digital 1TB drives in a RAID 5 config. It uses Ubuntu server 11.04 (or did...). It was awesome. Great little box. Then we had a good power surge during a storm, and the board died. Replaced the board, couldn't get another one for the LGA775 chip with 5-6 SATA inputs, so I had to start with a new base HD.

    Anyways, I followed the instructions on the first page, got a live CD environment going, and simply said 'sudo mdadm --A'. Ubuntu just figured out the 4 drives were a raid array, assembled them, I mounted them and BANG!

    I'm really happy right now. I do love Linux.
    -Aaron

    "The green duck is just a red herring".

  6. #106
    Join Date
    Sep 2012
    Beans
    8

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by Cavsfan View Post
    Sorry, this is out of my league. Hopefully Old Fred or someone with grub knowledge will come along and help.
    Okay thank you very much mate. Event though I couldn't install the desired distro I was able to install ubuntu alternate. But still I run into problems here concerning the double swap space.

    When I enter

    Code:
    swapon -s
    I get

    Code:
    Filename				Type		Size	Used	Priority
    /dev/mapper/cryptswap2                  partition	4450300	0	-1
    My fstab looks like this

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/md0 during installation
    UUID=86f44b73-1822-4f25-8482-03ce6e84184a /               ext4    errors=remount-ro 0       1
    # /boot was on /dev/sda1 during installation
    UUID=8a4ca2d8-dc7b-44e5-9448-e675d83120d6 /boot           ext4    defaults        0       2
    # swap was on /dev/sda5 during installation
    #UUID=76cb7d4a-9fd7-4746-b690-b8a9a2663122 pri=1            swap    sw              0       0
    # swap was on /dev/sdb5 during installation
    #UUID=f0b88015-6906-4ec3-a178-1aa19a4cd7f5 pri=1            swap    sw              0       0
    /dev/mapper/cryptswap1 none swap sw 0 0
    /dev/mapper/cryptswap2 none swap sw 0 0
    and fdisk is the following

    Code:
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 Köpfe, 63 Sektoren/Spur, 14593 Zylinder, zusammen 234441648 Sektoren
    Einheiten = Sektoren von 1 × 512 = 512 Bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Festplattenidentifikation: 0xc1a472a2
    
       Gerät  boot.     Anfang        Ende     Blöcke   Id  System
    /dev/sda1   *        2048   234440703   117219328    5  Erweiterte
    /dev/sda5            4096   234440703   117218304   83  Linux
    
    Disk /dev/sdb: 16.0 GB, 16001269760 bytes
    255 Köpfe, 63 Sektoren/Spur, 1945 Zylinder, zusammen 31252480 Sektoren
    Einheiten = Sektoren von 1 × 512 = 512 Bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Festplattenidentifikation: 0x00017dbe
    
       Gerät  boot.     Anfang        Ende     Blöcke   Id  System
    /dev/sdb1   *        2048      309247      153600   83  Linux
    /dev/sdb3          311294    31150079    15419393    5  Erweiterte
    /dev/sdb5        22249472    31150079     4450304   82  Linux Swap / Solaris
    /dev/sdb6          311296    22249471    10969088   fd  Linux raid autodetect
    
    Partitionstabelleneinträge sind nicht in Platten-Reihenfolge
    
    Disk /dev/sdc: 16.0 GB, 16001269760 bytes
    255 Köpfe, 63 Sektoren/Spur, 1945 Zylinder, zusammen 31252480 Sektoren
    Einheiten = Sektoren von 1 × 512 = 512 Bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Festplattenidentifikation: 0x000d958a
    
       Gerät  boot.     Anfang        Ende     Blöcke   Id  System
    /dev/sdc1            2048    21940223    10969088   fd  Linux raid autodetect
    /dev/sdc2        21942270    30842879     4450305    5  Erweiterte
    /dev/sdc5        21942272    30842879     4450304   82  Linux Swap / Solaris
    
    Disk /dev/md0: 22.5 GB, 22463643648 bytes
    2 Köpfe, 4 Sektoren/Spur, 5484288 Zylinder, zusammen 43874304 Sektoren
    Einheiten = Sektoren von 1 × 512 = 512 Bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
    Festplattenidentifikation: 0x00000000
    
    Festplatte /dev/md0 enthält keine gültige Partitionstabelle
    
    Platte /dev/mapper/cryptswap2: 4557 MByte, 4557111296 Byte
    255 Köpfe, 63 Sektoren/Spur, 554 Zylinder, zusammen 8900608 Sektoren
    Einheiten = Sektoren von 1 × 512 = 512 Bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Festplattenidentifikation: 0x084f234d
    
    Festplatte /dev/mapper/cryptswap2 enthält keine gültige Partitionstabelle
    So actually my swap partitions are /dev/sdb5 and /dev/sdc5. How would I set this up right so I can use both partitions ?

  7. #107
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: HOWTO: Linux Software Raid using mdadm

    Note the partitions and UUIDs from sudo blkid.

    Edit fstab:
    gksu gedit /etc/fstab and correct the UUIDs and/or delete the incorrect entries.

    You should have just one ext4 and one swap.
    It is listing several which is probably the problem.

    Correct the fstab entries, save it and reboot.

    Any time you re-install a system or change a swap file, it "remembers" the old UUID and fstab must be edited.

    Here is what my fstab looks like on Quantal:
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda8 during installation
    UUID=08562c83-a132-4997-b215-a3a1d2e076bb /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda7 during installation
    UUID=0416f9e3-4d20-4a9e-989f-b361bf7bbfc2 none            swap    sw              0       0

  8. #108
    Join Date
    Sep 2012
    Beans
    8

    Re: HOWTO: Linux Software Raid using mdadm

    Thanks mate. I followed your instructions and commented everything off that was unnecessary. But why only one swap partition? Isn't it the intention of the op to create 2 swap partitions ?
    Anyways, first I had to get rid of the cryptswap. After doing that I created the 2 swap partitions with mkswap /dev/sdb5 and /dev/sdc5. With that done I got the UUID's and I could paste them into fstab. I set them both with pri=1.

    Theese are the two new swap partitions in fstab
    Code:
    #swap manuell hinzugefügt
    UUID=eb377be2-1b3f-414c-bed3-92c28bfafeff pri=1            swap    sw              0       0
    #swap manuell hinzugefügt
    UUID=1aed75da-7159-43b4-9b1a-d3538c97b04b pri=1            swap    sw              0       0
    and swapon -s is giving me

    Code:
    Filename				Type		Size	Used	Priority
    /dev/sdb5                               partition	4450300	0	-1
    /dev/sdc5                               partition	4450300	0	-2
    Is it normal that we still see priority -1 and priority -2 here ?

  9. #109
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by mintfrish View Post
    Thanks mate. I followed your instructions and commented everything off that was unnecessary. But why only one swap partition? Isn't it the intention of the op to create 2 swap partitions ?
    Anyways, first I had to get rid of the cryptswap. After doing that I created the 2 swap partitions with mkswap /dev/sdb5 and /dev/sdc5. With that done I got the UUID's and I could paste them into fstab. I set them both with pri=1.

    Theese are the two new swap partitions in fstab
    Code:
    #swap manuell hinzugefügt
    UUID=eb377be2-1b3f-414c-bed3-92c28bfafeff pri=1            swap    sw              0       0
    #swap manuell hinzugefügt
    UUID=1aed75da-7159-43b4-9b1a-d3538c97b04b pri=1            swap    sw              0       0
    and swapon -s is giving me

    Code:
    Filename                Type        Size    Used    Priority
    /dev/sdb5                               partition    4450300    0    -1
    /dev/sdc5                               partition    4450300    0    -2
    Is it normal that we still see priority -1 and priority -2 here ?
    That looks right according to page 1. As I said you are out of my league. I only subscribed to this thread so if I ever did have a RAID
    configuration, this would help.
    I will now butt out and "observe".

  10. #110
    Join Date
    Sep 2012
    Beans
    8

    Kernel Panic !!

    Me again.
    Wow, after using the mdadm ubuntu until yesterday I get this while booting

    Code:
    Kernel Panic - not syncing: Attempted to kill init!
    Pid: 1, comm: init Not tainted 3.2.0-32-gerneric #51-Ubuntu
    Call Trace:...
    What is that ? Can I do something or is my whole, with a lot of effort built system, gone ?

Page 11 of 13 FirstFirst ... 910111213 LastLast

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
  •