root on dm-cache : always do full resync after reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
Hi,
I added an SSD drive and convert my LVs to cached LVs :
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda6 vg_acer lvm2 a-- 90,00g 6,00g <= rotational drive
/dev/sda7 lvm2 --- 9,46g 9,46g
/dev/sdb vg_acer lvm2 a-- 29,50g 4,95g <= SSD drive
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_docker vg_acer Cwi-aoC--- 7,00g [cache_docker] [lv_docker_corig] 100,00 6,35 0,00
lv_home vg_acer Cwi-aoC--- 60,00g [cache_home] [lv_home_corig] 11,06 19,24 0,03
lv_root vg_acer Cwi-aoC--- 14,00g [cache_root] [lv_root_corig] 100,00 9,73 0,00
lv_swap vg_acer -wi-ao---- 3,00g
# mount | grep mapper
/dev/mapper/
/dev/mapper/
/dev/mapper/
The problem is : after each boot, the system does a full resync of the lv_root LV :
# lvs -o+cache_
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert CacheDirtyBlocks CacheReadHits CacheReadMisses CacheWriteHits CacheWriteMisses
lv_docker vg_acer Cwi-aoC--- 7,00g [cache_docker] [lv_docker_corig] 100,00 6,35 0,19 78 605182 1144143 200214 516198
lv_home vg_acer Cwi-aoC--- 60,00g [cache_home] [lv_home_corig] 11,05 19,24 0,12 34 334339 238365 656695 352970
lv_root vg_acer Cwi-aoC--- 14,00g [cache_root] [lv_root_corig] 100,00 9,73 90,38 88844 32320 44223 1508 2924
lv_swap vg_acer -wi-ao---- 3,00g
The problem only occurs on lv_root, which is the root filesystem. lv_home and lv_docker seem to be OK after boot.
I guess this might be related to this message I get on shutdown :
Systemd-
# uname -r
4.4.0-21-generic
# lvm version
LVM version: 2.02.133(2) (2015-10-30)
Library version: 1.02.110 (2015-10-30)
Driver version: 4.34.0
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lvm2 2.02.133-1ubuntu10
ProcVersionSign
Uname: Linux 4.4.0-21-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME-Flashback
Date: Sun May 1 19:19:54 2016
SourcePackage: lvm2
UpgradeStatus: Upgraded to xenial on 2016-04-24 (6 days ago)
Changed in lvm2 (Ubuntu): | |
importance: | Undecided → High |
I experience same after adding a new SATA drive and extending the VG ang LV.
I get the "Systemd-shutdown: Failed to finalize DM devices, ignoring." message after "shutdown -h now" or "shutdown -P now" command and right after a "click" sound from the computer case. I have to manually reset the computer. The computer reboots fine.
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda1 datavg lvm2 a-- 298,09g 0
/dev/sdb2 sysvg lvm2 a-- 18,62g 468,00m
/dev/sdb5 datavg lvm2 a-- 55,42g 0
/dev/sdc1 datavg lvm2 a-- 149,05g 0
/dev/sdd1 datavg lvm2 a-- 37,27g 0
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lvdata datavg -wi-ao---- 539,82g
lvroot sysvg -wi-ao---- 16,77g
lvswap sysvg -wi-ao---- 1,39g
# mount | grep mapper sysvg-lvroot on / type ext4 (rw,relatime, errors= remount- ro,data= ordered) datavg- lvdata on /mnt/data type ext4 (rw,nosuid, nodev,noexec, relatime, data=ordered)
/dev/mapper/
/dev/mapper/
# uname -r
4.4.0-38-generic
# lvm version
LVM version: 2.02.133(2) (2015-10-30)
Library version: 1.02.110 (2015-10-30)
Driver version: 4.34.0
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial