LinuxQuestions.org
Help answer threads with 0 replies.
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 04-06-2024, 02:16 PM   #1
grounddolphin
LQ Newbie
 
Registered: Mar 2023
Posts: 12

Rep: Reputation: 0
unallocate space from home partition


Hi, just want to ask or the steps on how to unallocate space from my home partition. Currently im using centos 7 in a 500 GB HDD, (50 GB as root, 8 GB as swap and 407 GB as home)

Im planning to install another linux OS to make it dual OS. Since my home partition is 407 GB, i would like to unallocate around 250 GB and used it for the other OS? Is it possible? if yes may i know the steps? That would not affect my current OS? Thanks a lot.

By the way, my centos was installed as LVM. When i run lsblk under Type column, it is showing LVM.
 
Old 04-06-2024, 03:15 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,716

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
The default CentOS install creates LVM as posted but also uses xfs as the filesystem. There isn't a tool to shrink an xfs partition so you need to copy the contents, resize the lv, create a new filesystem and then copy the data back.

It is a bit more complicated because you are using lvm since you need to recreate the home LV, and then resize the physical partition itself. Typically the default order is root,swap and then home so hopefully you do not need to mess with the other LVs. You also may need to consider if you are using legacy MBR and whether you need an extended partition or not.

Always have a good backup...

Last edited by michaelk; 04-06-2024 at 03:29 PM.
 
Old 04-06-2024, 08:16 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Strictly speaking, this is all more complicated because of the use of xfs. Were it (for example) ext4, the whole process would be straight-forward. LVM itself is designed to accommodate this type of situation.

Let's see all the output from this (copy-paste should work).
Code:
lsblk -f -o +SIZE

Last edited by syg00; 04-06-2024 at 08:28 PM. Reason: added lsblk request
 
  


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
[SOLVED] /dev/sda2 root swap partition deleted accidentally while increasing the partition space of /dev/mapper/rhel-root space bomabay123 Linux - Enterprise 5 12-05-2020 11:28 PM
Division of Logical Memory Space in to User Space and Kernel Space shreshtha Linux - Newbie 2 01-14-2010 09:59 AM
/home partition taking space from / partition rpcutts Linux - Software 3 03-04-2009 05:09 AM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM

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

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