LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-09-2015, 02:16 PM   #1
genevish
LQ Newbie
 
Registered: Sep 2015
Posts: 3

Rep: Reputation: Disabled
Moving disk space between mount points


I had:

/home = 1Tb
/ = 50G

I ran:

Code:
umount /home
lvreduce -L -900G /dev/centos/home
lvextend -L +900G /dev/centos/root
xfs_growfs /
And now home is unmountable. i suspect because I wiped the superblock? Can I reformat it somehow to fix this? There's nothing on the server yet so I can reinstall if needed, but I'd rather not...
 
Old 09-09-2015, 03:02 PM   #2
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by genevish View Post
I had:

/home = 1Tb
/ = 50G

I ran:

Code:
umount /home
lvreduce -L -900G /dev/centos/home
lvextend -L +900G /dev/centos/root
xfs_growfs /
And now home is unmountable. i suspect because I wiped the superblock? Can I reformat it somehow to fix this? There's nothing on the server yet so I can reinstall if needed, but I'd rather not...
Ouch! You needed to resize the filesystem first, which is not possible with xfs. You should have formatted your partitions with ext4 to be able to do that.
 
Old 09-09-2015, 07:13 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I have a dumb question. Wonder what would happen if you try to correct it back?
 
Old 09-10-2015, 06:34 AM   #4
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by jefro View Post
I have a dumb question. Wonder what would happen if you try to correct it back?
I doubt it is possible, but others may know better. You wrote earlier that there is nothing on the server yet. So just re-format /home and recreate the user directories. Was xfs the default in your distribution or did you choose it on purpose?
 
Old 09-10-2015, 12:26 PM   #5
genevish
LQ Newbie
 
Registered: Sep 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
XFS was the default. How do I reformat home at this point?

Thanks,

-Scott
 
Old 09-10-2015, 02:45 PM   #6
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by genevish View Post
XFS was the default. How do I reformat home at this point?
Instead of waiting a few hours for an answer you could have googled it in seconds.

http://lmgtfy.com/?q=format+partition+xfs

The partition needs to be unmounted for this. If you wanna format it with a different filesystem, you would need to change the mount options in /etc/fstab.
 
Old 09-11-2015, 12:09 PM   #7
genevish
LQ Newbie
 
Registered: Sep 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hortageno View Post
Instead of waiting a few hours for an answer you could have googled it in seconds.

http://lmgtfy.com/?q=format+partition+xfs

The partition needs to be unmounted for this. If you wanna format it with a different filesystem, you would need to change the mount options in /etc/fstab.
Ahh, I love using LMGTFY on dumbasses myself. However, I did google it and got results similar to these. They all detail scenarios where you are formatting an entire device (/dev/sda for example), but i just need to get just the /home mount point on /dev/sda reformatted or recreated. I ended up deleting the entire VM and recreating it from scratch with the correct partitions. Linux had some work to do on user friendliness, and disk formatting is it's biggest weakness, IMHO.
 
Old 09-11-2015, 12:36 PM   #8
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by genevish View Post
Ahh, I love using LMGTFY on dumbasses myself. However, I did google it and got results similar to these. They all detail scenarios where you are formatting an entire device (/dev/sda for example), but i just need to get just the /home mount point on /dev/sda reformatted or recreated. I ended up deleting the entire VM and recreating it from scratch with the correct partitions. Linux had some work to do on user friendliness, and disk formatting is it's biggest weakness, IMHO.
None my search results said to format an entire device, they all talk about partitions and volumes. So in your case it would have been

Code:
sudo mkfs.xfs /dev/centos/home
 
  


Reply



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
Does it possible to mount one disk image to some target points? Dimit Linux - General 3 01-12-2010 10:39 AM
Moving mount points due to size issues leesobo Linux - Software 3 01-02-2007 05:34 PM
moving mount points in fstab s_siouris Linux - General 1 01-27-2005 08:48 AM
Mounting new HD space into existing mount points? GT_Onizuka Linux - Hardware 4 05-26-2004 05:15 AM
Moving Disk Space in Linux ALF Linux - Software 6 11-27-2003 06:19 AM

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

All times are GMT -5. The time now is 09:55 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