* [gentoo-user] conflict in fstab w/ lvm?
@ 2009-06-12 19:45 Maxim Wexler
2009-06-12 19:54 ` Daniel da Veiga
2009-06-12 20:30 ` Mike Kazantsev
0 siblings, 2 replies; 10+ messages in thread
From: Maxim Wexler @ 2009-06-12 19:45 UTC (permalink / raw
To: gentoo-user
Hi group,
Following the LVM2 gentoo doc I have in fstab:
...
/dev/vg/tmp /tmp ext2 noatime 0 2
...
But also(suggested by the eee forum):
...
#shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
Is this legal? Mounting two things at the same place?
Maxm
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 19:45 [gentoo-user] conflict in fstab w/ lvm? Maxim Wexler
@ 2009-06-12 19:54 ` Daniel da Veiga
2009-06-12 20:15 ` Dirk Heinrichs
2009-06-12 21:46 ` Maxim Wexler
2009-06-12 20:30 ` Mike Kazantsev
1 sibling, 2 replies; 10+ messages in thread
From: Daniel da Veiga @ 2009-06-12 19:54 UTC (permalink / raw
To: gentoo-user
On Fri, Jun 12, 2009 at 16:45, Maxim Wexler<maxim.wexler@gmail.com> wrote:
> Hi group,
>
> Following the LVM2 gentoo doc I have in fstab:
>
> ...
> /dev/vg/tmp /tmp ext2 noatime 0 2
> ...
>
> But also(suggested by the eee forum):
>
> ...
> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
> tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
>
> Is this legal? Mounting two things at the same place?
>
AFAIK, no.
First off, what do you want to do? The EEE forum suggested mounting
/tmp using tmpfs cause that keep temporary stuff on your RAM, not
disk, this way you reduce disk access. Its your decision to use RAM
for /tmp or disk (LVM logical volume). Obviously you can't have both
(it doesn't even make sense).
--
Daniel da Veiga
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 19:54 ` Daniel da Veiga
@ 2009-06-12 20:15 ` Dirk Heinrichs
2009-06-12 21:46 ` Maxim Wexler
1 sibling, 0 replies; 10+ messages in thread
From: Dirk Heinrichs @ 2009-06-12 20:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
Am Freitag 12 Juni 2009 21:54:45 schrieb Daniel da Veiga:
> > Is this legal? Mounting two things at the same place?
>
> AFAIK, no.
Yes. However, unless you do union mounts, you'll only see what's mounted last.
Bye...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 19:45 [gentoo-user] conflict in fstab w/ lvm? Maxim Wexler
2009-06-12 19:54 ` Daniel da Veiga
@ 2009-06-12 20:30 ` Mike Kazantsev
2009-06-12 21:52 ` Maxim Wexler
1 sibling, 1 reply; 10+ messages in thread
From: Mike Kazantsev @ 2009-06-12 20:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
On Fri, 12 Jun 2009 13:45:04 -0600
Maxim Wexler <maxim.wexler@gmail.com> wrote:
> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
I wonder, what's the rationale behind commenting out shm?
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 19:54 ` Daniel da Veiga
2009-06-12 20:15 ` Dirk Heinrichs
@ 2009-06-12 21:46 ` Maxim Wexler
2009-06-13 1:47 ` Daniel da Veiga
1 sibling, 1 reply; 10+ messages in thread
From: Maxim Wexler @ 2009-06-12 21:46 UTC (permalink / raw
To: gentoo-user
On 6/12/09, Daniel da Veiga <danieldaveiga@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 16:45, Maxim Wexler<maxim.wexler@gmail.com> wrote:
>> Hi group,
>>
>> Following the LVM2 gentoo doc I have in fstab:
>>
>> ...
>> /dev/vg/tmp /tmp ext2 noatime 0 2
>> ...
>>
>> But also(suggested by the eee forum):
>>
>> ...
>> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>> tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
>>
>> Is this legal? Mounting two things at the same place?
>>
>
> AFAIK, no.
> First off, what do you want to do? The EEE forum suggested mounting
I want to create a useful, trouble-free genteee box.
mw
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 20:30 ` Mike Kazantsev
@ 2009-06-12 21:52 ` Maxim Wexler
2009-06-13 1:52 ` Joshua Murphy
0 siblings, 1 reply; 10+ messages in thread
From: Maxim Wexler @ 2009-06-12 21:52 UTC (permalink / raw
To: gentoo-user
On 6/12/09, Mike Kazantsev <mk.fraggod@gmail.com> wrote:
> On Fri, 12 Jun 2009 13:45:04 -0600
> Maxim Wexler <maxim.wexler@gmail.com> wrote:
>
>> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>
> I wonder, what's the rationale behind commenting out shm?
>
Good question. I was given to understand the new line was intended to
replaced the default, which I commented out. Perhaps that's a mistake.
That's how I configured the previous iteration of genteee before it
went south; maybe the new line had something to do with it. Should I
use both?
mw
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 21:46 ` Maxim Wexler
@ 2009-06-13 1:47 ` Daniel da Veiga
2009-06-13 12:30 ` Neil Bothwick
0 siblings, 1 reply; 10+ messages in thread
From: Daniel da Veiga @ 2009-06-13 1:47 UTC (permalink / raw
To: gentoo-user
On Fri, Jun 12, 2009 at 18:46, Maxim Wexler<maxim.wexler@gmail.com> wrote:
> On 6/12/09, Daniel da Veiga <danieldaveiga@gmail.com> wrote:
>> On Fri, Jun 12, 2009 at 16:45, Maxim Wexler<maxim.wexler@gmail.com> wrote:
>>> Hi group,
>>>
>>> Following the LVM2 gentoo doc I have in fstab:
>>>
>>> ...
>>> /dev/vg/tmp /tmp ext2 noatime 0 2
>>> ...
>>>
>>> But also(suggested by the eee forum):
>>>
>>> ...
>>> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>>> tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
>>>
>>> Is this legal? Mounting two things at the same place?
>>>
>>
>> AFAIK, no.
>> First off, what do you want to do? The EEE forum suggested mounting
>
> I want to create a useful, trouble-free genteee box.
>
You have only two choices, being an eee user myself, and having it
upgraded to 2GB RAM, I choose the tempfs filesystem for /tmp (RAM)
instead of keeping temporary files writen and deleted from my poor
SSD. If you have low RAM, you can decide to leave it on the SSD and
thus give more room for app data on RAM.
--
Daniel da Veiga
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-12 21:52 ` Maxim Wexler
@ 2009-06-13 1:52 ` Joshua Murphy
2009-06-13 4:20 ` Mike Kazantsev
0 siblings, 1 reply; 10+ messages in thread
From: Joshua Murphy @ 2009-06-13 1:52 UTC (permalink / raw
To: gentoo-user
On Fri, Jun 12, 2009 at 5:52 PM, Maxim Wexler<maxim.wexler@gmail.com> wrote:
> On 6/12/09, Mike Kazantsev <mk.fraggod@gmail.com> wrote:
>> On Fri, 12 Jun 2009 13:45:04 -0600
>> Maxim Wexler <maxim.wexler@gmail.com> wrote:
>>
>>> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>>
>> I wonder, what's the rationale behind commenting out shm?
>>
>
> Good question. I was given to understand the new line was intended to
> replaced the default, which I commented out. Perhaps that's a mistake.
> That's how I configured the previous iteration of genteee before it
> went south; maybe the new line had something to do with it. Should I
> use both?
>
> mw
Hmm.
1) a tmpfs space is, by default, mounted on /dev/shm to meet some
standard somewhere (can't recall, FHS I think). The important thing to
note is that the name 'shm' is basically an unused placeholder (tmpfs
doesn't operate on an actual block device like /dev/hda1), and that
/dev/shm is the mount *point*. It should be there, and uncommented.
2) Yes it's 'legal' to mount the lvm volume onto /tmp *and* tmpfs
space as you have your fstab lines there, but I can't say for sure
which would truly be mounted first and which second, and in turn which
would actually be used in the running system. IF you intend to use
your system RAM to reduce read/write on your drive for temporary
files, comment out the use of the LVM volume on /tmp and just leave
the tmpfs mount on that point active (commenting leaves you free to
change your mind anytime you like).
3) Vaguely related to your mention of it 'taking its place' about the
/dev/shm and /tmp tmpfs mounts, the only time I've seen that mentioned
was in a conversation somewhere about 'why not just use a --bind mount
of /dev/shm onto /tmp to put it in tmpfs' ... which was answered with
the simple fact that, by default everywhere I've seen it, /dev/shm is
mounted noexec, while it's not altogether uncommon for things to be
decompressed into /tmp before execution (which would fail if /tmp were
mounted noexec).
--
Poison [BLX]
Joshua M. Murphy
"Without a struggle, there can be no progress." - Frederick Douglass
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-13 1:52 ` Joshua Murphy
@ 2009-06-13 4:20 ` Mike Kazantsev
0 siblings, 0 replies; 10+ messages in thread
From: Mike Kazantsev @ 2009-06-13 4:20 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3198 bytes --]
On Fri, 12 Jun 2009 21:52:20 -0400
Joshua Murphy <poisonbl@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 5:52 PM, Maxim Wexler<maxim.wexler@gmail.com> wrote:
> > On 6/12/09, Mike Kazantsev <mk.fraggod@gmail.com> wrote:
> >> On Fri, 12 Jun 2009 13:45:04 -0600
> >> Maxim Wexler <maxim.wexler@gmail.com> wrote:
> >>
> >>> #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
> >>
> >> I wonder, what's the rationale behind commenting out shm?
> >
> > Good question. I was given to understand the new line was intended to
> > replaced the default, which I commented out. Perhaps that's a mistake.
> > That's how I configured the previous iteration of genteee before it
> > went south; maybe the new line had something to do with it. Should I
> > use both?
>
> Hmm.
> 1) a tmpfs space is, by default, mounted on /dev/shm to meet some
> standard somewhere (can't recall, FHS I think). The important thing to
> note is that the name 'shm' is basically an unused placeholder (tmpfs
> doesn't operate on an actual block device like /dev/hda1), and that
> /dev/shm is the mount *point*. It should be there, and uncommented.
>
...
>
> 3) Vaguely related to your mention of it 'taking its place' about the
> /dev/shm and /tmp tmpfs mounts, the only time I've seen that mentioned
> was in a conversation somewhere about 'why not just use a --bind mount
> of /dev/shm onto /tmp to put it in tmpfs' ... which was answered with
> the simple fact that, by default everywhere I've seen it, /dev/shm is
> mounted noexec, while it's not altogether uncommon for things to be
> decompressed into /tmp before execution (which would fail if /tmp were
> mounted noexec).
Indeed it should be there, it's as a shared memory for inter-process
communication (IPC). Many stuff uses shared memory, notably gcc and
multi-process daemons like apache, so you should give it to them.
And, as noted, tmpfs is not real device or even some single virtual
device. By "mount -t tmpfs none /tmp" you mount some piece of virtual
memory to a place but it's never the same piece, so you can have two,
ten or hundred tmpfs mounts completely independent of each other.
mkdir /mnt/{tmp1,tmp2}
mount -t tmpfs none /mnt/tmp1
mount -t tmpfs none /mnt/tmp2
touch /mnt/tmp1/some_file
ls -la /mnt/tmp1 (shows "some_file"
ls -la /mnt/tmp2 (empty)
So you don't have to bind everything into one tmpfs, just create as
many as you want, but, once again, especially if you chose not to have
swap, limit their size so they won't eat all your RAM!
Imagine scenario like this (or do "sync" and run it, but it should hang
your machine!):
mount -t tmpfs none /mnt/tmp1
dd if=/dev/zero of=/mnt/tmp1/some_file bs=1024 count=1000000000
Your VM should go away and kernel 'll go on a killing spree, wiping
out all the runnuing processes, but, since tmpfs itself is not a
process, it'll just kill everything until panic or nothing's left at
all.
"-o size=512M" will just give you "No free space on disk" instead of
nasty crash. /tmp is world-writable, anything can choose to ditch a gig
or two into it for whatever reasons...
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] conflict in fstab w/ lvm?
2009-06-13 1:47 ` Daniel da Veiga
@ 2009-06-13 12:30 ` Neil Bothwick
0 siblings, 0 replies; 10+ messages in thread
From: Neil Bothwick @ 2009-06-13 12:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On Fri, 12 Jun 2009 22:47:50 -0300, Daniel da Veiga wrote:
> You have only two choices, being an eee user myself, and having it
> upgraded to 2GB RAM, I choose the tempfs filesystem for /tmp (RAM)
> instead of keeping temporary files writen and deleted from my poor
> SSD. If you have low RAM, you can decide to leave it on the SSD and
> thus give more room for app data on RAM.
I use tmpfs for /tmp with a 1GB Eee, /tmp usage is usually small, less
than a MB. PORTAGE_TMPDIR, on the other hand getslots of writes, so I
have than on a cheap, replaceable SD card.
--
Neil Bothwick
Life is a sexually transmitted disease and the mortality rate is 100%.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-06-13 12:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 19:45 [gentoo-user] conflict in fstab w/ lvm? Maxim Wexler
2009-06-12 19:54 ` Daniel da Veiga
2009-06-12 20:15 ` Dirk Heinrichs
2009-06-12 21:46 ` Maxim Wexler
2009-06-13 1:47 ` Daniel da Veiga
2009-06-13 12:30 ` Neil Bothwick
2009-06-12 20:30 ` Mike Kazantsev
2009-06-12 21:52 ` Maxim Wexler
2009-06-13 1:52 ` Joshua Murphy
2009-06-13 4:20 ` Mike Kazantsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox