LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-27-2017, 12:28 PM   #1
Teoh YH
LQ Newbie
 
Registered: Jul 2017
Posts: 3

Rep: Reputation: Disabled
What is the default partition size of /dev & /run in Linux7.3


Hi ,
I am new to Linux and recently I installed linux 7.3 on my system using manual partitions.
I wanted to define 5GB for my /dev & /run but both these mount points were prompted as invalid.
When I let the system to auto define, their size came up to be 24GB,so huge. By the way, I am using 3 x 600GB hard disks.
How can I force the size of these two mount points to 5GB instead?
Beside, I used only 300GB out of about 1.8TB and I can't locate the rest of my spare disk space. How to check?
Please advise.
Thanks all the Guru in advance.
 
Old 07-27-2017, 01:06 PM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,502
Blog Entries: 16

Rep: Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263
These are both virtual filesystems which all modern Linuxen put on ramdisks. /dev is just a set of interfaces with the hardware drivers in the kernel; it takes up no room at all. /run is for session-specific temporary files (mostly small) that will all disappear when you shut down. Don't create partitions for them on the actual hard drive. Let the udev program do that at boot time.

The only partitions you really need are the root partition, a home partition for your personal files (think My Documents!) and a swap file. A server might need a separate /var partition but a desktop machine doesn't.
 
Old 07-27-2017, 02:15 PM   #3
Teoh YH
LQ Newbie
 
Registered: Jul 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Hazel,

Thanks for your prompt reply.
I was confused as " df -h" shown the /dev and /run as 24GB.
They were not small in size. During installation, each time I specified /dev as a mount point,system always prompted
me as invalid mount point. I have no issue to define the partition size with other mount point.
How does the system define the sizing for these mount points, /dev & /run? These mount points and their sizing were automatically created during installation.
If these mount points are OS specific and not are allowed to be defined , I can accept it , but why can't I decide their size?
Any advise for this?
Thanks...
 
Old 07-27-2017, 03:37 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,509

Rep: Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114Reputation: 4114
As stated /dev, /run use tmpfs which resides in memory/swap and by default has a maximum size of half your physical memory. Despite what it says in the output of the df command only as much RAM as necessary is used.

Depending on distribution tmpfs and other virtual filesystems might be mounted via /etc/fstab or in initialization scripts. The maximum size can be changed.
 
Old 07-27-2017, 06:31 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,722

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
As stated, these are virtual filesystem that the kernel manages. What you are seeing is the potential maximum usage - the used is all you should be interested in. Best to leave it all alone - don't reduce the maximum unless you have a (very) good reason to. Generally that means only on advice from a kernel developer.
Quote:
Originally Posted by Teoh YH View Post
Beside, I used only 300GB out of about 1.8TB and I can't locate the rest of my spare disk space. How to check?
From a terminal run this
Code:
lsblk -f
 
1 members found this post helpful.
Old 07-28-2017, 02:16 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,502
Blog Entries: 16

Rep: Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263
It's worth adding that tmpfs behaves differently from the old-style ramdisk, which had a fixed size and permanently sterilised that amount of ram. A tmpfs drive is only as large as it needs to be to contain the current data on it, and when it hasn't been read for a while, it gets swapped out of core. The sizes that are bothering you are maxima, not running sizes.
 
Old 07-28-2017, 02:37 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,518

Rep: Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555Reputation: 5555
you may also say: /dev and /run are not real, but virtual filesystems, they have no real sizes, and stored only temporarily in RAM. They will not occupy a single byte on your HDD.
Code:
$ df -h
Filesystem                        Size  Used Avail Use% Mounted on
udev                              7,8G   12K  7,8G   1% /dev
tmpfs                             1,6G  1,5M  1,6G   1% /run
As you can see (check man df) the used size is relatively small, and actually there is no way to modify that.
 
1 members found this post helpful.
Old 07-28-2017, 03:47 AM   #8
xahodo
Member
 
Registered: Oct 2009
Posts: 36

Rep: Reputation: 20
All partitions you need to define are / and /home. A swap partition really isn't needed that much, unless you use hybernate or have't got all that much RAM (less than 2GB). If you wish to use hybernate, make the swap partition the same size or bigger than your RAM.

/dev and /run you don't need to bother with. Those are dealt with automatically.
 
Old 07-31-2017, 10:49 AM   #9
Teoh YH
LQ Newbie
 
Registered: Jul 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi All ,

Thanks all for taking your time to reply to my questions.
I really appreciate it.
Keep the good work flowing.

Best Regards,
Teoh YH
 
Old 07-31-2017, 03:06 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,159
Blog Entries: 4

Rep: Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233
To repeat:

A "virtual filesystem" in Linux does not necessarily correspond to any physical resource. For instance, /proc is a pure-fabrication: it is actually an interface to the guts of the Linux operating system.

This is an extremely-elegant notion which, so far as I can now recall, is supported by no other operating system.
 
Old 08-01-2017, 02:04 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,502
Blog Entries: 16

Rep: Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263Reputation: 3263
They used to say "In UNIX, everything's a file". Hardware drivers appear as files in the /dev directory so that programs can talk to the hardware. The guts of the kernel appear in /proc as a series of readable text files. Programs can talk to each other via pipes and sockets and they look like files too.
 
Old 08-02-2017, 05:48 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,522

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
also there is no operating system called "linux 7.3"
there is the really NOT free RHEL7

or CentOS 7 ( 1611) -- a rolling release
or Scientific Linux 7.3
 
  


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
dd if=/dev/sda1 of=dev/sdb3 turns a 10gig partition into a 130gig partition ? zonemikel Linux - Hardware 4 09-12-2009 05:53 PM
Re-partition hd size & usb problem tanchu Linux - Newbie 3 08-07-2005 01:52 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Partition Size & How many Partitions Nasty Linux - Newbie 8 02-27-2004 11:24 AM
win98,xp,win.net &linux7.3 alltogether dark_light Linux - General 6 08-21-2002 09:53 PM

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

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