LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-12-2006, 06:04 PM   #1
Bishop609
Member
 
Registered: Jul 2006
Distribution: Fedora Core 6
Posts: 30

Rep: Reputation: 15
1 Mount 2 Folders


I have read the threads that somewhat touch on this...but I still must ask, as the situation wasnt quite the same.

1st quarter Linux student here...go easy

I created a /archive mountpoint containing my archive when installing Linux

I want to mount that into 2 folders which are

/var/ftp/pub

/archive

I only know how to mount to one of them by modifying the fstab

Can anybody give me the syntax for mounting the one point to both.

It is much appreciated.
 
Old 07-12-2006, 06:16 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
do you know what the actual device is? can you use that, also have you tried just creating two entries bot pointing at the same mountpoint?
 
Old 07-13-2006, 08:18 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The terminology here can be confusing. Normally, you mount (read "connect") a device to a mount point. The device is described as something like /dev/hdc4 (4th partition on the 3rd HD in a basic IDE bus)

A mount point is normally a folder in the file system. "mount /dev/hdc4 <mountpoint>" means "connect this device to this folder so that I can read the contents by opening the folder"

You can mount a device to two different mountpoints--maybe more. You can NOT mount two different devices to the same mount point.

Once the device is mounted, you can also mount subfolders using the --bind option in mount.
 
Old 07-13-2006, 08:56 AM   #4
Bishop609
Member
 
Registered: Jul 2006
Distribution: Fedora Core 6
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by leonscape
do you know what the actual device is? can you use that, also have you tried just creating two entries bot pointing at the same mountpoint?
To both,

I appreciate the terminology update...I welcome it...I dont want to sound out of place here.

/achive is a partition

I have noted in the past that when I ran the 'mount' command it would say
this device has already been mounted. (when mounted to one folder)

Are you guys saying that I can add two lines to my fstab, from one partition, pointing to two directories? - and it will do both?

Last edited by Bishop609; 07-13-2006 at 08:57 AM.
 
Old 07-13-2006, 09:27 AM   #5
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Quote:
Originally Posted by Bishop609
To both,

I appreciate the terminology update...I welcome it...I dont want to sound out of place here.

/achive is a partition

I have noted in the past that when I ran the 'mount' command it would say
this device has already been mounted. (when mounted to one folder)

Are you guys saying that I can add two lines to my fstab, from one partition, pointing to two directories? - and it will do both?
I dont see why it can't work, ofcourse trial and error is great fun
 
Old 07-13-2006, 11:29 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I'm confused. Partition names are not of the form "/archive". A partition is described in the general form /dev/XdYN
X is typically "h" for IDE/ATAPI, and "s" for SCSI, USB, etc
Y is the letter of the drive: normally #1 is "a", but can be something else if a third-party controller is installed.
N is the number of the partition.

/archive is the name of a file or directory in the root directory. If it is a directory, then it can be used as a mount point.

Sooooo.../archive is not a partition, but it can be the route you take to **get to** a partition.

<<end of semantic nitpick>>
 
Old 07-13-2006, 03:57 PM   #7
Bishop609
Member
 
Registered: Jul 2006
Distribution: Fedora Core 6
Posts: 30

Original Poster
Rep: Reputation: 15
Ok here is the answer in case somebody should need to know...

It can be done! Look at my example of the /etc/fstab

LABEL=/ / ext3 defaults 1 1
LABEL=/archive /archive ext3 defaults 1 2
LABEL=/archive /var/ftp/pub ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-hdc6 swap swap defaults 0 0

(We are discussing LABEL=/archive at the top)

All I had to do was put in another line telling it to go somewhere else as well. Using the mount command didnt work, so editing the fstab is the only way I can see to do it... all I can tell you is that it works.

Thanks all around for the help...I have more questions on a differant subject, so I will see you around.

Latez...

Bishop
 
  


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
smb mount folders disappear on mount & konqueror smb fails: network unreachable tisource Linux - Networking 1 10-17-2007 12:30 AM
symlinks from folders to folders? vbsaltydog Linux - Newbie 4 04-03-2006 01:51 PM
Can I mount two folders to one partition? gckaibab Linux - Newbie 11 03-20-2006 10:35 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
SMB4K won't mount WinXP's shared folders kriidler Linux - Newbie 25 06-07-2005 06:51 PM

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

All times are GMT -5. The time now is 06:11 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
Open Source Consulting | Domain Registration