在执行mount命令时,我将得到以下输出。
[root@]# mount
/dev/sda2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sda3 on /home type ext4 (rw)
none on /proc/sys/fs/
我有两个带有ext4文件系统的SSD。当我将sda1挂载到/mnt/old-samsung-830上时,它会将/mnt/old-samsung-830目录的所有者和组从根目录:root更改为jim:jim。但是,如果我使用umount sda1,并将sdb1挂载到同一个目录中,那么所有者和组仍然是根用户。我无法解释这种行为&希望有人解释为什么/如何发生这种情况。下面是一个例子:
### **Note the two disks are unmounted** ###
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNT
我需要进入SD卡上的一个分区,但它没有文件系统,我不知道如何挂载它。当我打字时
parted /dev/sdc print
我得到了
Model: USB Mass Storage Device (scsi)
Disk /dev/sdc: 129GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 62.9MB 58.7MB primary fat16
$ mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
no
当我们执行此操作时(在linux 7.x上)
umount /grop/sdc
umount: /grop/sdc: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
我们可以看到,坐骑在繁忙的时候失败了。
但当我们做remount的时候..。重装是成功的,如下所示:
mount -o rw,remount /grop/sdc
echo $?
0
太有趣了。
重新挂载是否使用类似( umount -l )
我目前正在尝试从我的计算机的硬盘上备份数据到一个外部驱动器,同时从USB现场启动Ubuntu,我遇到了一些问题。你看,我不能装硬盘。每当我尝试的时候,我总是会犯两个错误中的一个:
fuse: failed to access mountpoint [file I'm trying to mount to]: No such file or directory
或
Error mounting: mount exited with exit code 21: mount: according to mtab, [drive] is already mounted on [file I
因此,我使用以下内容运行Linux:
一个外部驱动器直接插入USB3.0端口
带有两个HDD的外部驱动器区(每个可用插槽中有一个)
我有以下几点意见:
# Passport is the external drive connected directly
UUID=7e519cb9-3714-4426-932a-f4fc249037f0 /media/passport ext4 defaults,nofail 0 0
# Bullet is one of the drives in the external bay
UUID=6f7a7259-ecf1-437e-bf82-afc
它并不总是这样,但现在我发现这种不一致的行为。绑定挂载不会复制现有挂载(除非使用--rbind),但是新挂载(和卸载)会自动复制。好像是个虫子。这是什么原因?
# mount --bind / /mnt/tmp
# mount | grep /mnt
/dev/mapper/fedora-root on /mnt/tmp type ext4 (rw,relatime,seclabel,data=ordered)
# mount /var/lib/docker
# mount | grep mnt
/dev/mapper/fedora-root on /mnt/tmp type ext4 (rw
这里的type是fuseblk:
$ mount
/dev/sdb1 on /media/me/MY-DEVICE type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
下面可以看到,Partition Type是HPFS/NTFS,conents是exFAT。
📷
为什么会有区别?
我正在通过ssh访问另一个ununtu linux系统。
现在,当我要更改该系统中任何文件的权限时,它会显示
chmod: changing permissions of `Android.mk': Read-only file system
chmod: changing permissions of `system_init.cpp': Read-only file system
我尝试使用sudo并以root身份登录,但仍然不明白为什么我无法更改该文件的权限。