LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-15-2017, 07:24 AM   #1
redhatwannabe
Member
 
Registered: Dec 2008
Posts: 83

Rep: Reputation: 15
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!
 
Old 01-15-2017, 09:13 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897
Post the output of the command:

lvscan
 
Old 01-15-2017, 09:13 PM   #3
redhatwannabe
Member
 
Registered: Dec 2008
Posts: 83

Original Poster
Rep: Reputation: 15
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
 
Old 01-16-2017, 05:56 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897
Code:
ACTIVE            '/dev/vg_root_2/lv_root2' [8.00 MiB] inherit
Your LV is only 8 MiB. What are you trying to accomplish?
 
Old 01-16-2017, 09:39 PM   #5
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
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...

Last edited by Jjanel; 01-17-2017 at 04:34 AM.
 
  


Reply

Tags
rhel7



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LVM xfs file system mikenash Linux - Newbie 8 08-07-2015 12:14 PM
Centos 7 xfs lvm resize leblinux CentOS 1 07-09-2015 05:51 PM
Creating a LVM that uses XFS don_wombat_73 Linux - Newbie 1 12-01-2008 05:52 PM
Format a NTFS partition to XFS powadha Linux - General 1 03-13-2005 05:38 AM
how to format a disk in XFS filesystem bennethos Linux - Newbie 2 10-14-2003 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration