Koozali.org formerly Contribs.org

RAID 1 issue after move to new hardware

RAID 1 issue after move to new hardware
« on: May 05, 2019, 02:56:42 AM »
I am running a fully updated 9.2 system on an older PC using RAID 1. I moved one of the hard drives to a new HP Microserver Gen 10.  All went well and all programs and websites work as they should.  However, I ran into a problem setting up RAID.  I searched and didn't find anything on the forums just like this.

Logging in as admin on the new server with one drive, I get the screen shot (Single Drive.png) attached.

Logging in as root, I get this:

md0 : active raid1 sda1[2]
      255936 blocks super 1.0 [2/1] [U_]

md1 : active raid1 sda2[2]
      976373760 blocks super 1.1 [2/1] [U_]
      bitmap: 7/8 pages [28KB], 65536KB chunk

unused devices: <none>
[root@provue-server ~]#

After I install a second (new) WD 1 TB drive, I login as admin and get the Two Drive.png screenshot below (note:sdc, sdb, sda):

Here is what I see as I login to root:

[root@provue-server ~]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda1[2]
      255936 blocks super 1.0 [2/1] [U_]

md1 : active raid1 sda2[2]
      976373760 blocks super 1.1 [2/1] [U_]
      bitmap: 7/8 pages [28KB], 65536KB chunk

unused devices: <none>
[root@provue-server ~]#

I don't have any other drives (including USB) connected.

What should I do to get the system to recognize the second drive and configure as RAID 1?

Thanks!


Offline janet

  • ****
  • 4,746
Re: RAID 1 issue after move to new hardware
« Reply #1 on: May 05, 2019, 07:56:46 AM »
bclayton

With both drives connected, what do you get from this command when run on the new server ?
fdisk -l

Note that swapping a drive from one type of hardware to another type of hardware is not valid.
While Linux will attempt to install/reconfigure required drivers & modules, if the hardware is sufficiently different (which I assume is the case in your situation), then this method may not work correctly.

The correct approach is to:
Perform a backup on the old server (preferably using admin console backup to USB)
Install the SME OS on the new server using 2 new or blanked (identical) disks configured for RAID1 at time of install
Select to restore from your backup on first boot of new server (if using the admin console backup)
Reinstall contribs

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ReetP

  • *
  • 2,116
Re: RAID 1 issue after move to new hardware
« Reply #2 on: May 05, 2019, 11:15:43 AM »
The curious thing is when you have only have one drive it shows two.

That probably will explain why when you plug in drive two you show 3 drives.

So, with only one drive allegedly plugged in, what does the fdisk command show?

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: RAID 1 issue after move to new hardware
« Reply #3 on: May 05, 2019, 08:30:45 PM »
Thanks to both you and Janet.  I'm sure Janet is right, but since I am at this point, I would like to solve without having to go to a new install, if possible.

With one SATA drive installed, here is what I get:

[root@provue-server ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00073e9d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      256000+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
Partition 1 does not start on physical sector boundary.
/dev/sda2              32      121602   976506583   fd  Linux raid autodetect
Partition 2 does not start on physical sector boundary.

Disk /dev/md1: 999.8 GB, 999806730240 bytes
2 heads, 4 sectors/track, 244093440 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3072 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/main-root: 996.7 GB, 996650516480 bytes
255 heads, 63 sectors/track, 121169 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3072 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/main-swap: 3154 MB, 3154116608 bytes
255 heads, 63 sectors/track, 383 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3072 bytes
Disk identifier: 0x00000000


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 8023 MB, 8023703552 bytes
247 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1           1        1023+  ee  GPT
Partition 1 does not end on cylinder boundary.
/dev/sdb2               1         640     4896256+   7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sdb3   *         896         897        9283   ef  EFI (FAT-12/16/32)
Partition 3 does not end on cylinder boundary.
/dev/sdb4   *         897        1024      968687+  ef  EFI (FAT-12/16/32)
Partition 4 does not end on cylinder boundary.

Disk /dev/md0: 262 MB, 262078464 bytes
2 heads, 4 sectors/track, 63984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3584 bytes
Disk identifier: 0x00000000

[root@provue-server ~]#

Offline ReetP

  • *
  • 2,116
Re: RAID 1 issue after move to new hardware
« Reply #4 on: May 05, 2019, 08:33:28 PM »
So ask yourself what this:

Code: [Select]
Disk /dev/sdb: 8023 MB
8gb USB stick??
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: RAID 1 issue after move to new hardware
« Reply #5 on: May 05, 2019, 09:25:58 PM »
No memory stick.  I did have an APC battery backup plugged in.  I disconnected all USB devices, shutdown and restarted.  All that I have connected are a monitor and 2 Ethernet cables.

Here are the results now of Fdisk:

[root@provue-server ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00073e9d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      256000+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
Partition 1 does not start on physical sector boundary.
/dev/sda2              32      121602   976506583   fd  Linux raid autodetect
Partition 2 does not start on physical sector boundary.

Disk /dev/md1: 999.8 GB, 999806730240 bytes
2 heads, 4 sectors/track, 244093440 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3072 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/main-root: 996.7 GB, 996650516480 bytes
255 heads, 63 sectors/track, 121169 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3072 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/main-swap: 3154 MB, 3154116608 bytes
255 heads, 63 sectors/track, 383 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3072 bytes
Disk identifier: 0x00000000


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 8023 MB, 8023703552 bytes
247 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1           1        1023+  ee  GPT
Partition 1 does not end on cylinder boundary.
/dev/sdb2               1         640     4896256+   7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sdb3   *         896         897        9283   ef  EFI (FAT-12/16/32)
Partition 3 does not end on cylinder boundary.
/dev/sdb4   *         897        1024      968687+  ef  EFI (FAT-12/16/32)
Partition 4 does not end on cylinder boundary.

Disk /dev/md0: 262 MB, 262078464 bytes
2 heads, 4 sectors/track, 63984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3584 bytes
Disk identifier: 0x00000000

[root@provue-server ~]#

Offline ReetP

  • *
  • 2,116
Re: RAID 1 issue after move to new hardware
« Reply #6 on: May 05, 2019, 09:37:57 PM »
Well, somewhere it has detected a drive.

Can you check dmesg and see what gets picked up on boot?

Specifically looking at /dev/sdb

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: RAID 1 issue after move to new hardware
« Reply #7 on: May 05, 2019, 09:49:07 PM »
From Messages.  Does this give you what you need?

Re: RAID 1 issue after move to new hardware
« Reply #8 on: May 05, 2019, 09:49:30 PM »
Sorry.
View log files
/var/log/messages: Viewed at Sun 05 May 2019 02:46:32 PM CDT.

Displaying lines matching: "sdb".

May  5 13:17:29 provue-server kernel: sd 9:0:0:0: [sdb] 15671296 512-byte logical blocks: (8.02 GB/7.47 GiB)
May  5 13:17:29 provue-server kernel: sd 9:0:0:0: [sdb] Write Protect is off
May  5 13:17:29 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 13:17:29 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 13:17:29 provue-server kernel: sdb: sdb1 sdb2 sdb3 sdb4
May  5 13:17:29 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 13:17:29 provue-server kernel: sd 9:0:0:0: [sdb] Attached SCSI removable disk
May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] 15671296 512-byte logical blocks: (8.02 GB/7.47 GiB)
May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] Write Protect is off
May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 13:59:43 provue-server kernel: sdb: sdb1 sdb2 sdb3 sdb4
May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] Attached SCSI removable disk
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] 15671296 512-byte logical blocks: (8.02 GB/7.47 GiB)
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] Write Protect is off
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 14:07:30 provue-server kernel: sdb:
May  5 14:07:30 provue-server kernel: sdb1 sdb2 sdb3 sdb4
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] Attached SCSI removable disk
May  5 14:15:19 provue-server kernel: sd 9:0:0:0: [sdb] 15671296 512-byte logical blocks: (8.02 GB/7.47 GiB)
May  5 14:15:19 provue-server kernel: sd 9:0:0:0: [sdb] Write Protect is off
May  5 14:15:19 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 14:15:19 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 14:15:19 provue-server kernel: sdb: sdb1 sdb2 sdb3 sdb4
May  5 14:15:19 provue-server kernel: sd 9:0:0:0: [sdb] Assuming drive cache: write through
May  5 14:15:19 provue-server kernel: sd 9:0:0:0: [sdb] Attached SCSI removable disk

Offline ReetP

  • *
  • 2,116
Re: RAID 1 issue after move to new hardware
« Reply #9 on: May 05, 2019, 10:04:56 PM »
No idea why but...

May  5 13:59:43 provue-server kernel: sd 9:0:0:0: [sdb] Attached SCSI removable disk
May  5 14:07:30 provue-server kernel: sd 9:0:0:0: [sdb] 15671296 512-byte logical blocks: (8.02 GB/7.47 GiB)

What does dmesg say?

Code: [Select]
dmesg
Or

Code: [Select]
cat /var/log/dmesg
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: RAID 1 issue after move to new hardware
« Reply #10 on: May 05, 2019, 10:16:43 PM »
[root@provue-server ~]# cat /var/log/dmesg
[root@provue-server ~]# dmesg | grep -i sdb
sd 9:0:0:0: [sdb] 15671296 512-byte logical blocks: (8.02 GB/7.47 GiB)
sd 9:0:0:0: [sdb] Write Protect is off
sd 9:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 9:0:0:0: [sdb] Assuming drive cache: write through
sd 9:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1 sdb2 sdb3 sdb4
sd 9:0:0:0: [sdb] Assuming drive cache: write through
sd 9:0:0:0: [sdb] Attached SCSI removable disk
[root@provue-server ~]#

Do you need the full dmesg?  Too long for the screen.  Is there a command to record all?

Offline ReetP

  • *
  • 2,116
Re: RAID 1 issue after move to new hardware
« Reply #11 on: May 05, 2019, 10:42:29 PM »
Try

Code: [Select]
dmesg |less

Or

Code: [Select]
dmesg |more

One of them will let you ctrl+c and leave the relevant bits on screen to copy. Can never remember which !!
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: RAID 1 issue after move to new hardware
« Reply #12 on: May 05, 2019, 11:18:42 PM »
OK, pretty sure I got it all, but the file is too big to send.  Is there a way to send other than as attachment?


Offline ReetP

  • *
  • 2,116
Re: RAID 1 issue after move to new hardware
« Reply #13 on: May 05, 2019, 11:24:28 PM »
Use a gist in github?

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: RAID 1 issue after move to new hardware
« Reply #14 on: May 05, 2019, 11:29:50 PM »