http://hwengineer.blogspot.com/2017/03/ppc64le-power8-ubuntu-sw-raid.html

Please first, POWER8, ie how to install OS while using SW RAID mirroring supported by installing the Ubuntu ppc64le of architecture,, Linux OS, not the function of HW RAID adapter, see the URL below. https://wiki.kubuntu.org/ppc64el/SoftwareRAID the above URL appears only how to configure and install. In particular, PReP partition, or a partition for the bootloader is so ppc64le SW RAID roneun as there is only the story that is not installed, so I can not say I asked. This time, I simply clean about what to do after installing Ubuntu OS SW RAID, PReP partition, how to protect, and how to recover if you encounter a problem with one of the thus mirroring the HDD 2. In summary, 1) PReP partition part is a copy haejumyeon after OS installation, just dd command to / dev / sda1 in / dev / sdb1. 2) If you experience a problem with one of the HDD Mirroring the 2-looking, recovery will use madam command. First, completes the installation to configure the OS to the SW RAID disk appears as shown in the above URL is as follows: 2. / dev / sda1, sdb1: PReP partition, / dev / sda2, sdb2: General Linux file system

/ dev / sda3, sdb3: Swap space partitioning for dual sda2 and sdb2 is mungchyeojyeo and make the md0 (mirror device 0), sda3 and sdb3 will create a md1. Fdisk -l $ Disk / dev / sda: 894.3 GiB, 960197124096 bytes, sectors 1875385008 Units: sectors of 1 * 512 = 512 bytes Sector size (logical / physical): 512 bytes / 512 bytes I / O size (minimum / optimal) : 512 bytes / 512 bytes disklabel type: gpt Disk Identifier: 2C810299-3222-421A-B19C-6FF8B8E8E181 Device Start End Sectors the type the Size / dev / sda1 16383 14 336 2048 7M PowerPC PReP Boot / dev / sda2 16384 1799501823 1,799,485,440 858.1G Linux RAID / dev / sda3 1799501824 1875384319 75882496 36.2G Linux RAID

Disk / dev / sdb: 894.3 GiB, 960197124096 bytes, 1875385008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical / physical): 512 bytes / 512 bytes
I / O size (minimum / optimal): 512 bytes / bytes 512
disklabel type: gpt
Disk Identifier: E5BCD6F3-25B0-42B9-A0C3-87851E049FB8

Device Start End Sectors the type the Size
/ dev / sdb1 16383 14 336 2048 7M Linux Filesystem
/ dev / sdb2 16384 1799501823 1799485440 858.1G Linux RAID
/ dev / sdb3 1,799,501,824 36.2G Linux RAID 75,882,496 1,875,384,319

Disk / dev / md1: 36.2 GiB, 38,818,283,520 bytes, 75.81696 million Sectors
Units: Sectors of 1 * 512 = 512 bytes
Sector size (the Logical / the Physical): 512 bytes / 512 bytes
I / O size (minimum / optimal): 512 bytes / 512 bytes

Disk / dev / md0: 858 GiB, 921202327552 bytes, 1799223296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical / physical): 512 bytes / bytes 512
the I / O size (: minimum / Optimal,): 512 bytes / 512 bytes

md1 is possible to check whether the swap space is swapon -s command.

With Ubuntu @ Test: ~ $ The swapon -s
Filename the Type the Size the Used Priority
/ dev / md1 partition 37,908,416 0 -1

As mentioned above, PReP partition roneun SWRAID during the OS install just the dd command, as shown below, so do not mirror the configuration copy It is haejumyeon. So after completing the copy, and then the one after the shutdown actually caused the problem, unplug the / dev / sda, the haebomyeon booting with only the / dev / sdb confirmed that booting is also a well.

test @ ubuntu: ~ $ sudo dd if = / dev / sda1 of = / dev / sdb1 bs = 1024

Let’s for the recovery of the mirror device. First, how to check whether the current state is to look at the / proc / mdstat below. Below is the normal state of the mirror device.

Test @ With Ubuntu: ~ $ Cat / proc / mdstat
Personalities: [RAID1] [Linear] [multipath] [RAID0] [RAID6] [RAID5] [RAID4] [RAID10] md0: Active RAID1 sda2 [0] sdb2 [2] 899 611 648 1.2 super blocks [2/2] [UU] bitmap: 0/1 pages [0KB], 65536KB chunk

md1: active raid1 sda3 [3] sdb3 [2] 37908480 super blocks 1.2 [2/2] [UU]

unused devices:

in more detail, you can view using the mdadm command.

With Ubuntu @ Test: ~ $ sudo –detail mdadm / dev / md0
[sudo] Password for Test:
/ dev / md0:
Version: 1.2
Time The Creation: Fri Dec 2 15:21:29 2016
Raid Level: RAID1
Array the Size: 899 611 648 (857.94 GiB 921.20 GB of)
the Used Dev the Size: 899 611 648 (857.94 GB of 921.20 GiB)
Raid Devices: 2
the Total Devices: 2
Persistence: Persistent Superblock is

a Bitmap Intent: the Internal

Update, Time The: Mon Dec 5 17:34:38 2016
State: the Clean
Active Devices: 2
the Working Devices: 2
Failed The Devices: 0
Spare, Devices: 0

The Name: With Ubuntu: 0 (Local to Host With Ubuntu)
UUID: 458b6f3e: 8289b00c: a4e641ea: 134631e7
the Events: 35 835

Number The Major, Minor RaidDevice State
Active Sync 2 0 8 0 / dev / sda2
2 8 18 1 Active Sync / dev / sdb2

Test @ With Ubuntu: ~ $ sudo mdadm –detail / dev / md1
/ dev / md1:
Version: 1.2
Creation Time The: Fri Dec 15 2 : 21: 41 2016
Raid Level: RAID1
Array the Size: 37.90848 million (36.15 GiB 38.82 GB of)
the Used Dev the Size: 37.90848 million (36.15 GiB 38.82 GB of)
Raid Devices: 2
the Total Devices: 2
Persistence: Superblock is Persistent

Update, Time The: Mon Dec 5 16- : 36: 22 2016
State: clean
Active Devices: 2
Working Devices: 2
Failed Devices: 0
Spare Devices: 0

Name: ubuntu: 1 (local to host ubuntu)
UUID: a6154655: 667b3e4a: 922a28a0: 3fb5af6b
Events: 87

Number Major Minor RaidDevice State
3 8 3 0 active sync / dev / sda3
2 8 19 1 active sync / dev / sdb3

/ dev / sda if pulled out the plug again, you can add the “mdadm –manage –remove” after removing the partition, issue the command again with “mdadm –manage –add” command. The following is Dunn pulled if the / dev / sda. Here, because the PReP partition / dev / sda1 partition is unable to attend, the mirror device, please do not forget to mdadm to haejwoya copy the dd command.

With Ubuntu @ Test: ~ $ sudo –manage mdadm / dev / md0 –remove / dev / sda2
Test @ With Ubuntu: ~ $ sudo mdadm –manage / dev / md1 –remove / dev / sda3

Test @ With Ubuntu: ~ $ mdadm –manage sudo / dev / md0 –add / dev / sda2
~ $ sudo mdadm –manage / dev / md1 –add / dev / sda3: @ Test With Ubuntu

will sync between –add so after a two HDD It will happen. / look proc / mdstat recovery operations are also available that goes a few percent.

Join The Discussion

Your email address will not be published. Required fields are marked *