sudo umount /dev/sda2
参数:
-a, --all unmount all filesystems
-A, --all-targets unmount all mountpoints for the given device in the
current namespace
-c, --no-canonicalize don't canonicalize paths
-d, --detach-loop if mounted loop device, also free this loop device
--fake dry run; skip the umount(2) syscall
-f, --force force unmount (in case of an unreachable NFS system)
-i, --internal-only don't call the umount. helpers
-n, --no-mtab don't write to /etc/mtab
-l, --lazy detach the filesystem now, clean up things later
-O, --test-opts limit the set of filesystems (use with -a)
-R, --recursive recursively unmount a target with all its children
-r, --read-only in case unmounting fails, try to remount read-only
-t, --types limit the set of filesystem types
-v, --verbose say what is being done
-q, --quiet suppress 'not mounted' error messages
-N, --namespace perform umount in another namespace
-h, --help display this help
-V, --version display version
2.若此时出现 target is busy的提示,则说明有进程正在使用此硬盘;若无此提示则跳过此步骤
sudo ntfsfix /dev/sda2
参数:
-b, --clear-bad-sectors Clear the bad sector list
-d, --clear-dirty Clear the volume dirty flag
-h, --help Display this help
-n, --no-action Do not write anything
-V, --version Display version information
4.重新挂载硬盘
sudo mount -o rw /dev/sda2
5.通过df命令查看挂载情况,并验证硬盘支持读写的状态
df
6.通过mount命令查看硬盘读写状态
mount
参数:
Options:
-a, --all mount all filesystems mentioned in fstab
-c, --no-canonicalize don't canonicalize paths
-f, --fake dry run; skip the mount(2) syscall
-F, --fork fork off for each device (use with -a)
-T, --fstab alternative file to /etc/fstab
-i, --internal-only don't call the mount. helpers
-l, --show-labels show also filesystem labels
-n, --no-mtab don't write to /etc/mtab
--options-mode
what to do with options loaded from fstab
--options-source
mount options source
--options-source-force
force use of options from fstab/mtab
-o, --options comma-separated list of mount options
-O, --test-opts limit the set of filesystems (use with -a)
-r, --read-only mount the filesystem read-only (same as -o ro)
-t, --types limit the set of filesystem types
--source explicitly specifies source (path, label, uuid)
--target explicitly specifies mountpoint
--target-prefix
specifies path use for all mountpoints
-v, --verbose say what is being done
-w, --rw, --read-write mount the filesystem read-write (default)
-N, --namespace perform mount in another namespace
-h, --help display this help
-V, --version display version
通过/dev/sda2 on /home/pi/nas type fuseblk (rw,nosuid,nodev,noexec,relatime,user_id= 0,group_id=0,allow_other,blksize=4096)
可以看出,硬盘已经支持读写