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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-19-2018, 05:54 PM
|
#1
|
Member
Registered: Sep 2012
Posts: 69
Rep: 
|
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
|
|
|
07-19-2018, 06:33 PM
|
#2
|
Senior Member
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,573
|
Perhaps the program GParted could provide you some assistance.
|
|
|
07-19-2018, 06:37 PM
|
#3
|
Member
Registered: Sep 2012
Posts: 69
Original Poster
Rep: 
|
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
Perhaps the program GParted could provide you some assistance.
|
|
|
|
07-19-2018, 06:46 PM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,437
|
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.
|
|
|
07-19-2018, 06:52 PM
|
#5
|
Member
Registered: Sep 2012
Posts: 69
Original Poster
Rep: 
|
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
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.
|
|
|
|
07-19-2018, 07:22 PM
|
#6
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
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.
|
|
|
07-19-2018, 09:01 PM
|
#7
|
Slackware Contributor
Registered: May 2015
Distribution: Slackware
Posts: 1,956
|
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...
|
|
|
07-20-2018, 01:14 AM
|
#8
|
Member
Registered: Sep 2012
Posts: 69
Original Poster
Rep: 
|
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
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.
|
|
|
07-20-2018, 05:51 AM
|
#9
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,432
|
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.
|
|
|
07-21-2018, 02:08 AM
|
#10
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE & OS/2 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 6,592
|
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.
|
All times are GMT -5. The time now is 02:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|