Joakim Ziegler
2013-Mar-23 03:27 UTC
[CentOS] "Can't find root device" with lvm root after moving drive on CentOS 6.3
I have an 8-core SuperMicro Xeon server with CentOS 6.3. The OS is installed on a 120 GB SSD connected by SATA, the machine also contains an Areca SAS controller with 24 drives connected. The motherboard is a SuperMicro X9DA7. When I installed the OS, I used the default options, which creates an LVM volume group to contain / and /home, and keeps /boot and /boot/efi outside the volume group. The machine is a couple of months old, and has been stable. While installing some new hardware, I decided to also clean up the cabling in the box, since it was a bit messy. In doing this, I probably moved the boot SSD disk to another port on the motherboard (it has a bunch, 2 SATA 6GBps and 6 SATA 3GBps). When I booted the box after this, I got a kernel panic, the typical "Can't find root device". I read some docs, and first tried to boot from a rescue disc and reinstal GRUB, but that didn't change anything. Further Googling got me the rdshell kernel parameter, and that dropped me to a shell when it failed to find the root device. Reading https://fedoraproject.org/wiki/How_to_debug_Dracut_problems , I did the following: # lvm vgscan # lvm vgchange -ay And then # ln -s /dev/mapper/<volumegroup>-<root_volume> /dev/root # exit After this, the box boots up normally, and everything works as it should. However, when I reboot, it again fails to find the root device. So, after all this, my question is, how do I make Dracut (I'm assuming) understand that this LVM volume is my root device and pick it up automatically? And, is there a way to avoid this problem in the future, if I move drives around? Surely it can't be normal for this to happen just because I connect a drive to another port? -- Joakim Ziegler - Supervisor de postproducci?n - Terminal joakim at terminalmx.com - 044 55 2971 8514 - 5264 0864
Barry Brimer
2013-Mar-23 03:33 UTC
[CentOS] "Can't find root device" with lvm root after moving drive on CentOS 6.3
> When I booted the box after this, I got a kernel panic, the typical > "Can't find root device".> Reading https://fedoraproject.org/wiki/How_to_debug_Dracut_problems , I > did the following: > > # lvm vgscan > # lvm vgchange -ay > > And then > > # ln -s /dev/mapper/<volumegroup>-<root_volume> /dev/root > # exit > > After this, the box boots up normally, and everything works as it > should. However, when I reboot, it again fails to find the root device. > > So, after all this, my question is, how do I make Dracut (I'm assuming) > understand that this LVM volume is my root device and pick it up > automatically?What does your kernel line in grub look like? Barry
Gordon Messmer
2013-Mar-25 05:29 UTC
[CentOS] "Can't find root device" with lvm root after moving drive on CentOS 6.3
On 03/22/2013 08:27 PM, Joakim Ziegler wrote:> So, after all this, my question is, how do I make Dracut (I'm assuming) > understand that this LVM volume is my root device and pick it up > automatically?I've looked through Dracut trying to spot circumstances that might cause the problem that you've described, but came up with nothing. udev should be scanning block devices as they become available, and setting up any logical volumes on all of the available block devices. It may be useful to capture some information in the debugging shell, before running vgscan. As suggested in the fedora debugging document, capture the output of the following commands to get a better idea of what the kernel knows about block devices before you manually start the volumes, and maybe that'll lead us to some conclusion about why the devices aren't found. lvm pvdisplay lvm vgdisplay lvm lvdisplay blkid dmesg
Maybe Matching Threads
- CentOS 6.4 kernel panic on boot after upgrading kernel to 2.6.32-431.29.2
- fsck.ext4 Failed to optimize directory
- LiveCD System recovery - Mounting LVM?
- How to make a network interface come up automatically on link up?
- Filesystem writes unexpectedly slow (CentOS 6.4)