You are not logged in.

#1 2011-08-15 23:57:45

dcbdbis
Member
From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

[SOLVED] Latest filesystem update question

So, I allowed pacman to install the filesystem updates a few minutes ago. I had one /etc/fstab.pacnew file.

It had an entry (tmpfs) that my existing fstab lacked. I do a lot of customization to my fstab for a variety of drives I have, but am not familiar with what I would call "system" level fstab entries.

I am requesting that someone "vet" my non- storage specific entries in my fstab to tell me if I need to add something further, or delete a line that has been superseded.


# 
# /etc/fstab: static file system information
#
# <file system>        				<dir>         		<type>    	<options>          								<dump> <pass>

devpts                 				/dev/pts      		devpts    	defaults            								0	0
shm                    				/dev/shm      		tmpfs     	nodev,nosuid        								0	0
tmpfs						/tmp			tmpfs		nodev,nosuid									0	0

Thank you for your time....


Sincerely and respectfully,


Dave

Last edited by dcbdbis (2011-08-16 01:50:33)

Offline

#2 2011-08-16 00:01:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] Latest filesystem update question

Looks fine to me.  Here's mine for your reference.  See the wiki for more.

tmpfs	/tmp  tmpfs nodev,nosuid,nodiratime,noatime,size=2G,mode=1777	0	0
devpts                 /dev/pts      devpts    defaults            0      0
shm	/dev/shm	tmpfs	nodev,nosuid,size=7G        0      0

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2011-08-16 00:10:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Latest filesystem update question

Offline

#4 2011-08-16 00:16:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Latest filesystem update question

karol's linked commit sums it up. /dev/shm and /dev/pts mount entries should be removed, and we're recommending that you mount /tmp on tmpfs.

Offline

#5 2011-08-16 01:50:18

dcbdbis
Member
From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

Re: [SOLVED] Latest filesystem update question

Thank you to all who posted. I rem'd out the /dev/pts and /dev/shm entries and rebooted.

I can confirm that the system came up perfectly normal. After a week or so, then I'll nuke the rem'd out lines......

Again, thank you to all for the responses.


Sincerely and respectfully,


Dave

Last edited by dcbdbis (2011-08-16 01:51:27)

Offline

#6 2011-08-16 20:26:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] Latest filesystem update question

fstab: remove /dev/{shm,pts} add /tmp
/dev/{shm,pts} are dealt with by initrd or rc.sysinit. Making /tmp a tmpfs by default as this is almost always the right thing to do. git-svn-id: file:///srv/svn-packages@132374 eb2447ed-0c53-47e4-bac8-5bc4a241df78

Silly question: how did /dev/shm get created with size=7G on my system?  I looked in /etc/rc.sysinit but didn't see it there.

$ df -h|grep shm
shm             7.0G  822M  6.2G  12% /dev/shm

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2011-08-16 20:28:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Latest filesystem update question

graysky wrote:

Silly question: how did /dev/shm get created with size=7G on my system?  I looked in /etc/rc.sysinit but didn't see it there.

$ df -h|grep shm
shm             7.0G  822M  6.2G  12% /dev/shm

That's your swap or what?

Offline

#8 2011-08-16 20:34:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] Latest filesystem update question

@k - no swap on this machine.  I understand that /tmp is defaulted to 1/2 of physical memory (8/2=4) but how does /dev/shm get to be 7 G?

 df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             10M     0   10M   0% /dev
run              10M  284K  9.8M   3% /run
/dev/sdb1        14G  2.6G   11G  20% /
shm             7.0G   77M  7.0G   2% /dev/shm
tmpfs           4.0G   20K  4.0G   1% /tmp

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2011-08-16 20:48:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Latest filesystem update question

http://mailman.archlinux.org/pipermail/ … 21265.html
Maybe it's a way to discourage? ;P

Offline

#10 2011-08-16 20:48:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] Latest filesystem update question

@bernarcher - I read that, and I don't have it in my /etc/fstab anymore.  That's why I'm confused as to what is making it assigned to 7G.

$ cat /etc/fstab
tmpfs /tmp tmpfs nodev,nosuid 0 0
/dev/dvd	/media/dvd  auto    ro,user,noauto,unhide   0      0

/dev/sdb1	/	ext4    defaults,noatime,discard	0       1
/dev/sdb2	/home	ext4    defaults,noatime,discard	0       2
/dev/sda2 	/var	ext4	defaults,relatime	0	1
/dev/sda3 	/boot	ext3	defaults,relatime	0	1
/dev/sda6	        /media/data	ntfs-3g	defaults,umask=002,fmask=113,gid=100,uid=1000	00

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2011-08-16 20:54:33

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] Latest filesystem update question

(Sorry, I inadvertently deleted this post of mine. sad )

It is gone in my system now after reboot (yet, I updated the kernel in the meantime):

Filesystem                                              Size  Used Avail Use% Mounted on
udev                                                     10M     0   10M   0% /dev
run                                                      10M  220K  9.8M   3% /run
/dev/disk/by-uuid/a077f168-44b7-4efc-95a1-727e22f67e7f   45G  7.7G   35G  19% /
tmpfs                                                   501M  164K  501M   1% /tmp
/dev/sdb5                                                15G  9.1G  6.0G  61% /var
/dev/sdb6                                                51G   31G   17G  65% /home

Only thing which else comes to my mind is that shm is intantiated from initramd.


To know or not to know ...
... the questions remain forever.

Offline

#12 2011-08-16 20:56:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] Latest filesystem update question

So I should manually dismount /dev/shm and rebuild my image via mkinitcpio -p linux-ck?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#13 2011-08-16 20:58:16

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] Latest filesystem update question

It would be worth a try.
BTW. I remember that I for some time explicitely unmounted /dev/shm in my rc.local.


To know or not to know ...
... the questions remain forever.

Offline

#14 2011-08-16 21:04:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] Latest filesystem update question

OK... dismounted, rebuilt, and rebooted.  I still have /dev/shm but now the size it 1/2 physical memory.  I'm not creating it anywhere as far as I know. 

Do others still have it upon removing it from fstab?

df -h$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             10M     0   10M   0% /dev
run              10M  284K  9.8M   3% /run
/dev/sdb1        14G  2.6G   11G  20% /
shm             4.0G   77M  3.9G   2% /dev/shm
tmpfs           4.0G   28K  4.0G   1% /tmp

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#15 2011-08-16 21:11:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Latest filesystem update question

@graysky
Maybe you should open another thread, as OP had just a quick question.

Yes, I still have /dev/shm the size of 1/2 physical memory but I use swap of exactly this size

[karol@black ~]$ df -h
Filesystem                                              Size  Used Avail Use% Mounted on
udev                                                     10M     0   10M   0% /dev
run                                                      10M  136K  9,9M   2% /run
/dev/disk/by-uuid/bf1d191b-0f0d-4961-bd67-4d023a2e5873  7,3G  3,0G  3,9G  44% /
shm                                                     246M     0  246M   0% /dev/shm
tmpfs                                                   246M   16K  246M   1% /tmp
/dev/sda1                                                99M   16M   79M  17% /boot
/dev/sda4                                                30G   21G  6,9G  76% /home
[karol@black ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:           491        460         30          0          0         42
-/+ buffers/cache:        417         73
Swap:          258         29        228

I'm a bit confused: I have 256 MB swap allocated, but /dev/shm shows 0 MB used, even if I do use 29 Mb according to 'free'.

Last edited by karol (2011-08-16 21:11:45)

Offline

#16 2011-08-16 21:39:20

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Latest filesystem update question

I have shm mounted as well for 1.9Gs, but my swap size is only 512MB, I gotta look into this as well.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#17 2011-08-17 03:01:11

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Latest filesystem update question

Here's my df output

[inxs ~ ]$ df
Filesystem                                             Type      Size  Used Avail Use% Mounted on
udev                                                   devtmpfs   10M     0   10M   0% /dev
run                                                    tmpfs      10M  248K  9.8M   3% /run
/dev/disk/by-uuid/2531f3c1-e139-48c0-bbda-a6650b58eb0c ext4      6.9G  2.3G  4.3G  36% /
shm                                                    tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs                                                  tmpfs     1.9G   12K  1.9G   1% /tmp
/dev/sda7                                              reiserfs  4.0G  600M  3.5G  15% /var
/dev/sda6                                              ext4       23G   11G   11G  51% /home
[inxs ~ ]$ 

tmp -- is half of RAM (4GB) but why is shm mounted again?
Here's free -m

[inxs ~ ]$ free
             total       used       free     shared    buffers     cached
Mem:          3836        470       3365          0         22        140
-/+ buffers/cache:        307       3528
Swap:          516          0        516
[inxs ~ ]$

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#18 2011-08-17 03:09:23

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Latest filesystem update question

IIRC some things need /dev/shm. I don't remember what.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#19 2011-08-17 04:24:45

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] Latest filesystem update question

Take a look at '/usr/src/linux-3.0-ARCH/Documentation/filesystems/tmpfs.txt'.  It helped me understand the fstab changes.

2) glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory (shm_open, shm_unlink)...

Also look at lines 21-25 in 'etc/rc.sysinit'.

Last edited by thisoldman (2011-08-17 04:33:36)

Offline

#20 2011-08-17 05:46:17

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] Latest filesystem update question

Thanks thisoldman, this was the info I was looking for.

BTW: Just discovered that I had /dev/shm still unmounted in my rc.local. No idea how this crept in again. But it had no negative effects up to now.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB