Boot Fails With Lvm Snapshot

Home » CentOS » Boot Fails With Lvm Snapshot
CentOS 3 Comments

Hi,

I have a strange problem with my CentOS7 file server. I have a large data storage (75TB in RAID6, managed by lvm) and each night I create a snapshot  (removing first the previous one). The snapshot is mounted read-only so if a user remove a file accidentally he can restore it in the same day. However, if this snapshot exists, reboot of the server freeze at boot time and I must manually remove this snapshot. Why ?
There are no entry in /etc/fstab for this snapshot, it is a cron script 
that manage this snapshot and mount it.

Patrick

3 thoughts on - Boot Fails With Lvm Snapshot

  • Hi Gordon,

    my dracut package is the latest available for CentOS7 (this occur just after my “yum update” and reboot). It is dracut-033-568.el7.x86_64 in CentOS Linux release 7.8.2003 (Core)
    I’m going to rebuild my initrd as suggested with the snapshot setup.

    Thanks for the links.

    Patrick

    Le 19/08/2020 à 17:31, Gordon Messmer a écrit :

  • Hi,

    I check this morning, dm-snapshot.ko was yet included in initrd as show by lsinitrd.

    $ lsinitrd /boot/initramfs-3.10.0-1127.18.2.el7.x86_64.img | grep dm-snapshot.ko
    -rw-r–r–   1 root     root        20372 Jul 26 17:38
    usr/lib/modules/3.10.0-1127.18.2.el7.x86_64/kernel/drivers/md/dm-snapshot.ko.xz

    I’ve rebuilt the image this morning (dracut -fv) with the snapshot “on”
    and I’ll try a reboot next week (I work remotely these next days).

    An important thing is that during the kernel update (and initrd build for the new kernel), the snapshot was also available.

    $lvs
      LV       VG      Attr       LSize   Pool Origin   Data%  Meta%  Move Log Cpy%Sync Convert
      data1lv1 data1vg owi-aos— 
    75,00t                                                     
      snapdata data1vg swi-aos—  <2,93t      data1lv1
    1,23                                  
      homevol  osvg    -wi-ao----  
    4,88g                                                     
      optvol   osvg    -wi-ao----
    <97,66g                                                     
      rootvol  osvg    -wi-ao----
    <32,23g                                                     
      swapvol  osvg    -wi-ao----  
    7,81g                                                     
      tmpvol   osvg    -wi-ao---- 
    <9,77g                                                     
      varvol   osvg    -wi-ao----  <9,77g  

    Patrick

    Le 19/08/2020 à 18:18, Patrick Bégou a écrit :