LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2015, 03:28 PM   #1
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Rep: Reputation: Disabled
LVM xfs file system


I am running Red Hat 7.1 enterprise where I have a lvm volume for "/" with a xfs filesystem. With an ext2 file system I would use lvextend on the lvm volume then use e2fsck -f on the
lvm volume then resize2fs. What do you use with the xfs lvm volume? What do I use to replace e2fsck and resize2fs?
 
Old 06-26-2015, 06:50 PM   #2
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,937

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
If you use the --resizefs parameter, then after the volume has been extended, it will extend the file system for you.
Same parameter on lvreduce works.

Fairly sure it will work for xfs.
 
Old 06-26-2015, 07:04 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,753

Rep: Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973
Quote:
Originally Posted by mikenash View Post
What do you use with the xfs lvm volume? What do I use to replace e2fsck and resize2fs?
Did you bother to search ?. "man xfs" will even get you started.

Enlarging xfs is pretty painless, similar to ext, but should you ever need to reduce its allocation, you're in for some extra pain.
 
Old 06-27-2015, 11:13 AM   #4
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
I am finding information on commands but little information on the process. Found xfs_growfs and this worked after I preformed a lvextend. Obvious now but a documented process would help. If anyone can provide a link I would appreciate it very much. Some things I still find that are not clear to me about this process. With an ext type LVM volume I would execute lvextend, e2fsck -f and then resize2fs against the lvm volume. Is there something else that needs to be executed or does the xfs_growfs do both of the later executed commands; (e2fsck & resize2fs)? Is there a way to check the xfs filesystem while mounted. xfs_check is not a command on Red Hat 7.1 enterprise and xfs_repair -n will not work on a mounted filesystem. I tried xfs_info and it is unclear to me if it will report and flag errors.
 
Old 06-27-2015, 12:33 PM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,937

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
An overall introduction to LVM can be found in an excellent magazine (Full Circle) - see back issue 80, choose your preferred language at
http://fullcirclemagazine.org/issue-80/
The part relevant to LVM is on pages 12 - 18.
 
Old 06-27-2015, 10:22 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,753

Rep: Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973Reputation: 3973
RHEL has excellent doco - go there and download the LVM Admin Guide and the Storage Admin Guide. The latter covers xfs expanding and checking.
I only rarely use xfs - has too many limitations in setups that aren't massively scaled.
 
Old 06-30-2015, 02:51 PM   #7
mikenash
Member
 
Registered: Dec 2014
Posts: 84

Original Poster
Rep: Reputation: Disabled
The xfs_repair states that the lvm volume is required to be unmounted to be repaired. I was disappointed when xfs_repair -n would not check a mounted lvm volume. Unfortunately I have not found any utility that would check a mounted xfs lvm volume.
I appreciate all the pointers to understanding LVM and file systems. Lot of good information and I may have missed something. I would appreciate a confirmation to confirm that checking can not be performed on a mounted xfs lvm volume or proven wrong that a xfs lvm volume can be check on a xfs lvm volume. Thank everyone.
 
Old 06-30-2015, 05:35 PM   #8
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,937

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
I think it would be accurate to say that you cannot check or repair any kind of LVM mounted volume - for any filesystem.
For info you could run
Code:
lvs
 
Old 08-07-2015, 12:14 PM   #9
krayziehustler
LQ Newbie
 
Registered: Aug 2015
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by mikenash View Post
The xfs_repair states that the lvm volume is required to be unmounted to be repaired. I was disappointed when xfs_repair -n would not check a mounted lvm volume. Unfortunately I have not found any utility that would check a mounted xfs lvm volume.
I appreciate all the pointers to understanding LVM and file systems. Lot of good information and I may have missed something. I would appreciate a confirmation to confirm that checking can not be performed on a mounted xfs lvm volume or proven wrong that a xfs lvm volume can be check on a xfs lvm volume. Thank everyone.
Just signed on to confirm that you CAN resize an XFS Logical Volume while it is mounted. Just like you could before on ext2/3/4.

The command is "xfs_growfs /dev/volume_group_name/lv_name". Just tested and verified it on Cent OS 7.1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
File recovery after partition table damage - XFS file system gracecourt Linux - General 4 09-28-2017 05:29 PM
XFS File System For Database Server cachedrive Linux - Server 4 06-01-2015 01:05 AM
XFS File system on my storage Linux Fan Linux - Hardware 1 05-20-2009 04:25 AM
....ANY XFS FILE SYSTEM TIPS ???? anyone knows ??? DOTT.EVARISTI Linux - Software 1 04-22-2008 06:49 AM
checking XFS file system sikkalgopal Linux - Newbie 1 08-21-2006 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:17 AM.

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