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 06-22-2021, 06:38 AM   #1
zl3jbb
Member
 
Registered: May 2021
Location: NZ
Posts: 50

Rep: Reputation: Disabled
Is the space set up during partitioning smart/correct


Trying to learn the basics still and after figuring out how to start from scratch by partitioning my drive, now wondering if I did it correctly with space allocated, tagging partitions and so forth. Kicking around learning a bit of command line lingo I discovered df, and it's presented me with this.

It now has me questioning the space I allocated and after an opinion as to whether I made a smart move or a daft one when setting up? My /home drive is half used, does this mean I only have 8G odd for space with potential users created? If I create several users and each used a few gig of "personal" files saved, am I going to run in to trouble... Should I have setup the /home with the space / has for example? Or is it a case that generally users will save things directly under / and space is not an issue.

@distopia:/$ df -m
Filesystem 1M-blocks Used Available Use% Mounted on
udev 7645 0 7645 0% /dev
tmpfs 1544 2 1542 1% /run
/dev/nvme0n1p5 444183 12205 409344 3% /
tmpfs 7717 193 7524 3% /dev/shm
tmpfs 5 1 5 1% /run/lock
/dev/nvme0n1p2 15645 6152 8678 42% /home
/dev/nvme0n1p1 19991 4 19987 1% /boot/efi
tmpfs 1544 1 1543 1% /run/user/1000

Last edited by zl3jbb; 06-22-2021 at 06:40 AM. Reason: correction
 
Old 06-22-2021, 07:25 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,412

Rep: Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338
As a first reaction, I'd say you have too many partitions.

I use one for /, one for /home, and one for /opt if I have big packages onboard. Maybe another for VMs. The difficulty with all those tiny partitions is that one will overfill and trip you up, while you have free space in another.
 
Old 06-22-2021, 07:50 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,551

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
You only have 3 partitions, the EFI partition as well as one for / and /home and yes, the / partition is much larger than the /home partition which is the reverse of what people usually do. A standard currently would be 20-30GB for / and the rest for /home or data partitions as well as your EFI.
 
Old 06-22-2021, 08:21 AM   #4
BoraxMan
Member
 
Registered: Apr 2010
Posts: 103

Rep: Reputation: 11
Your home is only 8G, which is in my opinion small. A lot of this will be used by cache files (such as the browser cache), which you can minimize by changing the setting of programs such as browsers to use a smaller disk cache. Your e-mails may be stored here too if you hold them locally. Either way, if you have multiple users, you're going to run low on space and have to resort to making it bigger, or symlink hacks.

You could create a folder on your / partition, called /shared, with permissions set for others users to access. You could put photos, shared music, etc there, that is, all the big stuff, and leave the home directory for config files, maybe your own personal documents. But even then, 8G will be tight.

It is better to have /home larger, with your / only for software and the OS. That can be hard to predict, especially if you're going to install games, like Steam games. That allows you to store your own files on the roomy /home partition, which has an advantage when you come to reinstall your distro, in that you can leave /home untouched. Personal data on the / partition would have to be backed up and restored. That being said, I've very, very seldom have had to reinstall Linux, and even then, it was only by choice.

If you're unsure how to get it right, you can simply forgo having a separate /home partition, or use LVM. LVM will allow you to resize them later. The other way to have "partitions" where you don't have to worry about size is to use BTRFS.

For reference, this is my laptops partition setup with non-disk partitions not listed. I keep /var separate, though it probably wasn't the best idea. Note that I'm the only user, and I find /home too small, but this is not my main computer.

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 32G 15G 15G 50% /
/dev/sda2 20G 3.4G 16G 18% /var
/dev/sda6 176G 49G 127G 28% /storage
/dev/sda5 3.9G 2.9G 753M 80% /home
 
1 members found this post helpful.
Old 06-22-2021, 08:30 AM   #5
zl3jbb
Member
 
Registered: May 2021
Location: NZ
Posts: 50

Original Poster
Rep: Reputation: Disabled
Pretty much what I thought I was seeing, had intended to go that way, bugger. Thought I'd set roughly 20G boot, 16G swap, and the rest /. Apparently not, could have sworn I had until I looked at this *sigh.

Adjustable without having to re-do an install with Gparted or something safely?
 
Old 06-22-2021, 10:34 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
The most important thing that you should do when setting up your system is to enable LVM = Logical Volume Management.

What this does is to break the traditional correspondence between "a drive or partition" and a "mount point." Instead, partitions are added to storage pools, which can include space from more than one of these, and to which new partitions can be added or removed at any time. Logical volumes ("mount points") are carved out of a storage pool. More than one logical volume can draw from the same pool. Application programs never perceive any of this magick. All of this happens without rebooting.

Now, questions about "how to partition" simply become moot. You have one set of commands to manage the storage pools, and another set of commands to manage the logical drives. You can issue these commands while the system continues to operate.

Let's say that "/" fills up. You add a new drive (partition) to the storage pool. Then, you expand the filesystem to recognize the newly added space. If your hardware is such that you can add a drive without shutting down the system, you can do all of this on-the-fly.

There are other very nice benefits, too. If one drive starts "making ominous clicking noises," you can withdraw it from the storage pool. Its contents will be migrated somewhere else, automatically! Once this process is finished, you can remove and junk the failing drive.

Yes, it is possible to enable LVM "after the fact," but it's an option that – so far as I am aware – every distro offers you at installation time. "Say 'yes.'"

Last edited by sundialsvcs; 06-22-2021 at 10:42 AM.
 
Old 06-22-2021, 11:43 AM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
Quote:
Originally Posted by zl3jbb View Post
Pretty much what I thought I was seeing, had intended to go that way, bugger. Thought I'd set roughly 20G boot, 16G swap, and the rest /. Apparently not, could have sworn I had until I looked at this *sigh.

Adjustable without having to re-do an install with Gparted or something safely?
Yes, I have resized and moved partitions around with GParted Live on many occasions and never had data loss - just think carefully about what you want to do before you do it. Your results will usually be about as good as your planning, so think it through before you begin.

I have also recently begun to use LVM. I do not (yet) think it is the most desirable option for every partitioning case, but it is very useful for managing data partitions (/home included) with storage requirements which are not yet known or which may change drastically over time. Well worth learning how-to even if you don't want to use it for all partitions at this time.

Last edited by astrogeek; 06-22-2021 at 12:35 PM. Reason: tyops
 
Old 06-22-2021, 01:39 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Quite honestly, Geek, I find no good reason not to use LVM. It simply "makes the partition issue go away entirely." Partitions simply "provide available space," which you can carve up and re-carve up, any way you like and anytime you want to.

The ability to gracefully take down a questionable drive – which I have availed myself of on more than one occasion now – is alone "well worth the price of admission!" It's a thorough, elegant solution to a matter that faces every system administrator.

Last edited by sundialsvcs; 06-22-2021 at 01:42 PM.
 
Old 06-22-2021, 10:46 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,146

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
LVM is certainly flexible, but that implies (and delivers) an extra level of complexity. Should be manageable by the average home user so long as they don't use XFS.
Still, messing with partitions is generally do-able with gparted. On occasions can be extremely educational. Teaches things like good backups f'instance ...
 
1 members found this post helpful.
Old 06-23-2021, 08:23 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
syg00: In my opinion, the complexity doesn't exist. Unless and until you actually need to take advantage of it, you forget that it is even there. The dirty-work was done automagically when you first installed Linux, and "it just works.™"

Last edited by sundialsvcs; 06-23-2021 at 08:24 AM.
 
Old 06-23-2021, 01:38 PM   #11
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Looking at the df listing I would suggest booting to the live USB, use gparted to shrink the / partition (nvme0n1p5) to a reasonable size (I think 50G would be more than adequate), then expand /home (nvme0n1p2) to fill the unused space. It may involve moving partitions right or left to make sure the unused space is all contiguous, but that is easily handled by gparted.

The numbering scheme for the partitions implies there are 2 additional partitions between /home and / so that also will require handling. Are you by chance also dual booting? Using gparted in this way may break the windows boot manager if you do this and you would then need to recover from windows booting problems.
 
Old 06-23-2021, 02:15 PM   #12
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,717

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
Quote:
Originally Posted by syg00 View Post
LVM is certainly flexible, but that implies (and delivers) an extra level of complexity. Should be manageable by the average home user so long as they don't use XFS.
Still, messing with partitions is generally do-able with gparted. On occasions can be extremely educational. Teaches things like good backups f'instance ...
I love LVM where you are using EXT3 or EXT4 format, it is simply redundant (a waste) when using BTRFS.

We would need more information before we could intelligently advise the OP on which would be superior for his specific case.
 
Old 06-23-2021, 02:28 PM   #13
zl3jbb
Member
 
Registered: May 2021
Location: NZ
Posts: 50

Original Poster
Rep: Reputation: Disabled
Thanks for all of your input, this such a great forum and a great help.

When I initially installed I setup LVM, but it caused me a bit of confusion... clearly I was not completely understanding it and was unable to perform the install like that for some reason. I ended up using FAT32 for my /boot sector and ext4 on the /home and extended portions, just to get the job done with the thought it was not going to be detrimental to anything that I was going to be doing. At this point, my understanding is that I would need to gutt the system completely to setup LVM and if that's the case I would rather just stick with traditional partitions. I think somehow when setting it up I thought I had set a swap tag as 16G reading from recommendations which turned into /home!? and the rest (extended) would be available system space (didn't quite understand what may have been said hahaha).

Right now however, there seems to be an issue trying to alter the space allocation with Gparted, and also some questions have arisen out of this. If I am to maneuver the space on the drive it will need to be unmounted, will this mean the GUI I am using to perform the task is unable to operate or is everything at this point run in memory/RAM or from the /boot/efi location for example, and can safely unmount the extended portion / and /home to adjust on the fly? I thought seeing as I was using the profile attached to /home this might cause issues, do I need to be in a tty using root#? Still deciding on making 50G available as extended and the remaining space (400G odd) as /home. The reality is I don't really need extended, so could equally just have my 20G /boot/efi, and delete the extended partition leaving /home with the remaining space.

The issue I am having atm is: I have tried to unmount the extended partition to start there, but I cannot unmount using Gparted it seems (locked).

The file system on partition ‘/dev/nvme0n1p5’ could not be unmounted.
DETAIL = Command: umount --verbose --all-targets /dev/nvme0n1p5
 
Old 06-23-2021, 07:04 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,146

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
As mentioned above, to do this work you need to be booted from a liveUSB - the install medium will do; boot that up and connect to your router and install gparted in need. This will all run in RAM and disappear when shutdown.
Given the above notes, you will not easily be able to move the space- some shuffling is involved; think of a sliding block game. Let's see the output of this
Code:
sudo parted /dev/nvme0n1 "print free"
You certainly cannot run if you delete p5 (the root partition) entirely.
And yes, retro-fitting LVM will be beyond you at this point - it can be done, but re-install is cleaner.
 
Old 06-23-2021, 07:40 PM   #15
zl3jbb
Member
 
Registered: May 2021
Location: NZ
Posts: 50

Original Poster
Rep: Reputation: Disabled
Riiight I see, read it a bit quick this morning. Below is the parted "print free".

Number Start End Size Type File system Flags
16.4kB 1049kB 1032kB Free Space
1 1049kB 21.0GB 21.0GB primary fat32 lba
2 21.0GB 37.7GB 16.8GB primary ext4
3 37.7GB 512GB 474GB extended
5 37.8GB 512GB 474GB logical ext4
512GB 512GB 4258kB Free Space
 
  


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
hard disk partitioning/I am out of space /how to increase linux space? RMLinux Red Hat 8 09-05-2008 12:33 PM
Smart's gui is not so smart right now... litlmary SUSE / openSUSE 6 01-27-2007 02:05 AM
Smart problem adding new channel in Smart-beta google01103 SUSE / openSUSE 1 11-21-2006 07:17 AM
Not so smart with "Smart". Morbid SUSE / openSUSE 2 11-06-2006 01:34 PM
How smart is SMART? ionmich SUSE / openSUSE 6 08-25-2006 06:26 AM

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

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