My root partition is XFS on LVM.

Before I did anything, I had two physical disks which were combined using md as /dev/md126 into a PV. That PV was the only member of a VG centos_x5backup, and there were two LVs, root and swap.

I was running out of disk space:

# df -h /
Filesystem                        Size  Used Avail Use% Mounted on
/dev/mapper/centos_x5backup-root  590G  509G   81G  86% /

I wanted more space on root. I purchased two new drives, created a md /dev/md0 combining them in raid1. That's active and resyncing:

md127 : active raid1 sda1[0] sdd1[1]
      999424 blocks super 1.2 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md0 : active raid1 sdb1[0] sdc1[1]
      1171979840 blocks super 1.2 [2/2] [UU]
      [=============>.......]  resync = 66.0% (773868928/1171979840) finish=393.1min speed=16874K/sec
      bitmap: 6/9 pages [24KB], 65536KB chunk

I added md0 as a new PV in the existing VG, and resized:

ssm resize -s+100%FREE /dev/mapper/centos_x5backup-root

I've run xfs-growfs -d /:

# xfs_growfs -d /
meta-data=/dev/mapper/centos_x5backup-root isize=512    agcount=13, agsize=36031232 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=437118976, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=70373, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data size unchanged, skipping

But after all that:

# df -h /
Filesystem                        Size  Used Avail Use% Mounted on
/dev/mapper/centos_x5backup-root  1.7T  1.6T   71G  96% /

What gives? df sees the space, but thinks its "used".

Why isn't the new space free?


Booting from a rescue disk and running xfs_repair on /dev/mapper/centos_x5backup-root fixed the problem.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.