Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

LVM SSD Cachepool how enable fstrim

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
marco__mg
Posts: 3
Joined: 2013-10-20 09:40

LVM SSD Cachepool how enable fstrim

#1 Post by marco__mg »

Hello to everybody, I was playing with LVM and I was setting up a volume with ext4 on an HDD and I want to use an SSD as a cache.

What I first done was

Code: Select all

lvcreate --type cache-pool -l 100%FREE -n datacache SSD /dev/sda3
lvcreate --type cache -l 100%FREE -n data --cachepool datacache SSD --cachemode writeback /dev/sdb1
So respectivily I created a cache-pool voume called datacache and than a vomume called data attached to datacache.

I think (the problem is I don't remember) that fstrim works perfectly in this way.

Then I had to do some operations on disk and I had to deattach my cache. So I uncached my disk

Code: Select all

lvconvert --uncache /dev/mapper/SSD-data
Then I moved the disk (and other thinks) and at the end I reattached my disk to a cache-pool

Code: Select all

lvcreate --type cache-pool -l 100%FREE -n datacache SSD /dev/sda3
lvconvert --type cache --cachemode writeback --cachepool datacache SSD/data
The problem is that now if I fstrim i obtain

Code: Select all

root@me:~# fstrim -a
fstrim: /mnt/data: FITRIM ioctl failed: Argument not valid
I am not completly sure that before detaching and reattaching the cache it worked, but I suppose to because I tested fstrim and I don't remember any errors.

I am using debian buster.

Code: Select all

root@me:~# uname -a
Linux me 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
Thank you in advice. If I missed some important information I am really sorry. Tell me what you need and I'll post it :D
~ Marco
From debianizzati.org

Post Reply