LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-18-2011, 02:17 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
remount read write


Dear all,
I am mounting one network partition using sshfs.
My /etc/fstab line is like that:

sshfs#user@myserver:/storage/folder /home/user/Documents/test fuse comment=sshfs,ro,exec,uid=1215,allow_other,reconnect,transform_symlinks,BatchMode=yes,nonempty,noaut o 0 0

This works great.
I want sometimes to be able to mount this hard disk as read-write. To write few files and then return to read only state.

So after this partition is mounted
How I can remount it with write flag and then how I can return it back to read state?

Regards
Alex
 
Old 05-18-2011, 03:26 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,815

Rep: Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864
Hi,

You can use:
Code:
mount -o remount,rw /home/user/Documents/test

Last edited by bathory; 05-18-2011 at 03:41 AM.
 
Old 05-18-2011, 04:10 AM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by bathory View Post
Hi,

You can use:
Code:
mount -o remount,rw /home/user/Documents/test
sudo mount -o remount,rw /home/user/Documents/test
fuse: unknown option `remount
 
Old 05-18-2011, 05:34 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,815

Rep: Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864
Oops, looks like fuse/sshfs does not support the remount option like other filesystems.
So I guess you have to create a script to unmount the fuse fs, remount it rw so you can do your stuff.
Code:
fusermount -u /home/user/Documents/test
mount /home/user/Documents/test -o rw
When done you can umount it again and mount it from /etc/fstab as usual
Code:
fusermount -u /home/user/Documents/test
mount /home/user/Documents/test
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how can i remount root filesystem as read/write after modify readonly-root file jcwkyl Linux - Newbie 3 12-21-2010 11:40 PM
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - Newbie 16 09-01-2010 10:07 AM
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - General 2 08-26-2010 04:32 PM
remount USB Disk Read Write poetfreak MEPIS 1 08-30-2006 02:49 PM
INIT stops at remount of root in read-write mode cs30109 Linux - Newbie 0 01-29-2005 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:28 PM.

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