I have 2 SSD with LVM and LVM RAID1 (not md raid).
If i try to trim a normal LVM, it works, if i try to trim the LVM Raid1 filesystems it fails:
# hdparm -I /dev/sda | grep TRIM * Data Set Management TRIM supported (limit 8 blocks)
# hdparm -I /dev/sdb | grep TRIM
* Data Set Management TRIM supported (limit 8 blocks)
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 pve lvm2 a-- 465.26g 60.24g
/dev/sdb3 pve lvm2 a-- 465.26g 60.24g
# vgs
VG #PV #LV #SN Attr VSize VFree
pve 2 4 0 wz--n- 930.52g 120.48g
root@fm2:~# lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
data pve rwi-aor-- 393.64g 100.00
root pve rwi-aor-- 5.37g 100.00
swap1 pve -wi-ao--- 6.00g
swap2 pve -wi-ao--- 6.00g
teste pve -wi-ao--- 1.00g
# cat /proc/mounts | grep discard
/dev/mapper/pve-root / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered,discard 0 0
/dev/mapper/pve-data /var/lib/vz ext4 rw,relatime,barrier=1,data=ordered,discard 0 0
/dev/mapper/pve-teste /mnt ext4 rw,relatime,barrier=1,data=ordered,discard 0 0
# fstrim -v /
fstrim: /: FITRIM ioctl failed: Operation not supported
# fstrim -v /var/lib/vz
fstrim: /var/lib/vz: FITRIM ioctl failed: Operation not supported
# fstrim -v /mnt
/mnt: 0 bytes were trimmed
This last one is a lvm, but without any raid and it works...
So looks like VLM raid don't support trim... can this be fixed or workarounded? will the new 3.10 kernel solve this?
For now, to reduce the problem, i have keep about 5GB of unpartitioned SSD space
If i try to trim a normal LVM, it works, if i try to trim the LVM Raid1 filesystems it fails:
# hdparm -I /dev/sda | grep TRIM * Data Set Management TRIM supported (limit 8 blocks)
# hdparm -I /dev/sdb | grep TRIM
* Data Set Management TRIM supported (limit 8 blocks)
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 pve lvm2 a-- 465.26g 60.24g
/dev/sdb3 pve lvm2 a-- 465.26g 60.24g
# vgs
VG #PV #LV #SN Attr VSize VFree
pve 2 4 0 wz--n- 930.52g 120.48g
root@fm2:~# lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
data pve rwi-aor-- 393.64g 100.00
root pve rwi-aor-- 5.37g 100.00
swap1 pve -wi-ao--- 6.00g
swap2 pve -wi-ao--- 6.00g
teste pve -wi-ao--- 1.00g
# cat /proc/mounts | grep discard
/dev/mapper/pve-root / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered,discard 0 0
/dev/mapper/pve-data /var/lib/vz ext4 rw,relatime,barrier=1,data=ordered,discard 0 0
/dev/mapper/pve-teste /mnt ext4 rw,relatime,barrier=1,data=ordered,discard 0 0
# fstrim -v /
fstrim: /: FITRIM ioctl failed: Operation not supported
# fstrim -v /var/lib/vz
fstrim: /var/lib/vz: FITRIM ioctl failed: Operation not supported
# fstrim -v /mnt
/mnt: 0 bytes were trimmed
This last one is a lvm, but without any raid and it works...
So looks like VLM raid don't support trim... can this be fixed or workarounded? will the new 3.10 kernel solve this?
For now, to reduce the problem, i have keep about 5GB of unpartitioned SSD space
Last edited: