Tag Info

Hot answers tagged

17

autofs can do this for you. You can configure any number of mountpoints with various options, and the corresponding filesystems are mounted whenever the mountpoint is accessed. After a given amount of inactivity the filesystems are unmounted again. There are no doubt various ways of using autofs, but here's one way of doing what you're trying to do, based ...


9

You can do this with systemd, so you don't have to install extra software and just have a small amount of extra configuration. Simply add noauto,x-systemd.automount to the options in fstab. noauto to not mount automatically on boot and x-systemd.automount to let systemd mount it on access. Source: ArchWiki - fstab


6

Mounting or remounting a filesystem is done using the mount(2) syscall. When remounting, this takes the target location (the mountpoint), the flags to be used in the mount operation, and any extra data used for the specific filesystem involved. When remounting read-only, the flags used are MS_RDONLY and MS_REMOUNT; you're also supposed to provide any other ...


3

You can't use -o uid=pi,gid=pi with ext4; the following should work: sudo mount /dev/sda1 /media/owncloud -t ext4 The uid and gid options are intended for filesystems which don't track ownership themselves (FAT for example). ext4 is a POSIX filesystem and keeps its own information about file ownership, so it doesn't need (and can't use) uid and gid ...


3

why is it in /dev/mmcblk0p1 instead of some sdx? That's caused by udev' rules. 'sdx' - that's a typically udev name for SATA-based devices. Since it shows b FAT32 W95 should I use -t vfat option to mount? Yes, this is a correct option to use. why sudo file -s /dev/mmcblk0p1 is returning /dev/mmcblk0p1: x86 boot sector? So should I use another ...


3

You can try the following to create a case insensitive filesystem in /tmp: truncate -s 100M /tmp/vfat losetup /dev/loop0 /tmp/vfat mkfs.vfat /dev/loop0 mkdir /mnt/vfat mount /dev/loop0 /mnt/vfat If you don't want to use tmpfs but ramfs instead, create a RAM mount first: mkdir /mnt/ramfs mount -t ramfs -o size=110M ramfs /mnt/ramfs Then follow the steps ...


2

Just change the parameter "defaults" by "_netdev", like this: UUID=723eb295-8fe0-409f-a75f-a26eede8904f /mnt/www ext3 _netdev 0 0 This way the mount point will be mounted only after the network start correctly.


2

You normally can't remount a filesystem as read-only if processes have a file on it that's open for writing, or if it contains a file that's deleted but still open. Similarly, you can't unmount a filesystem that has any file open (or similar uses of files such as a process having its current directory there, a running executable, etc.). You can use umount ...


2

You also need port 445 and make sure that you also have incoming related/established traffic allowed. grep 445 /etc/services microsoft-ds 445/tcp # Microsoft Naked CIFS microsoft-ds 445/udp


2

By default, mount is only allowed for root, or, if specified in /etc/fstab, by users. Now, if you USB drive is auto-mounted without being specified in /etc/fstab (or manually by root), will not be mounted with user=youruser option, so youruser will be unable to umount it. If your USB drive is specified in /etc/fstab with user option, any user will be able ...


2

Here are typical lines in /etc/fstab for an external USB mass storage device. UUID="4E1AEA7B1AEA6007" /mnt/passport auto rw,user,noauto 0 0 This particular one happens to be for my Passport USB hard drive. Notice the user keyword in the fourth field. This field (the mount options associated with the filesystem) tells the system to allow users ...


2

Could you add the mount command to /etc/fstab instead of doing it with a script? As for the second part, rc.local is run by root by default, so if you aren't taking steps to run as nass you will be mounting the NFS share as /root/sg. If you want it to run as a different user from rc.local you would have to do something like su nass -c ...


1

The only way you can mount a block device on more than one system at the same time is if the block device contains a filesystem designed for this purpose, such as OCFS2. "Normal" filesystems like ext4 or vfat cannot support this. Since the digital camera almost certainly only supports vfat as a filesystem type, it is not possible. There are some products ...


1

rename /bin/umount to /bin/umount.real Write a script which runs the commands you want to call before unmounting and then call /bin/umount.real create a soft link to your script as /bin/umount


1

Some advances, (I will edit this answer if/when I find a proper final solution). After doing a full backup of the device using @INDIVIDUAL-IT's dd command (I think using a bs=1M made the transfer painfully slow though). I was not able to mount the backup file, but a # dd if=backup.img of=backup-skip.img bs=1M skip=4 did create a mountable file ...


1

There are filesystems for which a read-only mount triggers a write operation. The one case I'm aware of is journaling filesystems, where if you mount a filesystem that wasn't unmounted cleanly, that triggers a replay of the journal, even for a read-only mount. With ext3 or ext4 on Linux, pass the noload mount option: mount -o ro,noload /dev/gcw/root ...


1

You can use the ciopfs stackable filesystem, which implements a case-insensitive filesystem on top of a case-sensitive one. mkdir /tmp/case-sensitive /tmp/case-insensitive ciopfs /tmp/case-sensitive /tmp/case-insensitive TMPDIR=/tmp/case-insensitive myapp fusermount -u /tmp/case-insensitive Ciopfs is a FUSE filesystem, which is available on most Unix ...


1

You could also try: sudo pvscan This will show you if any of the disks are in use by the logical volume manager. You can also use fdisk to determine which device corresponds to each physical drive: sudo fdisk -l /dev/sda sudo fdisk -l /dev/sdb sudo fdisk -l /dev/sbc sudo fdisk -l /dev/sdd


1

lsblk will show you the mountpoint of your disks.


1

After hours searching, there seems to be different causes for this issue and different solutions for each one. I'm not an expert to provide a comprehensive answer so I hint to some frequent situations on the topic: Ownership/permission issues for mounted devices on mount points: File permissions won't change USB drive auto-mounted by user but gets write ...


1

Talking about "option 2", it's not a good idea to mount an already mounted remote directory. If you mount it on another mount point and depending on what is your processing, you'd lose the lock mechanism. Furthermore, by default, fuse won't make any mount if the mount point is not empty. IMHO, the best way to proceed is what you say: check if the remote ...


1

by default the mount command displays a list of media devices currently mounted on the system.There are four pieces of information the mount command provides: The device location of the media The mount point in the virtual directory where the media is mounted The file-system type The access status of the mounted media as in your example output of mound ...


1

Try running sudo ntfsfix /dev/sdXY, where sdXY is the name of your device.



Only top voted, non community-wiki answers of a minimum length are eligible