USB 驱动器在 Nautilus 中打开之前不会显示在目录树中

USB 驱动器在 Nautilus 中打开之前不会显示在目录树中

我有一个特定的 USB 棒,我经常用它来传输文件。插入后,它最终会挂载在/media/user/Transfer。我说“最终”是因为,一开始,我的 shell 告诉我它/media/user是空的(mount也无法显示设备)。只有当我在 Nautilus 中打开驱动器时,它才会显示在 shell 中(和 下mount)。

这是一致的行为,因此这似乎不仅仅是一个时间问题。可能是什么原因造成的?

这是在 Ubuntu 20.04 上。

的输出dpkg -l | grep mount

ii libmount-dev:amd64    2.34-0.1ubuntu9.3    amd64    device mounting library - headers and static libraries
ii libmount1:amd64       2.34-0.1ubuntu9.3    amd64    device mounting library
ii libmount1:i386        2.34-0.1ubuntu9.3    i386     device mounting library
ii mount                 2.34-0.1ubuntu9.3    amd64    tools for mounting and manipulating filesystems

/etc/fstab包含

/dev/mapper/vgubuntu-root   /               ext4    errors=remount-ro 0    1
UUID=54DF-0F1C              /boot/efi       vfat    umask=0077        0    1
/dev/mapper/vgubuntu-swap_1 none            swap    sw                0    1

的输出gsettings get org.gnome.desktop.media-handling automount

true

插入 USB 驱动器时,输出udisksctl monitor

14:19:28.156: Added /org/freedesktop/UDisks2/drives/Verbatim_STORE_N_GO_071816855864FE27
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                true
    Configuration:              {}
    ConnectionBus:              usb
    Ejectable:                  true
    Id:                         Verbatim-STORE-N-GO-071816855864FE27
    Media:                      
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:         
    MediaRemovable:             true
    Model:                      STORE N GO
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  true
    Revision:                   PMAP
    RotationRate:               -1
    Seat:                       seat0
    Serial:                     071816855864FE27
    SiblingId:                  /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0
    Size:                       31042043904
    SortKey:                    01hotplug/1655835568155716
    TimeDetected:               1655835568155716
    TimeMediaDetected:          1655835568155716
    Vendor:                     Verbatim
    WWN:                        
14:19:28.156: Added /org/freedesktop/UDisks2/block_devices/sdb
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/sdb
    DeviceNumber:               2064
    Drive:                      '/org/freedesktop/UDisks2/drives/Verbatim_STORE_N_GO_071816855864FE27'
    HintAuto:                   true
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         
    IdLabel:                    
    IdType:                     
    IdUUID:                     
    IdUsage:                    
    IdVersion:                  
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sdb
    ReadOnly:                   false
    Size:                       31042043904
    Symlinks:                   /dev/disk/by-id/usb-Verbatim_STORE_N_GO_071816855864FE27-0:0
                                /dev/disk/by-path/pci-0000:00:14.0-usb-0:1:1.0-scsi-0:0:0:0
    UserspaceMountOptions:      
  org.freedesktop.UDisks2.PartitionTable:
    Partitions:         []
    Type:               gpt
14:19:28.332: Added /org/freedesktop/UDisks2/block_devices/sdb1
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/sdb1
    DeviceNumber:               2065
    Drive:                      '/org/freedesktop/UDisks2/drives/Verbatim_STORE_N_GO_071816855864FE27'
    HintAuto:                   true
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         by-uuid-6294ed84-5993-4b8e-a286-03716e760716
    IdLabel:                    Transfer
    IdType:                     ext4
    IdUUID:                     6294ed84-5993-4b8e-a286-03716e760716
    IdUsage:                    filesystem
    IdVersion:                  1.0
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sdb1
    ReadOnly:                   false
    Size:                       31039946752
    Symlinks:                   /dev/disk/by-id/usb-Verbatim_STORE_N_GO_071816855864FE27-0:0-part1
                                /dev/disk/by-label/Transfer
                                /dev/disk/by-partuuid/bd0549e1-a5e5-47e5-8390-be12eac7ea88
                                /dev/disk/by-path/pci-0000:00:14.0-usb-0:1:1.0-scsi-0:0:0:0-part1
                                /dev/disk/by-uuid/6294ed84-5993-4b8e-a286-03716e760716
    UserspaceMountOptions:      
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
    Size:               31039946752
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             1
    Offset:             1048576
    Size:               31039946752
    Table:              '/org/freedesktop/UDisks2/block_devices/sdb'
    Type:               0fc63daf-8483-4772-8e79-3d69d8477de4
    UUID:               bd0549e1-a5e5-47e5-8390-be12eac7ea88
14:19:28.333: /org/freedesktop/UDisks2/block_devices/sdb: org.freedesktop.UDisks2.PartitionTable: Properties Changed
  Partitions:           ['/org/freedesktop/UDisks2/block_devices/sdb1']

输出journalctl -f

Jun 21 14:19:25 napalmshoes kernel: usb 1-1: new high-speed USB device number 91 using xhci_hcd
Jun 21 14:19:25 napalmshoes kernel: usb 1-1: New USB device found, idVendor=18a5, idProduct=0302, bcdDevice= 1.00
Jun 21 14:19:25 napalmshoes kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 21 14:19:25 napalmshoes kernel: usb 1-1: Product: STORE N GO
Jun 21 14:19:25 napalmshoes kernel: usb 1-1: Manufacturer: Verbatim
Jun 21 14:19:25 napalmshoes kernel: usb 1-1: SerialNumber: 071816855864FE27
Jun 21 14:19:25 napalmshoes kernel: usb-storage 1-1:1.0: USB Mass Storage device detected
Jun 21 14:19:25 napalmshoes kernel: scsi host4: usb-storage 1-1:1.0
Jun 21 14:19:25 napalmshoes mtp-probe[3425657]: checking bus 1, device 91: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Jun 21 14:19:25 napalmshoes mtp-probe[3425657]: bus: 1, device: 91 was not an MTP device
Jun 21 14:19:25 napalmshoes mtp-probe[3425664]: checking bus 1, device 91: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Jun 21 14:19:25 napalmshoes mtp-probe[3425664]: bus: 1, device: 91 was not an MTP device
Jun 21 14:19:27 napalmshoes kernel: scsi 4:0:0:0: Direct-Access     Verbatim STORE N GO       PMAP PQ: 0 ANSI: 4
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: [sdb] 60628992 512-byte logical blocks: (31.0 GB/28.9 GiB)
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: [sdb] Write Protect is off
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: [sdb] No Caching mode page found
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
Jun 21 14:19:27 napalmshoes kernel:  sdb: sdb1
Jun 21 14:19:27 napalmshoes kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk

相关内容