LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-21-2006, 06:50 AM   #1
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Rep: Reputation: 15
How to mount a partition as "ro" and "rw" same time


How to keep a partition mounted on two diferent directories as read only on one and as read write in another
 
Old 11-21-2006, 07:09 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Combine mount options "bind" and "ro" or "rw".
 
Old 11-21-2006, 07:23 AM   #3
tamal
LQ Newbie
 
Registered: Mar 2006
Posts: 13

Rep: Reputation: 0
Try this:

Quote:
Originally Posted by cnm
How to keep a partition mounted on two diferent directories as read only on one and as read write in another
Try something like this:
# mount -w /dev/hda1 /media/c
# mount -r /dev/hda1 /media/d

Note: Here I have tried to mount a NTFS partition (hda1) from Ubuntu Linux. I have noticed that I can mount a partition many times in read-only mode. But after mounting once (either in read-only or read-write mode) I cannot mount it in rw mode.
 
Old 11-21-2006, 07:55 AM   #4
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn
Combine mount options "bind" and "ro" or "rw".

mmmm.... tried but couldnt. Plesae show the specific command Lets say I want to mount /dev/hda16 to two diredctories /newMount and /newPartition One of the mounts should be read only while the other is read write boot. THANKS
 
Old 11-21-2006, 10:51 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
mount /dev/somepartition /mnt/mountpoint -o rw
mkdir -p -m 0750 /tmp/mount/othermountpoint
mount /dev/somepartition -t auto -o bind,ro /tmp/mount/othermountpoint
mount | grep /dev/somepartition
 
  


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
"fc5" mount does not recognize "smbfs" file system? bdplays Linux - Networking 6 06-28-2006 11:21 AM
"My posts" and "My threads" should be exempt from the wait time before searches vharishankar LQ Suggestions & Feedback 6 03-06-2006 08:10 PM
Common problems explained: "kernel panic - not syncing", "unable to mount..." sundialsvcs Linux - Newbie 2 03-01-2006 12:17 PM
Where to download precompiled bash binaries, such as "time" and "top"? elinuxqs Linux - Newbie 12 11-14-2005 08:36 PM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-06-2005 11:44 PM

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

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