You are not logged in.

#1 2012-02-06 23:38:00

panuh
Member
From: X :ɯoɹℲ
Registered: 2009-11-24
Posts: 144

pmount ntfs-3g detection slow

Recently the udev/pmount solution from the wiki was not working properly anymore with ntfs filesystems. Instead of mounting right away, it tries many other fstypes before.

From the messages.log it is clearly visible that after running

$ pmount /dev/sdb1

in which sdb1 is an external usb drive formatted in ntfs, pmount tries various fstypes before using ntfs-3g:

Feb  7 00:18:54 catsack2 kernel: [ 8171.153913] scsi_verify_blk_ioctl: 2 callbacks suppressed
Feb  7 00:18:54 catsack2 kernel: [ 8171.153920] mount: sending ioctl 5310 to a partition!
Feb  7 00:18:54 catsack2 kernel: [ 8171.153925] mount: sending ioctl 5310 to a partition!
Feb  7 00:19:05 catsack2 logger: ACPI group/action undefined: thermal_zone / LNXTHERM:00
Feb  7 00:19:10 catsack2 kernel: [ 8187.257165] UDF-fs: warning (device sdb1): udf_load_vrs: No VRS found
Feb  7 00:19:10 catsack2 kernel: [ 8187.257171] UDF-fs: Rescanning with blocksize 2048
Feb  7 00:19:27 catsack2 kernel: [ 8203.980584] UDF-fs: warning (device sdb1): udf_load_vrs: No VRS found
Feb  7 00:19:27 catsack2 kernel: [ 8203.980592] UDF-fs: warning (device sdb1): udf_fill_super: No partition found (1)
Feb  7 00:19:27 catsack2 kernel: [ 8204.031815] mount: sending ioctl 5310 to a partition!
Feb  7 00:19:27 catsack2 kernel: [ 8204.031822] mount: sending ioctl 5310 to a partition!
Feb  7 00:19:43 catsack2 kernel: [ 8220.293863] UDF-fs: warning (device sdb1): udf_load_vrs: No VRS found
Feb  7 00:19:43 catsack2 kernel: [ 8220.293870] UDF-fs: Rescanning with blocksize 2048
Feb  7 00:20:00 catsack2 kernel: [ 8237.106914] UDF-fs: warning (device sdb1): udf_load_vrs: No VRS found
Feb  7 00:20:00 catsack2 kernel: [ 8237.106921] UDF-fs: warning (device sdb1): udf_fill_super: No partition found (1)
Feb  7 00:20:00 catsack2 kernel: [ 8237.175191] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.175198] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.231160] ISOFS: Unable to identify CD-ROM format.
Feb  7 00:20:00 catsack2 kernel: [ 8237.244992] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.244999] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.287780] ISOFS: Unable to identify CD-ROM format.
Feb  7 00:20:00 catsack2 kernel: [ 8237.322178] FAT-fs (sdb1): Can't find a valid FAT filesystem
Feb  7 00:20:00 catsack2 kernel: [ 8237.335421] FAT-fs (sdb1): Can't find a valid FAT filesystem
Feb  7 00:20:00 catsack2 kernel: [ 8237.351555] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.351561] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.352412] hfs: unable to find HFS+ superblock
Feb  7 00:20:00 catsack2 kernel: [ 8237.368167] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.368173] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.369161] hfs: unable to find HFS+ superblock
Feb  7 00:20:00 catsack2 kernel: [ 8237.384949] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.384956] mount: sending ioctl 5310 to a partition!
Feb  7 00:20:00 catsack2 kernel: [ 8237.385790] hfs: can't find a HFS filesystem on dev sdb1.
Feb  7 00:20:00 catsack2 kernel: [ 8237.405793] hfs: can't find a HFS filesystem on dev sdb1.
Feb  7 00:20:00 catsack2 kernel: [ 8237.421929] EXT3-fs (sdb1): error: can't find ext3 filesystem on dev sdb1.
Feb  7 00:20:00 catsack2 kernel: [ 8237.438546] EXT3-fs (sdb1): error: can't find ext3 filesystem on dev sdb1.
Feb  7 00:20:00 catsack2 kernel: [ 8237.519051] REISERFS warning (device sdb1): sh-2021 reiserfs_fill_super: can not find reiserfs on sdb1
Feb  7 00:20:00 catsack2 kernel: [ 8237.529048] REISERFS warning (device sdb1): sh-2021 reiserfs_fill_super: can not find reiserfs on sdb1
Feb  7 00:20:00 catsack2 kernel: [ 8237.550546] XFS (sdb1): bad magic number
Feb  7 00:20:00 catsack2 kernel: [ 8237.550553] XFS (sdb1): SB validate failed
Feb  7 00:20:00 catsack2 kernel: [ 8237.565294] XFS (sdb1): bad magic number
Feb  7 00:20:00 catsack2 kernel: [ 8237.565302] XFS (sdb1): SB validate failed
Feb  7 00:20:02 catsack2 ntfs-3g[19584]: Version 2011.4.12 external FUSE 28
Feb  7 00:20:02 catsack2 ntfs-3g[19584]: Mounted /dev/sdb1 (Read-Write, label "Esel", NTFS 3.1)
Feb  7 00:20:02 catsack2 ntfs-3g[19584]: Cmdline options: rw,noexec,nosuid,nodev,user,uid=1000,gid=100,umask=077,fmask=0177,dmask=0077
Feb  7 00:20:02 catsack2 ntfs-3g[19584]: Mount options: rw,noexec,nosuid,nodev,user,allow_other,nonempty,atime,fsname=/dev/sdb1,blkdev,blksize=4096,default_permissions
Feb  7 00:20:02 catsack2 ntfs-3g[19584]: Global ownership and permissions enforced, configuration type 1

I could not find a reason for this new behaviour. Does anyone have any suggestions?

Meanwhile, I added a line to the wiki's udev-rule to detect the fstype. I haven't added it to the wiki page because I was not sure if blkid information about fstypes always corresponds with pmount parameters. Can anyone confirm this?

"panuh" has to be replaced with the according username.

KERNEL!="sd[a-z]*", GOTO="media_by_label_auto_mount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="media_by_label_auto_mount_end"

# Get label
PROGRAM=="/sbin/blkid -o value -s LABEL %N", ENV{dir_name}="%c"
# use basename to correctly handle labels such as ../mnt/foo
PROGRAM=="/usr/bin/basename '%E{dir_name}'", ENV{dir_name}="%c"
ENV{dir_name}=="", ENV{dir_name}="usbhd-%k"

#Get filesystem type
PROGRAM=="/sbin/blkid -o value -s TYPE %N", ENV{fstype}="%c"

ACTION=="add", ENV{dir_name}!="", RUN+="/bin/su panuh -c '/usr/bin/pmount -t %E{fstype} %N %E{dir_name}'"
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/su panuh -c '/usr/bin/pumount /media/%E{dir_name}'"
LABEL="media_by_label_auto_mount_end"

Offline

Board footer

Powered by FluxBB