Wednesday, March 30, 2016

12.04 - SSH Commandline - Ubuntu x64 dedicated server raid-0 array creation LOG [ After reboot : Disk /dev/md127 doesn't contain a valid partition table ]


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:~#

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...