Results 1 to 6 of 6

Thread: Problem adding hard disk pair to Raid 1

  1. #1
    Join Date
    Jan 2010
    Posts
    52

    Problem adding hard disk pair to Raid 1

    I have small problems with adding raid on SME: I have 2 disk of 1TB in RAID1, so far no problem it works.

    I plugged in 2 other discs 1.5TB and performing manipulation on the web page newbee:

    "How to increase size of filesystem root (/) with 2 disk RAID 1"

    Partitioning of the 2 discs sdc1 and sdd1 goes well, then
    I type

    sfdisk -d /dev/sdc |sfdisk /dev/sdd This gives me:

    Verify that no other uses disk right now ...
    OK

    Disk /dev/sdd: 182401 cylindres, 255 heads, 63 sectors/track
    Old situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End # cyls # blocks Id System
    / dev/sdd1 0 + 182400 182401 to 1465136001 fd Linux raid autodetect
    / dev/sdd2 0 - 0 0 0 Empty
    / dev/sdd3 0 - 0 0 0 Empty
    / dev/sdd4 0 - 0 0 0 Empty
    New location:
    Units = sectors of 512 bytes, counting from 0

    Periph Boot Start End # sectors Id System
    / dev/sdd1 63 2930272064 2930272002 fd Linux raid autodetect
    / dev/sdd2 0 - 0 0 Empty
    / dev/sdd3 0 - 0 0 Empty
    / dev/sdd4 0 - 0 0 Empty
    WARNING: no primary partition marked bootable (active)
    It does not matter for LILO, but in a DOS MBR which shall commence not that hard.
    Successfully writing the new partition table

    Re-reading the partition table...

    If you create or edit a DOS partition, /dev/foo7, for example, then
    use dd(1) to zero the first 512 bytes:
    dd if=/dev/zero of=/dev/foo7 bs=512 count=1

    when I type the following line in the console:
    mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1

    it said:

    mdadm: Cannot open /dev/sdc1: Device or resource busy
    mdadm: Cannot open /dev/sdd1: Device or resource busy
    mdadm: create aborted

  2. #2
    Join Date
    Aug 2008
    Posts
    1,238

    Re: Problem adding hard disk pair to Raid 1

    Some questions arise about this description:

    - When we partition a drive, is that the kernel is able to treat the newly created partitions?
    => I suppose that after a reboot, the partitions can be used

    - Once created a new volume (raid 1 and after formatting), how to add to an existing structure?
    => It is easy to mount a file system to another by mount, but how to create a volume, spreading across 2 volumes?

  3. #3
    Join Date
    Jan 2010
    Posts
    52

    Re: Problem adding hard disk pair to Raid 1

    First, I mounted a raid or 2 x hardware Raid1 (2x1TB and 2x1.5TB) for the sme.

    Having everything reinstalled I deleted the first Raid1 to switch to RAID software, the options given by my motherboard to boot (Ctrl-F), no problems.

    But not the second! where the 2 disks of 1.5TB sdc and sdd are defined ... So BUSY ...

    The creation by mdadm raid was conducted and the sync is in progress ...

  4. #4
    Join Date
    May 2008
    Posts
    1,275

    Re: Problem adding hard disk pair to Raid 1

    Partitioning of the 2 discs sdc1 and sdd1 goes well, then
    I type

    sfdisk -d /dev/sdc |sfdisk /dev/sdd
    Its not a logical approach. An interest to dump the structure of a disk on another is not to repeat several times the same operation. It was unnecessary to create the partition for first time.

    If your raid problem hw/sw was not clear, congratulations for having thought

    - When we partition a drive, is that the kernel is able to treat the newly created partitions?
    => I suppose that after a reboot, the partitions can be used
    The 2.6 kernel handles this without problems, even if the last message from fdisk may be confused about

    - Once created a new volume (raid 1 and after formatting), how to add to an existing structure?
    => It is easy to mount a file system to another by mount, but how to create a volume, spreading across 2 volumes?
    The use of LVM (LogicalVolumeManager) allows this kind of manip hot. Once you have your new physical unit - Physical Volume - (RAID MDXX the device in this case), you shall include at VG (vgextend), then you can play with your logical volumes as you want to: increase the size of existing ones (lvextend), create new LV, ...

    Do not forget to adapt the FS before or after operations on the LV (before if reduced)

    But this was not the case of Lazaaro, the method presented can "mount" a new partition in the tree. I am not necessarily adept to change the structure of SME in LVM configurations usually encountered: a "server" with the internal SATA disk, LVM structures to straddle several structures raid but this is a feeling, which is taking into account the complexity of such a configuration. It is technically feasible and reliable (in other environment I know).
    Also I can not find the structure of SME suited for this game! We have only one VG (rootvg) and one (two actually with the swap) LV. And my culture would push me to separate system and data, that is no longer Linux for many years - so it works - just like Windows ...

  5. #5
    Join Date
    Aug 2008
    Posts
    1,238

    Re: Problem adding hard disk pair to Raid 1

    I have to taste good LVM which allows to easily extend an LV (Logical Volume). but it is also the resizer file system created in the LV (resize2fs) (as you mention).

    Indeed, if LVM is not used to separate / of /home or /var, the advantages of LVM is not used until the end ...

    Without LVM, ie with mount, you can only use symlinks type "ln" to move some of the data. That is to say the least, impractical!

    If I am, after fdisk and "n" to create new partitions, udev manages to create /dev/sdX? And we can do the mkfs.?? who goes? I am a little skeptical but I'll do the test.

  6. #6
    Join Date
    May 2008
    Posts
    1,275

    Re: Problem adding hard disk pair to Raid 1

    If I am, after fdisk and "n" to create new partitions, udev manages to create /dev/sdX? And we can do the mkfs.?? who goes? I am a little skeptical but I'll do the test.
    yes but not, I have not been clear in my wording, so I resume
    or two discs, with a score sdc, sdd without partition

    if you "dump" the structure of the sdc disk via "dd" eg: dd if=/dev/sdc of=/dev/sdd, one gets a structure with a shower partition, BUT, the OS is not conscious and actually the device files are not created
    we can create either a mknod, a rescan of the SCSI chain, a reboot (which is the rescan ...)

    if "apply" the structure of hard disk sdc to sdd via the command sfdisk (*), it supports the call to ioctl that goes well that will cause the upgrade of device files (mknod) in command output. sfdisk is just another version of fdisk ...

    (*) Sfdisk-d dump only structure in a format that is able to read to apply.

    I hope this is clearer.

Similar Threads

  1. Adding second Raid 1 pair in Gigabyte X58A-UD3R
    By Swagato in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 16-08-2012, 06:36 PM
  2. Can I add Hard disk with RAID 0 if XHD is disabled?
    By MargareTi in forum Hardware Peripherals
    Replies: 5
    Last Post: 27-05-2011, 11:24 AM
  3. Raid Configuration with 3 TB Hard disk
    By Cappuccino in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 22-02-2011, 02:58 AM
  4. Hard-Disk upgrading - Raid 1
    By mYRMIDONS in forum Hardware Peripherals
    Replies: 6
    Last Post: 02-11-2010, 05:20 PM
  5. Fast hard disk or RAID 0
    By Michael25 in forum Hardware Peripherals
    Replies: 7
    Last Post: 08-01-2009, 02:54 PM

Tags for this Thread

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
  •  
Page generated in 1,749,932,378.63574 seconds with 16 queries