Discussion:
grub2-install: Couldn't find physical volume ‘(null)’.
Sam Varshavchik
2016-04-11 02:03:49 UTC
Permalink
grub 2.02, Fedora x86-64.

I have /dev/sda and /dev/sdb in a RAID-1 configuration. This is the Linux
kernel's md-raid driver.

/dev/sda started failing SMART.

I ran /sbin/grub2-install /dev/sdb. My recollection is that it ran without
any complaints.

After that, I yanked out /dev/sda. I reattached /dev/sdb as /dev/sda, and
put in a new hard drive as the new /dev/sdb.

I booted up, and kicked off a rebuild of my RAID-1 volumes, everything is
going well.

Now, after all of that was done, I decided to install grub2 on the new
/dev/sdb:

[***@monster ~]# /sbin/grub2-install /dev/sdb
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’. Some
modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’. Some
modules may be missing from core image..
Installation finished. No error reported.

Now, anyone have any idea what's up with these warnings?

More importantly, should I dare to run /sbin/grub2-install /dev/sda, just to
make sure everything is nicely in sync?

P.S., currently I still have one raid volume syncing, but this does not
appear relevant.
Andrei Borzenkov
2016-04-11 03:20:01 UTC
Permalink
Post by Sam Varshavchik
grub 2.02, Fedora x86-64.
I have /dev/sda and /dev/sdb in a RAID-1 configuration. This is the
Linux kernel's md-raid driver.
/dev/sda started failing SMART.
I ran /sbin/grub2-install /dev/sdb. My recollection is that it ran
without any complaints.
After that, I yanked out /dev/sda. I reattached /dev/sdb as /dev/sda,
and put in a new hard drive as the new /dev/sdb.
I booted up, and kicked off a rebuild of my RAID-1 volumes, everything
is going well.
Now, after all of that was done, I decided to install grub2 on the new
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
Installation finished. No error reported.
Now, anyone have any idea what's up with these warnings?
Could you show output of "mdadm --detail" for your MD device?
Post by Sam Varshavchik
More importantly, should I dare to run /sbin/grub2-install /dev/sda,
just to make sure everything is nicely in sync?
P.S., currently I still have one raid volume syncing, but this does not
appear relevant.
_______________________________________________
Help-grub mailing list
https://lists.gnu.org/mailman/listinfo/help-grub
Sam Varshavchik
2016-04-11 10:56:34 UTC
Permalink
Post by Andrei Borzenkov
Post by Sam Varshavchik
grub 2.02, Fedora x86-64.
I have /dev/sda and /dev/sdb in a RAID-1 configuration. This is the
Linux kernel's md-raid driver.
/dev/sda started failing SMART.
I ran /sbin/grub2-install /dev/sdb. My recollection is that it ran
without any complaints.
After that, I yanked out /dev/sda. I reattached /dev/sdb as /dev/sda,
and put in a new hard drive as the new /dev/sdb.
I booted up, and kicked off a rebuild of my RAID-1 volumes, everything
is going well.
Now, after all of that was done, I decided to install grub2 on the new
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
Installation finished. No error reported.
Now, anyone have any idea what's up with these warnings?
Could you show output of "mdadm --detail" for your MD device?
Below.

Googling around finds some references of this warning coming out while the
md-raid volumes are being synced. This warning still comes out after
everything is fully synced up.

/dev/md0:
Version : 1.0
Creation Time : Sat Sep 18 18:15:10 2010
Raid Level : raid1
Array Size : 1048564 (1023.99 MiB 1073.73 MB)
Used Dev Size : 1048564 (1023.99 MiB 1073.73 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Mon Apr 11 06:53:19 2016
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : monster:0
UUID : 7ae940a5:bd5a0d0f:666adf78:e0c5b498
Events : 1188

Number Major Minor RaidDevice State
2 8 17 0 active sync /dev/sdb1
1 8 1 1 active sync /dev/sda1

/dev/md1:
Version : 1.1
Creation Time : Sat Sep 18 18:15:10 2010
Raid Level : raid1
Array Size : 1048568 (1023.99 MiB 1073.73 MB)
Used Dev Size : 1048568 (1023.99 MiB 1073.73 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Sun Apr 10 20:50:41 2016
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : monster:1
UUID : 067004a2:11daf9c2:0cedca66:ac63c62d
Events : 1127

Number Major Minor RaidDevice State
2 8 18 0 active sync /dev/sdb2
1 8 2 1 active sync /dev/sda2

/dev/md2:
Version : 1.1
Creation Time : Sat Sep 18 18:15:11 2010
Raid Level : raid1
Array Size : 104856576 (100.00 GiB 107.37 GB)
Used Dev Size : 104856576 (100.00 GiB 107.37 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Intent Bitmap : Internal

Update Time : Mon Apr 11 06:53:34 2016
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : monster:2
UUID : b0cb9b26:be362a98:012cdf18:19de5ac1
Events : 59413

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

/dev/md3:
Version : 1.1
Creation Time : Sun Nov 13 14:47:12 2011
Raid Level : raid1
Array Size : 869803752 (829.51 GiB 890.68 GB)
Used Dev Size : 869803752 (829.51 GiB 890.68 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Intent Bitmap : Internal

Update Time : Mon Apr 11 06:54:45 2016
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : monster:3
UUID : ac2446aa:661a4977:0960a296:6d0b48c3
Events : 165897

Number Major Minor RaidDevice State
3 8 21 0 active sync /dev/sdb5
2 8 5 1 active sync /dev/sda5
Andrei Borzenkov
2016-04-11 11:07:17 UTC
Permalink
Post by Sam Varshavchik
Post by Andrei Borzenkov
Post by Sam Varshavchik
grub 2.02, Fedora x86-64.
I have /dev/sda and /dev/sdb in a RAID-1 configuration. This is the
Linux kernel's md-raid driver.
/dev/sda started failing SMART.
I ran /sbin/grub2-install /dev/sdb. My recollection is that it ran
without any complaints.
After that, I yanked out /dev/sda. I reattached /dev/sdb as /dev/sda,
and put in a new hard drive as the new /dev/sdb.
I booted up, and kicked off a rebuild of my RAID-1 volumes, everything
is going well.
Now, after all of that was done, I decided to install grub2 on the new
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
Installation finished. No error reported.
Now, anyone have any idea what's up with these warnings?
Could you show output of "mdadm --detail" for your MD device?
Below.
Googling around finds some references of this warning coming out while the
md-raid volumes are being synced. This warning still comes out after
everything is fully synced up.
Which device is your /boot?
Andrei Borzenkov
2016-04-11 11:39:34 UTC
Permalink
Post by Sam Varshavchik
Post by Sam Varshavchik
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
Installation finished. No error reported.
Now, anyone have any idea what's up with these warnings?
...
Post by Sam Varshavchik
Googling around finds some references of this warning coming out while the
md-raid volumes are being synced. This warning still comes out after
everything is fully synced up.
I think I know what happens. Did you reboot after MD was resynced? If
not, please try

blockdev --flushbufs /dev/sda
blockdev --flushbufs /dev/sdb

and try grub2-install once again.
Sam Varshavchik
2016-04-11 17:21:39 UTC
Permalink
Post by Andrei Borzenkov
Post by Sam Varshavchik
Post by Sam Varshavchik
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
Installation finished. No error reported.
Now, anyone have any idea what's up with these warnings?
...
Post by Sam Varshavchik
Googling around finds some references of this warning coming out while the
md-raid volumes are being synced. This warning still comes out after
everything is fully synced up.
I think I know what happens. Did you reboot after MD was resynced? If
not, please try
blockdev --flushbufs /dev/sda
blockdev --flushbufs /dev/sdb
and try grub2-install once again.
I did not reboot, but this did not make any difference.

[***@monster ~]# blockdev --flushbufs /dev/sda
[***@monster ~]# blockdev --flushbufs /dev/sdb
[***@monster ~]# /sbin/grub2-install /dev/sdb
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’. Some
modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’. Some
modules may be missing from core image..
Installation finished. No error reported.

This may or may not be related, but in the output of mdadm --detail I posted
previously: two of assembled arrays consist of units numbered 1 and 2:

Name : monster:0
UUID : 7ae940a5:bd5a0d0f:666adf78:e0c5b498
Events : 1188

Number Major Minor RaidDevice State
2 8 17 0 active sync /dev/sdb1
1 8 1 1 active sync /dev/sda1


Name : monster:1
UUID : 067004a2:11daf9c2:0cedca66:ac63c62d
Events : 1127

Number Major Minor RaidDevice State
2 8 18 0 active sync /dev/sdb2
1 8 2 1 active sync /dev/sda2

And the two others are numbered 2 and 3:

Name : monster:2
UUID : b0cb9b26:be362a98:012cdf18:19de5ac1
Events : 59413

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

Name : monster:3
UUID : ac2446aa:661a4977:0960a296:6d0b48c3
Events : 165897

Number Major Minor RaidDevice State
3 8 21 0 active sync /dev/sdb5
2 8 5 1 active sync /dev/sda5
Andrei Borzenkov
2016-04-11 17:35:42 UTC
Permalink
Post by Sam Varshavchik
On Mon, Apr 11, 2016 at 1:56 PM, Sam Varshavchik
Post by Sam Varshavchik
Post by Sam Varshavchik
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume
‘(null)’.
Post by Sam Varshavchik
Post by Sam Varshavchik
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume
‘(null)’.
Post by Sam Varshavchik
Post by Sam Varshavchik
Some modules may be missing from core image..
Installation finished. No error reported.
Now, anyone have any idea what's up with these warnings?
...
Post by Sam Varshavchik
Googling around finds some references of this warning coming out
while the
Post by Sam Varshavchik
md-raid volumes are being synced. This warning still comes out after
everything is fully synced up.
I think I know what happens. Did you reboot after MD was resynced? If
not, please try
blockdev --flushbufs /dev/sda
blockdev --flushbufs /dev/sdb
and try grub2-install once again.
I did not reboot, but this did not make any difference.
Installing for i386-pc platform.
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
/sbin/grub2-install: warning: Couldn't find physical volume ‘(null)’.
Some modules may be missing from core image..
Installation finished. No error reported.
OK, so please, do the same for partitions that are part of MD device
where /boot is located and try once more.

blockdev --flushbufs /dev/sdaX
blockdev --flushbufs /dev/sdbX

You did not answer which MD array is /boot so I cannot tell which ones.
Loading...