为什么 LVM 镜像在短暂的磁盘断开连接后会重建?

为什么 LVM 镜像在短暂的磁盘断开连接后会重建?

我有 2 个外部磁盘通过 USB3 连接到 Fedora 29 系统。它们是在 LVM RAID1 配置中设置的。

当 1 个磁盘断开连接、断电、USB 问题等时,整个 RAID 阵列将重建。镜像的VG中有3个逻辑卷,总计约8TB,因此重建需要几天时间。

每次删除磁盘时,无论数据是否发生更改等,镜像都会从 0% 开始重建,这是为什么? lvmd 是否不够“智能”,无法从镜像之前的位置进行拾取并进行少量“增量”同步以使镜像恢复一致?

附加信息:

# lvs -a -o name,copy_percent,devices vg-media
LV                   Cpy%Sync Devices                                    
movies               3.53     movies_rimage_0(0),movies_rimage_1(0)      
[movies_rimage_0]             /dev/sdd(0)                                
[movies_rimage_0]             /dev/sdd(1726464)                          
[movies_rimage_0]             /dev/sdd(1918467)                          
[movies_rimage_1]             /dev/sde2(128002)                          
[movies_rimage_1]             /dev/sde2(1918467)                         
[movies_rmeta_0]              /dev/sdd(1918465)                          
[movies_rmeta_1]              /dev/sde2(128001)                          
own_cloud            50.61    own_cloud_rimage_0(0),own_cloud_rimage_1(0)
[own_cloud_rimage_0]          /dev/sdd(1598464)                          
[own_cloud_rimage_0]          /dev/sdd(1880064)                          
[own_cloud_rimage_1]          /dev/sde2(1)                               
[own_cloud_rmeta_0]           /dev/sdd(1918464)                          
[own_cloud_rmeta_1]           /dev/sde2(0)                               
plex                 100.00   plex_rimage_0(0),plex_rimage_1(0)          
[plex_rimage_0]               /dev/sdd(1688064)                          
[plex_rimage_1]               /dev/sde2(1880067)                         
[plex_rmeta_0]                /dev/sdd(1918466)                          
[plex_rmeta_1]                /dev/sde2(1880066)
dmsetup table | grep media
vg--media-plex: 0 314572800 raid raid1 3 0 region_size 4096 2 253:16 253:17 253:18 253:19
vg--media-movies: 0 15032385536 raid raid1 3 0 region_size 8192 2 253:6 253:7 253:8 253:9
vg--media-plex_rimage_1: 0 314572800 linear 8:66 15401574399
vg--media-movies_rimage_1: 0 14352908288 linear 8:66 1048657919
vg--media-movies_rimage_1: 14352908288 679477248 linear 8:66 15716147199
vg--media-plex_rimage_0: 0 314572800 linear 8:48 13828622336
vg--media-movies_rimage_0: 0 13094617088 linear 8:48 2048
vg--media-movies_rimage_0: 13094617088 1258291200 linear 8:48 14143195136
vg--media-movies_rimage_0: 14352908288 679477248 linear 8:48 15716083712
vg--media-own_cloud_rimage_1: 0 1048576000 linear 8:66 73727
vg--media-own_cloud_rimage_0: 0 734003200 linear 8:48 13094619136
vg--media-own_cloud_rimage_0: 734003200 314572800 linear 8:48 15401486336
vg--media-plex_rmeta_1: 0 8192 linear 8:66 15401566207
vg--media-movies_rmeta_1: 0 8192 linear 8:66 1048649727
vg--media-own_cloud: 0 1048576000 raid raid1 3 0 region_size 4096 2 253:11 253:12 253:13 253:14
vg--media-plex_rmeta_0: 0 8192 linear 8:48 15716075520
vg--media-movies_rmeta_0: 0 8192 linear 8:48 15716067328
vg--media-own_cloud_rmeta_1: 0 8192 linear 8:66 65535
vg--media-own_cloud_rmeta_0: 0 8192 linear 8:48 15716059136

相关内容