[DRBD-user] Can TRIM One drbd volume but not the other.

Lars Ellenberg lars.ellenberg at linbit.com
Thu Feb 1 13:18:35 CET 2018


On Thu, Jan 25, 2018 at 10:32:24PM +0000, Eric Robinson wrote:
> Here is a WEIRD one.
> 
> Why would one drbd volume be trimmable and the other one not?
> 
> Here you can see me issuing the trim command against two different filesystems. It works on one but fails on the other.
> 
> ha11a:~ # fstrim -v /ha01_mysql
> /ha01_mysql: 0 B (0 bytes) trimmed
> 
> ha11a:~ # fstrim -v /ha02_mysql
> fstrim: /ha02_mysql: the discard operation is not supported
> 
> Both filesystems are on the same server, two different drbd devices on
> two different mdraid arrays, but the same underlying physical drives.

The backend on the peer(s) are similar as well?
Anything suspicious DRBD related in the kernel log?

> Yet it can be seen that discard is enabled on drbd0 but not on drbd1...
> 
> NAME                            DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
> sda                                    0      512B       4G         1
> ├─sda1                                 0      512B       4G         1
> │ └─md0                                0      128K     256M         0
> ├─sda2                                 0      512B       4G         1
> │ └─md1                                0      128K     256M         0
> ├─sda3                                 0      512B       4G         1
> ├─sda4                                 0      512B       4G         1
> ├─sda5                                 0      512B       4G         1
> │ └─md2                                0        1M     256M         0
> │   └─drbd0                            0        1M     128M         0
> │     └─vg_on_drbd0-lv_on_drbd0   393216        1M     128M         0

Why this odd alignment? LVM meta data size of 640k?
Try 1M :-)

> └─sda6                                 0      512B       4G         1
>   └─md3                                0        1M     256M         0
>     └─drbd1                            0        0B       0B         0
>       └─vg_on_drbd1-lv_on_drbd1        0        0B       0B         0


-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker

DRBD® and LINBIT® are registered trademarks of LINBIT
__
please don't Cc me, but send to list -- I'm subscribed


More information about the drbd-user mailing list