Skip to contentSkip to conversation

Mount options for removable drives

DISCUSSION Paul D. DeRocco 3 participants 4 messages Jul 12, 2013 – Jul 13, 2013

lore
Share & tools
lore
#0 lore raw

Can someone point me to the configuration for how removable drives are mounted? When I plug in a flash drive, it mounts /dev/sdb1 as /media/sdb1, but it uses "relatime" and I'd like to use "noatime". I'd also like it to mount in "sync" mode, which I would think would be the default for such a drive, but I've gotten a corrupted FAT when I've yanked the drive.

This is basically a core-image-base build, modified to use systemd, but I don't see any systemd mount unit that handles it, so it must be some other part of the system.

Signature · 2 lines
Ciao,               Paul D. DeRocco
Paul                mailto:[email protected] 
#1 lore raw
Quoted 10 lines · Paul D. DeRocco

Can someone point me to the configuration for how removable drives are mounted? When I plug in a flash drive, it mounts /dev/sdb1 as /media/sdb1, but it uses "relatime" and I'd like to use "noatime". I'd also like it to mount in "sync" mode, which I would think would be the default for such a drive, but I've gotten a corrupted FAT when I've yanked the drive.

This is basically a core-image-base build, modified to use systemd, but I don't see any systemd mount unit that handles it, so it must be some other part of the system.

Look in /etc/udev on the image, this is handled by udev.

--
Paul Barker

Email: [email protected]
http://www.paulbarker.me.uk

#2 lore raw
Quoted 18 lines
Quoted 12 lines · Paul D. DeRocco

Can someone point me to the configuration for how removable drives are
mounted? When I plug in a flash drive, it mounts /dev/sdb1 as /media/sdb1,
but it uses "relatime" and I'd like to use "noatime". I'd also like it to
mount in "sync" mode, which I would think would be the default for such a
drive, but I've gotten a corrupted FAT when I've yanked the drive.

Quoted 5 lines

This is basically a core-image-base build, modified to use systemd, but I
don't see any systemd mount unit that handles it, so it must be some other
part of the system.

Quoted 3 lines

From: Paul Barker

Look in /etc/udev on the image, this is handled by udev.

Thanks. Changing /etc/fstab does bupkis, so I provided my own slightly modified version of the mount.sh script in udev-extraconf, and that seems to work fine.

Signature · 2 lines
Ciao,               Paul D. DeRocco
Paul                mailto:[email protected] 
#3 lore raw
In reply to Paul D. DeRocco
Quoted 5 lines · Paul D. DeRocco

Can someone point me to the configuration for how removable drives are mounted? When I plug in a flash drive, it mounts /dev/sdb1 as /media/sdb1, but it uses "relatime" and I'd like to use "noatime". I'd also like it to mount in "sync" mode, which I would think would be the default for such a drive, but I've gotten a corrupted FAT when I've yanked the drive.

As I understand it, the caveat with "sync" is that you do a *lot* more writes to the disk which dramatically reduces the lifespan of flash-based media.

Ross