LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-20-2006, 12:38 PM   #1
gckaibab
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Rep: Reputation: 0
Question Can I mount one partition to two folders?


Would I be able to mount the same drive (partition) to 2 folders?
like for example:
mount hdx(#) to /home and /usr at the same time so that they both use the same partition

Last edited by gckaibab; 03-20-2006 at 01:05 PM.
 
Old 03-20-2006, 01:39 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you want the contents of /home to be the same as the contents of /usr ???? how does that make any sense?? if you mean you want to store the data seperately in different locations in that partition, you could just use a symlink from, say, /home to /usr/home or something... not nice at all though.
 
Old 03-20-2006, 01:40 PM   #3
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
Yes you can, but I don't see why you would ever need to.
 
Old 03-20-2006, 01:53 PM   #4
gckaibab
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
you want the contents of /home to be the same as the contents of /usr ???? how does that make any sense?? if you mean you want to store the data seperately in different locations in that partition, you could just use a symlink from, say, /home to /usr/home or something... not nice at all though.
I was just using it as an example to show you what i meant as far as the question was concerning. By the way, how do you symlink? (I know it stands for: symbolic link, and I have run across it when I tried BeOS.)
And I also have another question:

Also is it a good idea to put /root onto it's own partition (or not)?
 
Old 03-20-2006, 01:55 PM   #5
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
A simlink is kind of like a shortcut. You can make them using "ln -s." Check the man page and info page for more details.

There's really no need to put /root on its own partition, its not used much normally anyways.

Last edited by jeelliso; 03-20-2006 at 01:56 PM.
 
Old 03-20-2006, 02:03 PM   #6
gckaibab
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Original Poster
Rep: Reputation: 0
I am just wanting to keep the /root config files (/root/.(whateverprogamthisis)) out of the "/" partition (which will be about a 1G partition)
And also thanks for your help.

Last edited by gckaibab; 03-20-2006 at 02:07 PM.
 
Old 03-20-2006, 02:13 PM   #7
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
Are you only making the partition that you will mount "/" 1G? This will not be enough room unless you are running a very low lever system, like a router. Most everything goes in "/", so you will need to make this partition much bigger. I don't know you situation though, so if you know what your doing, you can just ignore my comments.
 
Old 03-20-2006, 05:12 PM   #8
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,115

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by jeelliso
Are you only making the partition that you will mount "/" 1G? This will not be enough room unless you are running a very low lever system, like a router.
That's actually quite a bit of room for / based on what I've run into. I'm currently only using 140Mb of the 1Gb I allocated to my / partition (Note: I have all my other major filesystems broken out of / and mounted seperately). If you are not breaking out your filesystems into seperate mountpoints then I agree, 1Gb would only handle a very lightweight install.
Code:
$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda7               918322    141400    727926  17% /
tmpfs                  1037688         0   1037688   0% /dev/shm
/dev/sda5                45130     18196     24526  43% /boot
/dev/mapper/vg0-usr    2445053   1906963    433724  82% /usr
/dev/mapper/vg0-var    1920391    549865   1268126  31% /var
/dev/mapper/vg0-opt     242191    156698     72591  69% /opt
/dev/mapper/vg0-tmp     479842      8289    445953   2% /tmp
/dev/mapper/vg0-home     49893     33304     13927  71% /home
/dev/sda1             40957684   6762188  34195496  17% /mnt/windows/c
/dev/sda2             40965748   5927340  35038408  15% /mnt/windows/d
/dev/sda3             30709296  16094384  14614912  53% /mnt/windows/e
tmpfs                    10240      2828      7412  28% /dev
$
 
Old 03-20-2006, 06:56 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I would never advocate anything this complex--mostly because I project myself into the picture and know that **I** woudl not be able to keep track of what is going on.

Do you get a performance benefit in your scheme?
 
Old 03-20-2006, 07:39 PM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
There is the bind option while mounting another directory to a certain directory that is already mounted. For an example, you could use bind for /tmp and /var/tmp on /dev/shm to increase performance. Another example is when you want a directory to share the same directory with out using symbolic links on a SAMBA server. There are other mount options.


The correct term is directory not folders. This goes the same for Windows too.
 
Old 03-20-2006, 09:44 PM   #11
Charred
Member
 
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
This seems needlessly complex.

The more complex it is, the easier it'll break, and the nastier it is to fix when it does.

Keep it simple.
 
Old 03-20-2006, 11:35 PM   #12
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,115

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by pixellany
Do you get a performance benefit in your scheme?
I highly doubt it. I set things up in a complex way because I like to learn through experience. Is it necessary to have all seperate mountpoints and three LVM volume groups like on my home system (below)? Of course not. It's ludicrous. But I learn by doing, and so I did this to learn. I also take LVM snapshots to do my backups. Again, not necessary for a home system, but a good way to learn. If that makes any sense?!

Quote:
Originally Posted by Charred
This seems needlessly complex.
Ahh, shucks ... that is my simple system! My more complex one is at home:
Code:
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda8               293555    100529    177365  37% /
tmpfs                   518256         0    518256   0% /dev/shm
/dev/hda9                30075      4648     23823  17% /boot
/dev/mapper/vg_linux-home
                        100269     57250     38760  60% /home
/dev/mapper/vg_linux-opt
                        628411    469893    138489  78% /opt
/dev/mapper/vg_linux-tmp
                         95952      4145     86687   5% /tmp
/dev/mapper/vg_linux-usr
                       2925148   2548843    282671  91% /usr
/dev/mapper/vg_linux-var
                       1462324    487861    912040  35% /var
/dev/mapper/vg_myth-recordings
                     165933916  62219780 103714136  38% /opt/mythtv/recordings
tmpfs                    10240       160     10080   2% /dev
/dev/mapper/vg_backup-backup
                       9611492   6635580   2487672  73% /mnt/backup
//192.168.0.51/c      40956928  17103872  23853056  42% /mnt/bedroom/c
//192.168.0.51/f      58781696  52674560   6107136  90% /mnt/bedroom/f
//192.168.0.51/h      44122112  27951104  16171008  64% /mnt/bedroom/h
//192.168.0.53/c     117153792  77705216  39448576  67% /mnt/livingroom/c
/dev/hda2              6144860   5982628    162232  98% /mnt/familyroom/c
/dev/hda1               272524     74092    198432  28% /mnt/familyroom/d
#
 
  


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
smb mount folders disappear on mount & konqueror smb fails: network unreachable tisource Linux - Networking 1 10-17-2007 01:30 AM
Can't delete folders made by XP under unbunu on fat32 partition Tristan9669 Linux - Newbie 13 08-11-2005 08:08 PM
Is there a need to split the key folders into different partition on 1 hdd? Swakoo Linux - Newbie 9 08-03-2005 05:46 PM
SMB4K won't mount WinXP's shared folders kriidler Linux - Newbie 25 06-07-2005 07:51 PM
How to resize a partition and create/mount a new partition? Maarten_Holland Linux - Newbie 1 04-20-2005 09:56 AM


All times are GMT -5. The time now is 12:41 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration