I sent this to the drbd list too, but it's possible that someone here may know.

This 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.

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
└─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


The filesystems are set up the same. (Note that I do not want automatic discard 
so that option is not enabled on either filesystem, but the problem is not the 
filesystem, since that relies on drbd, and you can see from lsblk that the drbd 
volume is the problem.)

ha11a:~ # mount|grep drbd
/dev/mapper/vg_on_drbd1-lv_on_drbd1 on /ha02_mysql type ext4 
(rw,relatime,stripe=160,data=ordered)
/dev/mapper/vg_on_drbd0-lv_on_drbd0 on /ha01_mysql type ext4 
(rw,relatime,stripe=160,data=ordered)





_______________________________________________
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to