1

I followed this tutorial but failed as it seems, i tried for a couple times, here i throw the towel:

ht-tp://www.rustyrazorblade.com/2012/07/setting-up-raid0-in-ubuntu-12-04-in-aws-high-io/

The raid creation command i used was mdadm --create --verbose --auto=yes --chunk=64 /dev/md0 --level=0 --raid-devices=2 /dev/sdb1 /dev/sdc1

OBV something went wrong as fdisk -ls prints Disk /dev/md127 doesn't contain a valid partition table after the reboot.

Iam looking for a solution to get this correctly setup.

The full install LOG is:

login as: root root@"serverIP"'s password: Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-35-generic x86_64)

  • Documentation: ht-tps://help.ubuntu.com/ You have mail. Last login: Thu Dec 20 11:11:17 2012 from p4fe4fd1a.dip.t-dialin.net

root@j064:~# fdisk -ls

Disk /dev/sda: 128.0 GB, 128035676160 bytes 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x00025802

Device Boot Start End Blocks Id System /dev/sda1 261 7812500 3906120 82 Linux swap / Solaris /dev/sda2 * 7813120 249554943 120870912 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0xe92120fa

Device Boot Start End Blocks Id System

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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/sdc doesn't contain a valid partition table

root@j064:~# apt-get install mdadm

Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: mdadm 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 520 kB of archives. After this operation, 1185 kB of additional disk space will be used. Get:1 ht-tp://fr.archive.ubuntu.com/ubuntu/ precise-updates/main mdadm amd64 3.2.5-1ubuntu0.2 [520 kB] Fetched 520 kB in 0s (1030 kB/s) Preconfiguring packages ... Selecting previously unselected package mdadm. (Reading database ... 76517 files and directories currently installed.) Unpacking mdadm (from .../mdadm_3.2.5-1ubuntu0.2_amd64.deb) ... Processing triggers for ureadahead ... Setting up mdadm (3.2.5-1ubuntu0.2) ... Generating mdadm.conf... done. Removing any system startup links for /etc/init.d/mdadm-raid ... update-initramfs: deferring update (trigger activated) * Starting MD monitoring service mdadm --monitor
[ OK ] Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-3.2.0-35-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

root@j064:~# sudo fdisk /dev/sdb

Command (m for help): d

No partition is defined yet!

Command (m for help): n

Partition type: p

primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): Using default value 1 First sector (2048-1953525167, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-1953525167, default 1953525167): Using default value 1953525167

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@j064:~# sudo fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x8d60ef66. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): d

No partition is defined yet!

Command (m for help): n

Partition type: p

primary (0 primary, 0 extended, 4 free) e extended Select (default p): p >Partition number (1-4, default 1): Using default value 1 First sector (2048-1953525167, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-1953525167, default 1953525167): Using default value 1953525167

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@j064:~# fdisk -ls

Disk /dev/sda: 128.0 GB, 128035676160 bytes 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x00025802

Device Boot Start End Blocks Id System /dev/sda1 261 7812500 3906120 82 Linux swap / Solaris /dev/sda2 * 7813120 249554943 120870912 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0xe92120fa

Device Boot Start End Blocks Id System /dev/sdb1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0x8d60ef66

Device Boot Start End Blocks Id System /dev/sdc1 2048 1953525167 976761560 fd Linux raid `autodetect

root@j064:~# sudo mdadm --create --verbose --auto=yes --chunk=64 /dev/md0 --level=0 --raid-devices=2 /dev/sdb1 /dev/sdc1

mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md0 started.

root@j064:~# sudo apt-get install xfsprogs

Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libreadline5 Suggested packages: xfsdump attr quota The following NEW packages will be installed: libreadline5 xfsprogs 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 1354 kB of archives. After this operation, 3082 kB of additional disk space will be used.

Do you want to continue [Y/n]? Y

Get:1 ht-tp://filepile.fastit.net/ubuntu/ precise/main libreadline5 amd64 5.2-11 [128 kB] Get:2 ht-tp://filepile.fastit.net/ubuntu/ precise/main xfsprogs amd64 3.1.7 [1226 kB] Fetched 1354 kB in 0s (1991 kB/s) Selecting previously unselected package libreadline5. (Reading database ... 76568 files and directories currently installed.) Unpacking libreadline5 (from .../libreadline5_5.2-11_amd64.deb) ... Selecting previously unselected package xfsprogs. Unpacking xfsprogs (from .../xfsprogs_3.1.7_amd64.deb) ... Setting up libreadline5 (5.2-11) ... Setting up xfsprogs (3.1.7) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place root@j064:~# sudo mkfs -t ext4 /dev/md0 mke2fs 1.42 (29-Nov-2011) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=16 blocks, Stripe width=32 blocks 122101760 inodes, 488380768 blocks 24419038 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 14905 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848

Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done

root@j064:~# mkdir /mnt/bigraid

root@j064:~# mount /dev/md0 /mnt/bigraid/

root@j064:~# df -h

Filesystem Size Used Avail Use% Mounted on /dev/sda2 114G 2.7G 106G 3% / udev
3.9G 4.0K 3.9G 1% /dev tmpfs 1.6G 284K 1.6G 1% /run none 5.0M 0 5.0M 0% /run/lock none 3.9G
0 3.9G 0% /run/shm /dev/md0 1.8T 196M 1.7T 1% /mnt/bigraid root@j064:~# dd if=/dev/zero of=/mnt/bigraid/somefile bs=512 ^C10271932+0 records in 10271931+0 records out 5259228672 bytes (5.3 GB) copied, 20.3628 s, 258 MB/s

root@j064:~# dd if=/dev/zero of=/mnt/bigraid/somefile bs=2048

^C

1083452+0 records in 1083452+0 records out 2218909696 bytes (2.2 GB) copied, 10.4948 s, 211 MB/s

root@j064:~# root@j064:~# hdparm -t /dev/md0

/dev/md0: Timing buffered disk reads: 582 MB in 3.00 seconds = 193.96 MB/sec

root@j064:~# fdisk -ls

Disk /dev/sda: 128.0 GB, 128035676160 bytes 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x00025802

Device Boot Start End Blocks Id System /dev/sda1 261 7812500 3906120 82 Linux swap / Solaris /dev/sda2 * 7813120 249554943 120870912 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0xe92120fa

Device Boot Start End Blocks Id System /dev/sdb1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0x8d60ef66

Device Boot Start End Blocks Id System /dev/sdc1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/md0: 2000.4 GB, 2000407625728 bytes 2 heads, 4 sectors/track, 488380768 cylinders, total 3907046144 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 131072 bytes Disk identifier: 0x00000000

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

root@j064:~# cd /mnt/bigraid

root@j064:/mnt/bigraid# reboot

login as: root root@"IP"'s password: Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-35-generic x86_64)

  • Documentation: ht-tps://help.ubuntu.com/ You have mail. Last login: Thu Dec 20 11:14:36 2012 from p4fe4fd1a.dip.t-dialin.net

root@j064:~# fdisk -ls

Disk /dev/sda: 128.0 GB, 128035676160 bytes 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x00025802

Device Boot Start End Blocks Id System /dev/sda1 261 7812500 3906120 82 Linux swap / Solaris /dev/sda2 * 7813120 249554943 120870912 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0xe92120fa

Device Boot Start End Blocks Id System /dev/sdb1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0x8d60ef66

Device Boot Start End Blocks Id System /dev/sdc1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/md127: 2000.4 GB, 2000407625728 bytes 2 heads, 4 sectors/track, 488380768 cylinders, total 3907046144 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 131072 bytes Disk identifier: 0x00000000

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

root@j064:~# partprobe

root@j064:~# reboot

login as: root root@"IP"'s password: Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-35-generic x86_64)

  • Documentation: ht-tps://help.ubuntu.com/ You have mail. Last login: Thu Dec 20 11:36:04 2012 from p4fe4fd1a.dip.t-dialin.net

root@j064:~# fdisk -ls

Disk /dev/sda: 128.0 GB, 128035676160 bytes 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x00025802

Device Boot Start End Blocks Id System /dev/sda1 261 7812500 3906120 82 Linux swap / Solaris /dev/sda2 * 7813120 249554943 120870912 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0xe92120fa

Device Boot Start End Blocks Id System /dev/sdb1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0x8d60ef66

Device Boot Start End Blocks Id System /dev/sdc1 2048 1953525167 976761560 fd Linux raid autodetect

Disk /dev/md127: 2000.4 GB, 2000407625728 bytes 2 heads, 4 sectors/track, 488380768 cylinders, total 3907046144 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 131072 bytes Disk identifier: 0x00000000

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

root@j064:~#

1 Answer 1

0

I don't see any problems in your log. Since you created your file system directly on the RAID (without creating a partition table) you cannot expect that there is one after reboot...

With this command you clearly make a filesystem on to the RAID directly:

sudo mkfs -t ext4 /dev/md0

It seems that the kernel gave a new name to the RAID after reboot (/dev/md127), try it to mount from the new device...

mount /dev/md127 /mnt/bigraid/

By the way, why do you install xfsprogs when you are going to create a ext4 filesystem afterwards?

21
  • Create a mdadm.config file to make sure it gets the same name as before (see manpages.ubuntu.com/manpages/hardy/man5/mdadm.conf.5.html)
    – falstaff
    Dec 20, 2012 at 12:46
  • hi, thx for your attention! iam a new ubuntu user, i intended to make the filesystem ext4 and recognized it afterwards. Why does the drives show up as md127 instead of md0 fer reboot? I will follow your instructions and give feedback.
    – user115639
    Dec 20, 2012 at 12:48
  • sudo mkfs -t ext4 /dev/md0 mke2fs 1.42 (29-Nov-2011) Could not stat /dev/md0 --- No such file or directory The device apparently does not exist; did you specify it correctly?
    – user115639
    Dec 20, 2012 at 12:53
  • root@j064:~# fdisk -ls Disk /dev/md127: 2000.4 GB, 2000407625728 bytes 2 heads, 4 sectors/track, 488380768 cylinders, total 3907046144 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 131072 bytes Disk identifier: 0x00000000 Disk /dev/md127 doesn't contain a valid partition table
    – user115639
    Dec 20, 2012 at 12:54
  • @ falstaff im trying to get it, brb
    – user115639
    Dec 20, 2012 at 12:58

You must log in to answer this question.