[mythtv-users] [ot] Resizing XFS partitions

Ben Lancaster mail at benlancaster.co.uk
Wed Jan 14 14:55:33 UTC 2009


Hey,

So I have an XFS partition on a RAID0 array on my slave mythbackend.  
Until recently, the RAID device had another partition on it, which  
I've since removed. The now-removed partition was at the beginning of  
the device, and the XFS partition was at the end of the device. I'd  
like to grow the XFS partition to fill the whole device, but I'm  
struggling to work out how? Parted doesn't support resizing XFS  
volumes, so I tried "xfs_growfs /dev/mapper/nvidia_bhcebfacp2" (the  
xfs partitioned device), it dumps some stuff out but doesn't seem to  
do anything:

meta-data=/dev/mapper/nvidia_bhcebfacp2 isize=256    agcount=16,  
agsize=6400521 blks
          =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=102408336,  
imaxpct=25
          =                       sunit=0      swidth=0 blks,  
unwritten=1
naming   =version 2              bsize=4096
log      =internal               bsize=4096   blocks=32768, version=1
          =                       sectsz=512   sunit=0 blks, lazy- 
count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

sfdisk -d says this:

# partition table of /dev/mapper/nvidia_bhcebfac
unit: sectors

/dev/mapper/nvidia_bhcebfac1 : start=        0, size=        0, Id= 0
/dev/mapper/nvidia_bhcebfac2 : start=157501260, size=819266805, Id=83
/dev/mapper/nvidia_bhcebfac3 : start=        0, size=        0, Id= 0
/dev/mapper/nvidia_bhcebfac4 : start=        0, size=        0, Id= 0

I presume I somehow have to increase the size of the partition with  
sfdisk, and then run xfs_growfs? I tried changing the details above to:

# partition table of /dev/mapper/nvidia_bhcebfac
unit: sectors

/dev/mapper/nvidia_bhcebfac1 : start=        0, size=        0, Id= 0
/dev/mapper/nvidia_bhcebfac2 : start=        0, size=976768065, Id=83
/dev/mapper/nvidia_bhcebfac3 : start=        0, size=        0, Id= 0
/dev/mapper/nvidia_bhcebfac4 : start=        0, size=        0, Id= 0

(Added start to size, set start to 0 and updated size to the original  
sum) but sfdisk comes back with:

# sfdisk /dev/mapper/nvidia_bhcebfac < partitionnew.txt
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/mapper/nvidia_bhcebfac: 0 cylinders, 0 heads, 0 sectors/track
Old situation:
Warning: The partition table looks like it was made
   for C/H/S=*/255/63 (instead of 0/0/0).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting  
from 0

    Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mapper/nvidia_bhcebfac1          0       -       0          0     
0  Empty
/dev/mapper/nvidia_bhcebfac2       9804   60800   50997  409633402+   
83  Linux
/dev/mapper/nvidia_bhcebfac3          0       -       0          0     
0  Empty
/dev/mapper/nvidia_bhcebfac4          0       -       0          0     
0  Empty
Warning: given size (976768065) exceeds max allowable size (0)

sfdisk: bad input

...most of which means nothing to me.

I'd appreciate any help or points in the right direction!

Thanks,

Ben


More information about the mythtv-users mailing list