mount device dir -o auto,user,ro,suid,exec,codepage=936,iocharset=cp936
*Tags*: mount point options dump pass
The first field, (fs_spec), describes the block special device or remote filesystem to be mounted.
The second field, (fs_file), describes the mount point for the filesys- tem.
The third field, (fs_vfstype), describes the type of the filesystem.
The fourth field, (fs_mntops), describes the mount options associated with the filesystem.
It is formatted as a comma separated list of options. Common for all types of file system are the options “noauto” (do not mount when "mount -a" is given, e.g., at boot time), “user” (allow a user to mount), and “owner” (allow device owner to mount), and “_netdev” (device requires network to be available). The “owner” and “_netdev” options are Linux-specific.
The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.
The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time.
The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware.
If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
mount -F nfs -o ro,vers=2 bee:/export/share/local /mnt mount -t smbfs -o soft,intr,bg,username=termite,password=666,uid=tong,gid=tong //whitespruce/termite /mnt/tmp1
I have it working now with codepage=unicode,iocharset=utf8,unicode.
Mount Chinese CDe:
mount device dir -o auto,user,ro,suid,exec,codepage=936,iocharset=cp936
Mount Chinese HD volume:
mount device dir -o defaults,user,exec,uid=9999,gid=600,umask=072,codepage=936,iocharset=cp936,noauto
Mount Japanese Fat32 volume:
mount device dir -o uid=crewbase,gid=guest,fmask=0002,dmask=0002,codepage=932,iocharset=utf8
Solaris:
can't set uid:gid
-O Overlay mount. Allow the file system to be
mounted over an existing mount point, making
the underlying file system inaccessible. If
a mount is attempted on a pre-existing mount
point without setting this flag, the mount
will fail, producing the error "device busy".
Newsgroups: comp.os.linux.misc,alt.os.linux > How can I make sure that non-privilaged users can mount /dev/cdrom too?
Add the keyword option "user" in /etc/fstab relating to cdrom.
For eg, my /etc/fstab says, /dev/cdrom /mnt/cdrom iso9660 ro,nosuid,noauto,exec,user,nodev 0 0
Hari.
Newsgroups: comp.unix.questions,comp.os.linux.setup
>Is it possible to alow certain user to have mount privilege? >'cause when I tried to mount a foreign volumn as a normal user, I >got "mount: permission denied" under solaris and "mount: only root >can do that" under linux.
Some "mount" commands are designed to be installed s-uid root, with a designation in the fstab file as to whether a given volume is user-mountable (this is common on Linux systems). A more generic method (and one with finer-grained control) is to use "sudo" (or its equivalent).
Ken Pizzini
put an entry in the fstab file and mount it using only the device node name or the mount point as an argument.
So the command: mount /dev/hda1 /mnt/windows is only allowed for the root user, even after putting an entry in fstab!, but the command: mount /mnt/windows or mount /dev/hda1 is allowed by all users if a line in fstab is included which describes the device to mount on the mountpoint specified.
Eric
Add the "user" option to the entry in /etc/fstab for the mount point.
James D. McIninch
user Allow an ordinary user to mount the file system. The
name of the mounting user is written to mtab so that he
can unmount the file system again.
NB, This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).
Newsgroups: comp.unix.solaris,comp.sys.sun.admin,comp.unix.shell
> Yes, it's another umount prob. > And no, I already tried fuser -c and fuser -u, but to no avail. :( > > OK, dirs cannot be mounted, but I'll just call it that way for now. > > My sys is Sol 2.6. on Sparc. > The prob is that I have a dir that's stuck in the middle of being > umounted. Umount says device busy, but nothing is mounted "below" that > target. The entry in mnttab is still there, but the presumably still > mounted dir is not accessible that way.
If you've already tried "fuser -ck /somefs; umount /somefs" then I think a reboot would be the only way to fix it.
James
you probably have it shared.
Philip Brown
Try lsof (depending on your OS, you may need to find a copy from somewhere) - this will show files in use within the filesystem as well
Adrian Bal
Had a similar problem the other day - just dropped the box down a runlevel and it was fine.
yeah
fuser -c /somefs fuser -ck /somefs
use -m instead of -c:
fuser -mv /mnt/cdrom/
USER PID ACCESS COMMAND
/mnt/cdrom/ root 2296 ..c.. rpc.rquotad
root 2305 ..c.. rpc.mountd
fuser -mk /mnt/cdrom/; fuser -m /mnt/cdrom/
-m name specifies a file on a mounted file system or a block
device that is mounted. All processes accessing files on that
file system are listed. If a directory file is specified, it
is automatically changed to name/. to use any file system that
might be mounted on that directory.
-v Verbose mode. Processes are shown in a ps-like style. The
fields PID, USER and COMMAND are similar to ps. ACCESS shows
how the process accesses the file. If the access is by the
kernel (e.g. in the case of a mount point, a swap file, etc.),
kernel is shown instead of the PID.
-k Kill processes accessing the file. Unless changed with -signal,
SIGKILL is sent. An fuser process never kills itself, but may
kill other fuser processes. The effective user ID of the
process executing fuser is set to its real user ID before
attempting to kill.
Newsgroups: gmane.linux.distributions.grml.user Subject: Re: Loop mount not automatically cleaned Date: Wed, 7 Feb 2007 03:05:08 +0000 (UTC)
>> I noticed that loop mounts are not automatically cleaned in my system. >> Is there any way that I can fix it? >> >> Each time after I loop mount, the loop device number increased. When I do >> ps, I found that there are many loop process in execution: > [...] > > Which mount version are you using? 'dpkg -S =mount ; mount --version' > I'm using mount of package loop-aes-utils and did not notice the > mentioned behaviour.
Strange to me too. Here is the required info:
$ mount --version mount: mount-2.12r
$ apt-cache policy mount mount: Installed: 2.12r-16 Candidate: 2.12r-16
$ apt-cache policy loop-aes-utils loop-aes-utils: Installed: 2.12r-15 Candidate: 2.12r-15
$ sudo mount -o loop grml_small_0.3.iso /mnt/os2/
$ mount | grep os2 /dev/loop2 on /mnt/os2 type iso9660 (ro)
$ sudo umount /mnt/os2/
$ ps -e | grep loop 32721 ? 00:00:00 loop0 3332 ? 00:00:00 loop1 2776 ? 00:00:00 loop2
> $ ps -e | grep loop > 32721 ? 00:00:00 loop0 > 3332 ? 00:00:00 loop1 > 2776 ? 00:00:00 loop2
Run 'losetup -d /dev/loop2' to fix the issue manually. To fix the issue for the future remove the symlink /etc/mtab pointing to /proc/mounts:
rm /etc/mtab cp /proc/mounts /etc/mtab
from now on your system should remove the loop device automatically.
mika
How do you mount it (with "-o loop" or with losetup)? How do you unmount it (by giving the mountpoint, the image file or the loop device)? Is your /etc/mtab a file or is it a symbolic link to /proc/mounts?
The behaviour I know is that the loop device will *not* be freed if
/etc/mtab is a link to /proc/mounts *or*
you gave the loop device explicitly as umount argument *or*
you mounted it with losetup explicitly *or*
you used -n when mounting (so the mountpoint does not end up in mtab)
But different mount versions do it differently (busybox mount even has its own parameter for it, because embedded systems usually use the /mtab symlink).
You can always free your loop devices with losetup.
Michael Schierl