LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-19-2018, 05:54 PM   #1
jaydul
Member
 
Registered: Sep 2012
Posts: 69

Rep: Reputation: Disabled
Exclamation How to integrate /home back into main partition


Increase Root Partition Size from /home.
I created a separate /home and I dont need that any data just want to Increase Root Partition / Size from /home

[root@jaydul /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 4.9G 4.9G 20K 100% /
devtmpfs 4.9G 0 4.9G 0% /dev
tmpfs 4.9G 0 4.9G 0% /dev/shm
tmpfs 4.9G 9.3M 4.9G 1% /run
tmpfs 4.9G 0 4.9G 0% /sys/fs/cgroup
/dev/sda1 4.9G 207M 4.7G 5% /boot
/dev/sda6 157G 34G 123G 22% /var
/dev/sda5 4.9G 33M 4.9G 1% /home
tmpfs 1000M 0 1000M 0% /run/user/0


[root@jaydul /]# fdisk -l

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 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
Disk label type: dos
Disk identifier: 0x00018909

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 10242047 5120000 83 Linux
/dev/sda2 10242048 26626047 8192000 82 Linux swap / Solaris
/dev/sda3 26626048 36866047 5120000 83 Linux
/dev/sda4 36866048 419430399 191282176 5 Extended
/dev/sda5 36868096 47108095 5120000 83 Linux
/dev/sda6 47110144 374790143 163840000 83 Linux


-----------
Can I just un-Mount /home or anything more
umount -fl /home
 
Old 07-19-2018, 06:33 PM   #2
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Rep: Reputation: 210Reputation: 210Reputation: 210
Perhaps the program GParted could provide you some assistance.
 
Old 07-19-2018, 06:37 PM   #3
jaydul
Member
 
Registered: Sep 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
I want done via Unmount the partition Use the option d to delete a partition.Like this way Because server is running and I cann add live CD my VPS

Thank you
Quote:
Originally Posted by mark_alfred View Post
Perhaps the program GParted could provide you some assistance.
 
Old 07-19-2018, 06:46 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,160

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Simply deleting the partition is a bad idea - could be done from single user mode safely, but not while any user(s) is logged in. And of course any data becomes un-reachable. Won't help in this case anyway, as to increase a partition requires the unallocated space to be contiguous to (immediately alongside) that partition.
gparted liveCD is the best means - I'd shrink (or move elsewhere) the swap and use that space to increase the root. Hopefully gparted won't change the UUID, but I haven't checked. Note also you could easily reduce the boot partition by several Gig and use that if the swap was moved elsewhere.
 
Old 07-19-2018, 06:52 PM   #5
jaydul
Member
 
Registered: Sep 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
I agree But I dont use/home so I want back into main partition So I can get 10GB under /root now Here is /root 5GB and /home 5GB./root is full so want to Resize Partition with /root and /home back into main partition like /root ir / root here is files and I dont have backup.
Quote:
Originally Posted by syg00 View Post
Simply deleting the partition is a bad idea - could be done from single user mode safely, but not while any user(s) is logged in. And of course any data becomes un-reachable. Won't help in this case anyway, as to increase a partition requires the unallocated space to be contiguous to (immediately alongside) that partition.
gparted liveCD is the best means - I'd shrink (or move elsewhere) the swap and use that space to increase the root. Hopefully gparted won't change the UUID, but I haven't checked. Note also you could easily reduce the boot partition by several Gig and use that if the swap was moved elsewhere.
 
Old 07-19-2018, 07:22 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I would back up /home, delete everything in /home, dump /usr into the /home partition, delete everything currently in /usr, edit /etc/fstab to reflect the new /usr partition, and mount the old home to /usr.

Dump the /home backup into the directory /home. You can't just do away with /home.

/usr is the largest directory for a desktop system. /var might grow larger on a server. So, if /var is larger than /usr, then do what I said with /var.

Last edited by AwesomeMachine; 07-19-2018 at 07:24 PM.
 
Old 07-19-2018, 09:01 PM   #7
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
How to integrate /home back into main partition

This might seem obvious, but have you checked why your root partition is full? You might be able to clean up logs, sources, backups, or remove unused software. Then you will not have to resize anything. Advice is being given about what should be done with the partition table without all the information...
 
Old 07-20-2018, 01:14 AM   #8
jaydul
Member
 
Registered: Sep 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
My system running ISPmanager they need 10GB on / root i delete logs and Server is up and running.Need to Increase Root Partition Size from /home.
deleting partition /home and add /
Quote:
Originally Posted by mralk3 View Post
This might seem obvious, but have you checked why your root partition is full? You might be able to clean up logs, sources, backups, or remove unused software. Then you will not have to resize anything. Advice is being given about what should be done with the partition table without all the information...

Last edited by jaydul; 07-20-2018 at 01:16 AM.
 
Old 07-20-2018, 05:51 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,599

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
I would think the best option in the current state would be to use GParted from a 'Live' system to resize (shrink) your boot partition to about 500MB. Not sure why you would have a boot partition the same size as your /? Your boot only uses 207MB. Your swap partition (per fdisk) appears to be larger than /, which is a little weird so deleting it and creating it elsewhere on the Extended partition would work but you would also need to create unallocated space. shrinking your /home partition. You do understand that if you delete your /home partition (sda5) which is on a logical partition, that will change your /var partition from sda6 to sda5 as deleting any logical partition will change the number of logical partitions with a 'higher' number to one number lower.

Additionally, as pointed out above, you can't add /home to / because they are not continguous and / is a primary and /home is a logical partition. It's possible but convoluted and the suggestion above with regard to changing /boot and swap would be the simplest.
 
Old 07-21-2018, 02:08 AM   #10
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,897
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
If it was mine, I'd flush the logs and whatever else could be deleted from / to make room for /boot/'s content, then boot Knoppix, move the content from sda1 to /boot/ on sda3, delete sda1 and sda2, create a new swap sda1, grow sda3 into the space vacated by sda2, reconfigure fstab, reconfigure/reinstall bootloader, and still have separate /home and /var while nearly doubling size of /. Only if nearly twice as much space on / were not enough would I delete sda5 and grow sda3 into its space.

How much RAM is on this box? Could it be that swap is oversized and could be reduced to add space to /?

5GB /boot is clearly wasteful. Largest /boot/ I ever had was about 800MB. Largest I now have is 400MB.
 
2 members found this post helpful.
  


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
[SOLVED] How to integrate /home from a separate partition into existing filesystem? fanoflq Linux - Newbie 6 10-08-2016 09:03 PM
Being Thrown Back to the Main Page When Signing On. cwizardone LQ Suggestions & Feedback 2 06-06-2013 03:26 PM
[SOLVED] bash back to main menu trintukaz Programming 10 10-16-2011 06:28 AM
How to integrate winxp home in a linux PDC domain madlinux Linux - Software 1 02-14-2006 05:32 AM
Moving swap back to main memory acid_kewpie Linux - General 4 08-26-2001 09:40 AM

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

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