About: How To Set Up Software RAID1 On A Running System

Discussion in 'HOWTO-Related Questions' started by maykel535, Dec 15, 2009.

  1. maykel535

    maykel535 New Member

    I have installer Centos but when I ejecute the command:

    sfdisk -d /dev/sda | sfdisk /dev/sdb

    root@server1 ~]# sfdisk -d /dev/sda | sfdisk /dev/sdb
    Checking that no-one is using this disk right now ...
    OK

    Disk /dev/sdb: 1305 cylinders, 255 heads, 63 sectors/track

    sfdisk: ERROR: sector 0 does not have an msdos signature
    /dev/sdb: unrecognized partition table type

    No partitions found

    And no continue the partitioning...Can I help me please?? Thanks in advanced.

    fdisk -l

    [root@server1 ~]# fdisk -l

    Disk /dev/sda: 10.7 GB, 10737418240 bytes
    255 heads, 63 sectors/track, 1305 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 25 200781 83 Linux
    /dev/sda2 26 90 522112+ 82 Linux swap / Solaris
    /dev/sda3 91 1305 9759487+ 83 Linux

    Disk /dev/sdb: 10.7 GB, 10737418240 bytes
    255 heads, 63 sectors/track, 1305 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/sdb doesn't contain a valid partition table
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Not sure why this happens, but you can try to create a partition on /dev/sdb first using
    Code:
    fdisk /dev/sdb
    and then run
    Code:
    sfdisk -d /dev/sda | sfdisk /dev/sdb
    again.
     
  3. maykel535

    maykel535 New Member

    Re: about fdisk /dev/sdb

    Thanks Falko for you response but:


    I have done fdisk /dev/sdb and then select m(menu), then o for create partition valid ms-dos and finally select w for write changes in the disk.

    And then, I run sfdisk -d /dev/sda | sfdisk /dev/sdb I obtain:


    root@ubuntu:/home/tecnico# sfdisk -d /dev/sda | sfdisk /dev/sdb
    Comprobando que nadie esté utilizando este disco en este momento...
    Correcto

    Disco /dev/sdb: 1044 cilindros, 255 cabezas, 63 sectores/pista
    Situación anterior:
    Unidades = cilindros de 8225280 bytes, bloques de 1024 bytes, contando desde 0

    Disp. Inic. Princ. Fin Nºcil Nºbloq. Id Sistema
    /dev/sdb1 0 - 0 0 0 VacÃ*a
    /dev/sdb2 0 - 0 0 0 VacÃ*a
    /dev/sdb3 0 - 0 0 0 VacÃ*a
    /dev/sdb4 0 - 0 0 0 VacÃ*a

    sfdisk: Entrada no reconocida: sectores

    Can I help me please, Falko. Thanks very much.
     
  4. maykel535

    maykel535 New Member

    root@ubuntu:/home/tecnico# sfdisk -d /dev/sda | sfdisk /dev/sdb
    Comprobando que nadie esté utilizando este disco en este momento...
    Correct

    Disk /dev/sdb: 1044 cilinders, 255 heads, 63 sectors/pista
    Situación anterior:
    Unidades = cilindros de 8225280 bytes, bloques de 1024 bytes, contando desde 0

    Disp. Inic. Princ. Fin Nºcil Nºbloq. Id Sistema
    /dev/sdb1 0 - 0 0 0 empty
    /dev/sdb2 0 - 0 0 0 empty
    /dev/sdb3 0 - 0 0 0 empty
    /dev/sdb4 0 - 0 0 0 empty

    sfdisk: Input no Recognized: sectors

    Can I help me please, Falko. Thanks very much.
     
  5. maykel535

    maykel535 New Member

    I resolved the problem

    If you have partitions extended the command:

    sfdisk -d /dev/sda | sfdisk /dev/sdb

    not found.

    If you have partitions primary the command:

    sfdisk -d /dev/sda | sfdisk /dev/sdb

    FOUND!! WHY??

    Disk /dev/sdc: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/sdc doesn't contain a valid partition table
    root@ubuntu:/home/tecnico# sfdisk -d /dev/sda | sfdisk /dev/sdb
    Checking that no-one is using this disk right now ...
    OK

    Disk /dev/sdb: 1044 cylinders, 255 heads, 63 sectors/track

    sfdisk: ERROR: sector 0 does not have an msdos signature
    /dev/sdb: unrecognized partition table type
    Old situation:
    No partitions found
    New situation:
    Units = sectors of 512 bytes, counting from 0

    Device Boot Start End #sectors Id System
    /dev/sdb1 63 9767519 9767457 83 Linux
    /dev/sdb2 9767520 11727449 1959930 82 Linux swap / Solaris
    /dev/sdb3 * 11727450 16771859 5044410 83 Linux
    /dev/sdb4 0 - 0 0 Empty
    Successfully wrote the new partition table

    Re-reading the partition table ...

    If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
    to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
    (See fdisk(8).)



    And finally:

    root@ubuntu:/home/tecnico# fdisk -l

    Disk /dev/sda: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000cf663

    Device Boot Start End Blocks Id System
    /dev/sda1 1 608 4883728+ 83 Linux
    /dev/sda2 609 730 979965 82 Linux swap / Solaris
    /dev/sda3 * 731 1044 2522205 83 Linux

    Disk /dev/sdb: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 608 4883728+ 83 Linux
    /dev/sdb2 609 730 979965 82 Linux swap / Solaris
    /dev/sdb3 * 731 1044 2522205 83 Linux

    Disk /dev/sdc: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

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

Share This Page