Does mounting external media read only make ejecting the media unnessesary? If so, how to mount all external media read only?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am building hardware solutions for video debriefing purposes, where users will connect and remove cameras and/or SD cards to computers all the time.
I am working with Raspberry pi's (Raspbian) for media playback.
A fast media server for video related calculations and media conversion (Ubuntu) and a fast NAS for storage.
I like to overcome the need for the user to ejecting media before removing the hardware, because I know from experience nobody will take the effort anyway. I have no need for my system to write data onto the users devices. So I was wondering if there is a way to mount all external devices always read-only in order to prevent any data corruption on unsafe removal.
I am fairly new to Linux and programming. The software I am writing is mainly Python, but I am looking for a more system wide approach for this problem so the user will not experience any
linux readonly removable-storage
add a comment |Â
up vote
1
down vote
favorite
I am building hardware solutions for video debriefing purposes, where users will connect and remove cameras and/or SD cards to computers all the time.
I am working with Raspberry pi's (Raspbian) for media playback.
A fast media server for video related calculations and media conversion (Ubuntu) and a fast NAS for storage.
I like to overcome the need for the user to ejecting media before removing the hardware, because I know from experience nobody will take the effort anyway. I have no need for my system to write data onto the users devices. So I was wondering if there is a way to mount all external devices always read-only in order to prevent any data corruption on unsafe removal.
I am fairly new to Linux and programming. The software I am writing is mainly Python, but I am looking for a more system wide approach for this problem so the user will not experience any
linux readonly removable-storage
I know what âÂÂvideo debriefingâ means wink
â user2497
Feb 17 at 21:29
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am building hardware solutions for video debriefing purposes, where users will connect and remove cameras and/or SD cards to computers all the time.
I am working with Raspberry pi's (Raspbian) for media playback.
A fast media server for video related calculations and media conversion (Ubuntu) and a fast NAS for storage.
I like to overcome the need for the user to ejecting media before removing the hardware, because I know from experience nobody will take the effort anyway. I have no need for my system to write data onto the users devices. So I was wondering if there is a way to mount all external devices always read-only in order to prevent any data corruption on unsafe removal.
I am fairly new to Linux and programming. The software I am writing is mainly Python, but I am looking for a more system wide approach for this problem so the user will not experience any
linux readonly removable-storage
I am building hardware solutions for video debriefing purposes, where users will connect and remove cameras and/or SD cards to computers all the time.
I am working with Raspberry pi's (Raspbian) for media playback.
A fast media server for video related calculations and media conversion (Ubuntu) and a fast NAS for storage.
I like to overcome the need for the user to ejecting media before removing the hardware, because I know from experience nobody will take the effort anyway. I have no need for my system to write data onto the users devices. So I was wondering if there is a way to mount all external devices always read-only in order to prevent any data corruption on unsafe removal.
I am fairly new to Linux and programming. The software I am writing is mainly Python, but I am looking for a more system wide approach for this problem so the user will not experience any
linux readonly removable-storage
asked Feb 17 at 13:52
Willem de Groot
61
61
I know what âÂÂvideo debriefingâ means wink
â user2497
Feb 17 at 21:29
add a comment |Â
I know what âÂÂvideo debriefingâ means wink
â user2497
Feb 17 at 21:29
I know what âÂÂvideo debriefingâ means wink
â user2497
Feb 17 at 21:29
I know what âÂÂvideo debriefingâ means wink
â user2497
Feb 17 at 21:29
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
It's always recommended to umount properly any media , a file can still be opened for example
You can force media to mount read only with mount command options dedicated to options
mount -o ro /dev/media /example/path
you can use udev rules to force this option to any external media ... see this post to know how to How can I create a udev rule to mount a USB drive read only?
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
risk is nearly zero ...
â francois P
Feb 17 at 14:57
1
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
It's always recommended to umount properly any media , a file can still be opened for example
You can force media to mount read only with mount command options dedicated to options
mount -o ro /dev/media /example/path
you can use udev rules to force this option to any external media ... see this post to know how to How can I create a udev rule to mount a USB drive read only?
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
risk is nearly zero ...
â francois P
Feb 17 at 14:57
1
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
add a comment |Â
up vote
1
down vote
It's always recommended to umount properly any media , a file can still be opened for example
You can force media to mount read only with mount command options dedicated to options
mount -o ro /dev/media /example/path
you can use udev rules to force this option to any external media ... see this post to know how to How can I create a udev rule to mount a USB drive read only?
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
risk is nearly zero ...
â francois P
Feb 17 at 14:57
1
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
add a comment |Â
up vote
1
down vote
up vote
1
down vote
It's always recommended to umount properly any media , a file can still be opened for example
You can force media to mount read only with mount command options dedicated to options
mount -o ro /dev/media /example/path
you can use udev rules to force this option to any external media ... see this post to know how to How can I create a udev rule to mount a USB drive read only?
It's always recommended to umount properly any media , a file can still be opened for example
You can force media to mount read only with mount command options dedicated to options
mount -o ro /dev/media /example/path
you can use udev rules to force this option to any external media ... see this post to know how to How can I create a udev rule to mount a USB drive read only?
answered Feb 17 at 13:59
francois P
914114
914114
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
risk is nearly zero ...
â francois P
Feb 17 at 14:57
1
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
add a comment |Â
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
risk is nearly zero ...
â francois P
Feb 17 at 14:57
1
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
Thanks for your quick response! Do you know if mounting read only really means the data on the mounted drive is not touched in any way? or can a file still become corrupt if its opened while a the drive is removed?
â Willem de Groot
Feb 17 at 14:50
risk is nearly zero ...
â francois P
Feb 17 at 14:57
risk is nearly zero ...
â francois P
Feb 17 at 14:57
1
1
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
Data on the external media should stay untouched. But the running system can become unstable after that, especially if you're disconnecting a (spinning) disk.
â Satà  Katsura
Feb 17 at 15:01
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
@Satà ÂKatsura No it canâÂÂt. Never happens. And besides rpi up to revision 2 canâÂÂt source enough current to drive a magnetic disk. GNU/Linux is famous for ignoring conditions that would make a sane operating system panic (...and so is Linus Torvalds, but thatâÂÂs off-topic)
â user2497
Feb 17 at 21:27
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f424800%2fdoes-mounting-external-media-read-only-make-ejecting-the-media-unnessesary-if-s%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I know what âÂÂvideo debriefingâ means wink
â user2497
Feb 17 at 21:29