Does mounting a USB device automatically modify it?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
Most popular desktop Linux distributions automatically mount USB storage devices when the devices are connected or at least provide an easy way to mount them from the GUI. Does mounting a USB storage device the "default" way (from the GUI) write anything to the device? It's simple enough to mount the device as read-only, but if I don't explicitly write to the device (with cp
, touch
, mkdir
, etc.) will the operating system write anything in the background?
I have a hardware RAID controller for two USB hard drives configured in RAID 1. At some point I may want to remove the drives and examine them individually to make sure that content is being written to both and to check on the drives' health. I'm concerned that if I forget to mount the drives as read-only the operating system (in my case Manjaro Linux) might update something that I'm unaware of (perhaps "last time mounted" or "last time data was accessed") and break the RAID 1 setup.
Thank you for your time!
mount usb usb-drive automounting
add a comment |Â
up vote
4
down vote
favorite
Most popular desktop Linux distributions automatically mount USB storage devices when the devices are connected or at least provide an easy way to mount them from the GUI. Does mounting a USB storage device the "default" way (from the GUI) write anything to the device? It's simple enough to mount the device as read-only, but if I don't explicitly write to the device (with cp
, touch
, mkdir
, etc.) will the operating system write anything in the background?
I have a hardware RAID controller for two USB hard drives configured in RAID 1. At some point I may want to remove the drives and examine them individually to make sure that content is being written to both and to check on the drives' health. I'm concerned that if I forget to mount the drives as read-only the operating system (in my case Manjaro Linux) might update something that I'm unaware of (perhaps "last time mounted" or "last time data was accessed") and break the RAID 1 setup.
Thank you for your time!
mount usb usb-drive automounting
Some filesystems like ext2 to 4 have mount counts and last mount times that are updated on the disk if it is not mounted readonly. Seeman tune2fs
for example. You could use iosnoop to trace all i/o to your device.
â meuh
Apr 27 at 18:00
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
Most popular desktop Linux distributions automatically mount USB storage devices when the devices are connected or at least provide an easy way to mount them from the GUI. Does mounting a USB storage device the "default" way (from the GUI) write anything to the device? It's simple enough to mount the device as read-only, but if I don't explicitly write to the device (with cp
, touch
, mkdir
, etc.) will the operating system write anything in the background?
I have a hardware RAID controller for two USB hard drives configured in RAID 1. At some point I may want to remove the drives and examine them individually to make sure that content is being written to both and to check on the drives' health. I'm concerned that if I forget to mount the drives as read-only the operating system (in my case Manjaro Linux) might update something that I'm unaware of (perhaps "last time mounted" or "last time data was accessed") and break the RAID 1 setup.
Thank you for your time!
mount usb usb-drive automounting
Most popular desktop Linux distributions automatically mount USB storage devices when the devices are connected or at least provide an easy way to mount them from the GUI. Does mounting a USB storage device the "default" way (from the GUI) write anything to the device? It's simple enough to mount the device as read-only, but if I don't explicitly write to the device (with cp
, touch
, mkdir
, etc.) will the operating system write anything in the background?
I have a hardware RAID controller for two USB hard drives configured in RAID 1. At some point I may want to remove the drives and examine them individually to make sure that content is being written to both and to check on the drives' health. I'm concerned that if I forget to mount the drives as read-only the operating system (in my case Manjaro Linux) might update something that I'm unaware of (perhaps "last time mounted" or "last time data was accessed") and break the RAID 1 setup.
Thank you for your time!
mount usb usb-drive automounting
asked Apr 27 at 16:53
Ender Wiggin
14814
14814
Some filesystems like ext2 to 4 have mount counts and last mount times that are updated on the disk if it is not mounted readonly. Seeman tune2fs
for example. You could use iosnoop to trace all i/o to your device.
â meuh
Apr 27 at 18:00
add a comment |Â
Some filesystems like ext2 to 4 have mount counts and last mount times that are updated on the disk if it is not mounted readonly. Seeman tune2fs
for example. You could use iosnoop to trace all i/o to your device.
â meuh
Apr 27 at 18:00
Some filesystems like ext2 to 4 have mount counts and last mount times that are updated on the disk if it is not mounted readonly. See
man tune2fs
for example. You could use iosnoop to trace all i/o to your device.â meuh
Apr 27 at 18:00
Some filesystems like ext2 to 4 have mount counts and last mount times that are updated on the disk if it is not mounted readonly. See
man tune2fs
for example. You could use iosnoop to trace all i/o to your device.â meuh
Apr 27 at 18:00
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
The answer depends on the file system. Those typically used on removable devices (FAT32 or ExFAT) shouldnâÂÂt be modified on mount, but many file systems store their last mount time and update that every time theyâÂÂre mounted. Even when mounted read-only, some file systems such as Ext3 or Ext4 are liable to replay their journal (if the file system is dirty) and thus be modified.
There are ways to force a really read-only mount. One approach works with any file system: you can set the underlying block device itself to be read-only, using blockdev --setro
. Others are file system-specific; for the Ext family, you can use the ro,noload
mount options. To do this on a system with auto-mounting enabled, youâÂÂd have to add a udev
rule to protect the device before itâÂÂs mounted.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
The answer depends on the file system. Those typically used on removable devices (FAT32 or ExFAT) shouldnâÂÂt be modified on mount, but many file systems store their last mount time and update that every time theyâÂÂre mounted. Even when mounted read-only, some file systems such as Ext3 or Ext4 are liable to replay their journal (if the file system is dirty) and thus be modified.
There are ways to force a really read-only mount. One approach works with any file system: you can set the underlying block device itself to be read-only, using blockdev --setro
. Others are file system-specific; for the Ext family, you can use the ro,noload
mount options. To do this on a system with auto-mounting enabled, youâÂÂd have to add a udev
rule to protect the device before itâÂÂs mounted.
add a comment |Â
up vote
4
down vote
The answer depends on the file system. Those typically used on removable devices (FAT32 or ExFAT) shouldnâÂÂt be modified on mount, but many file systems store their last mount time and update that every time theyâÂÂre mounted. Even when mounted read-only, some file systems such as Ext3 or Ext4 are liable to replay their journal (if the file system is dirty) and thus be modified.
There are ways to force a really read-only mount. One approach works with any file system: you can set the underlying block device itself to be read-only, using blockdev --setro
. Others are file system-specific; for the Ext family, you can use the ro,noload
mount options. To do this on a system with auto-mounting enabled, youâÂÂd have to add a udev
rule to protect the device before itâÂÂs mounted.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
The answer depends on the file system. Those typically used on removable devices (FAT32 or ExFAT) shouldnâÂÂt be modified on mount, but many file systems store their last mount time and update that every time theyâÂÂre mounted. Even when mounted read-only, some file systems such as Ext3 or Ext4 are liable to replay their journal (if the file system is dirty) and thus be modified.
There are ways to force a really read-only mount. One approach works with any file system: you can set the underlying block device itself to be read-only, using blockdev --setro
. Others are file system-specific; for the Ext family, you can use the ro,noload
mount options. To do this on a system with auto-mounting enabled, youâÂÂd have to add a udev
rule to protect the device before itâÂÂs mounted.
The answer depends on the file system. Those typically used on removable devices (FAT32 or ExFAT) shouldnâÂÂt be modified on mount, but many file systems store their last mount time and update that every time theyâÂÂre mounted. Even when mounted read-only, some file systems such as Ext3 or Ext4 are liable to replay their journal (if the file system is dirty) and thus be modified.
There are ways to force a really read-only mount. One approach works with any file system: you can set the underlying block device itself to be read-only, using blockdev --setro
. Others are file system-specific; for the Ext family, you can use the ro,noload
mount options. To do this on a system with auto-mounting enabled, youâÂÂd have to add a udev
rule to protect the device before itâÂÂs mounted.
edited Apr 27 at 18:29
answered Apr 27 at 18:02
Stephen Kitt
140k22302363
140k22302363
add a comment |Â
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%2f440477%2fdoes-mounting-a-usb-device-automatically-modify-it%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
Some filesystems like ext2 to 4 have mount counts and last mount times that are updated on the disk if it is not mounted readonly. See
man tune2fs
for example. You could use iosnoop to trace all i/o to your device.â meuh
Apr 27 at 18:00