LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Cannot format LVM to xfs (https://www.linuxquestions.org/questions/red-hat-31/cannot-format-lvm-to-xfs-4175597500/)

redhatwannabe 01-15-2017 07:24 AM

Cannot format LVM to xfs
 
Dear all,

Code:


mkfs.xfs /dev/vg_root_2/lv_root2
agsize (2048 blocks) too small, need at least 4096 blocks
Usage: mkfs.xfs
/* blocksize */        [-b log=n|size=num]
/* metadata */          [-m crc=0|1,finobt=0|1]
/* data subvol */      [-d agcount=n,agsize=n,file,name=xxx,size=num,
                            (sunit=value,swidth=value|su=num,sw=num|noalign),
                            sectlog=n|sectsize=num
/* force overwrite */  [-f]
/* inode size */        [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,
                            projid32bit=0|1]
/* no discard */        [-K]
/* log subvol */        [-l agnum=n,internal,size=num,logdev=xxx,version=n
                            sunit=value|su=num,sectlog=n|sectsize=num,
                            lazy-count=0|1]
/* label */            [-L label (maximum 12 characters)]
/* naming */            [-n log=n|size=num,version=2|ci,ftype=0|1]
/* no-op info only */  [-N]
/* prototype file */    [-p fname]
/* quiet */            [-q]
/* realtime subvol */  [-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */        [-s log=n|size=num]
/* version */          [-V]
                        devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
      xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).

same thing if I execute the following"

Code:

mkfs.xfs /dev/vg_root_2/lv_root2 -b size=4096

agsize (2048 blocks) too small, need at least 4096 blocks
Usage: mkfs.xfs
/* blocksize */        [-b log=n|size=num]
/* metadata */          [-m crc=0|1,finobt=0|1]
/* data subvol */      [-d agcount=n,agsize=n,file,name=xxx,size=num,
                            (sunit=value,swidth=value|su=num,sw=num|noalign),
                            sectlog=n|sectsize=num
/* force overwrite */  [-f]
/* inode size */        [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,
                            projid32bit=0|1]
/* no discard */        [-K]
/* log subvol */        [-l agnum=n,internal,size=num,logdev=xxx,version=n
                            sunit=value|su=num,sectlog=n|sectsize=num,
                            lazy-count=0|1]
/* label */            [-L label (maximum 12 characters)]
/* naming */            [-n log=n|size=num,version=2|ci,ftype=0|1]
/* no-op info only */  [-N]
/* prototype file */    [-p fname]
/* quiet */            [-q]
/* realtime subvol */  [-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */        [-s log=n|size=num]
/* version */          [-V]
                        devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
      xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).
[root@ol71-12102-db ~]# fdisk -l /dev/sdb1

Disk /dev/sdb1: 5797 MB, 5797154816 bytes, 11322568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Code:

[root@ol71-12102-db ~]# fdisk -l /dev/sdb1

Disk /dev/sdb1: 5797 MB, 5797154816 bytes, 11322568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

any solution provided will be greatly appreciated!

michaelk 01-15-2017 09:13 AM

Post the output of the command:

lvscan

redhatwannabe 01-15-2017 09:13 PM

Code:

[root@ol71-12102-db ~]# lvscan
  ACTIVE            '/dev/ol/root' [6.27 GiB] inherit
  ACTIVE            '/dev/ol/swap' [4.88 GiB] inherit
  ACTIVE            '/dev/vg_root_2/lv_root2' [8.00 MiB] inherit


michaelk 01-16-2017 05:56 AM

Code:

ACTIVE            '/dev/vg_root_2/lv_root2' [8.00 MiB] inherit
Your LV is only 8 MiB. What are you trying to accomplish?

Jjanel 01-16-2017 09:39 PM

Quote:

agsize (2048 blocks) too small, need at least 4096 blocks
From man mkfs.xfs(8):The value is the desired size of the allocation group expressed in bytes (usually using the m or g suffixes). This value must be a multiple of the filesystem block size, and must be at least 16MiB, ...

lvresize/reduce/extend/... maybe

p.s. if/when you find a solution, please post it (for future readers)
and mark this Thread as '[SOLVED]' (via ThreadTools at top of page)

Best wishes... Let us know...


All times are GMT -5. The time now is 06:59 AM.