0

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

ewwhite
  • 194,921
  • 91
  • 434
  • 799
abkrim
  • 407
  • 6
  • 18

1 Answers1

0

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.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
  • 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. – abkrim Feb 27 '22 at 10:05