Score:0

Is possible to change metadata of XFS system to another disk (such SSD)

cn flag

I've a system in VPS with a big XFS.

Now I have the possibility to add an SSD device to that VPS.

Is it possible to change the meta-data destination from partition formatted as SSD to SSD partition to improve logging?

All the information I see is to do it before starting to use it, not when it is in use, and it scares me because it is a storage vps that already has 20TB of data.

Now I've this information

 xfs_info /dev/mapper/stor-stor_vol
meta-data=/dev/mapper/stor-stor_vol isize=512    agcount=40, agsize=268435455 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=10737417216, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

I like change meta-data to a SSD device

Score:0
cn flag

No, xfs metadata device cannot be changed after creation. Note the lack of options to do such a thing in xfs_admin. Utilities to dump metadata exist, but only for diagnostic and support purposes, and this metadata cannot be restored into an existing file system.

Backup the data, destroy the volume, re-create it with the desired logdev options, and restore data. If this procedure scares you, test the restore first to some other destination.

Assuming the goal of bothering with this is to improve performance, also consder that Linux LVM can be configured with cache LVs. See documentation at man lvmcache. At a lower level than the file system, it does not know about file system metadata, but still might be able to speed up block I/O.

XFS logs can be on LVM LVs, same as LVM cache volumes. Or have both at once on the same SSD. Add the fast disk PV (/dev/nvme or whatever the device is) to your "stor" volume group. And be sure LVs are created on it, by specifying the PV as an argument to lvcreate.

cn flag
Thanks, for reply. Is a LVM vol in my question. Problem is not more space free on physical dirves for reply data to another logical volumen with same size.
ar flag
CR.
@abkrim Assuming we're talking about the "logdev". You **can** in fact move a log device from internal to external. See my answer https://serverfault.com/a/1141495/307679
John Mahowald avatar
cn flag
I am not interested in recommending xfs_db for a performance boost. Consider making your own answer, or suggesting that other question is a duplicate.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.