Vin*_*ent 6 linux ubuntu mount hard-disk fstab
在我运行 Ubuntu 12.04 LTS 的 PC 中,我安装了三个 SATA 硬盘。其中两个安装在冷却器附近。我想物理切换两个驱动器(一个不在风扇附近的应该移动到风扇附近)。Ubunutu 将如何处理 switch?fstab 中的设备名称,它们是否以任何方式依赖于它们连接到我主板上的 sata 端口?
编辑:
这是我的 /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=f04e6038-4412-46c4-b58d-67bfe3f8eddd / ext4 errors=remount-ro 0 1
# /Volumes/Backup was on /dev/sdb1 during installation
UUID=dc25bafb-adbc-4a65-845c-02c9253a795e /Volumes/Backup ext4 defaults 0 2
# /Volumes/Storage was on /dev/sdc1 during installation
UUID=74867f3e-acda-4efc-a6aa-7d21484d64a4 /Volumes/Storage ext4 defaults 0 2
/dev/sdc2 /Volumes/Storage ext4 defaults 0 0
#/dev/sdc1 /media/sdc1 swap sw 0 0
/dev/sdc1 none swap defaults 0 0
Run Code Online (Sandbox Code Playgroud)
编辑(根据评论更改 /etc/fstab):
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
UUID=f04e6038-4412-46c4-b58d-67bfe3f8eddd / ext4 errors=remount-ro 0 1
UUID=dc25bafb-adbc-4a65-845c-02c9253a795e /Volumes/Backup ext4 defaults 0 2
UUID=74867f3e-acda-4efc-a6aa-7d21484d64a4 /Volumes/Storage ext4 defaults 0 2
UUID=88ee73e8-7556-40fa-b696-fbc15161036b none swap defaults 0 0
Run Code Online (Sandbox Code Playgroud)
重新排序驱动器时,UUID 不会更改。但是,您的
sdc?条目可能会更改。最好不要依赖
sd?编号。最好使用 UUID 或 LABEL 来寻址您的分区。
查找 UUID 或 LABEL
作为根:
blkid -o list -c /dev/null
Run Code Online (Sandbox Code Playgroud)
更改条目
更改使用/dev/sd?语法的条目(在您的情况下/dev/sdc1)以使用 UUID 或 LABEL(如果文件系统有的话)。使用blkid输出中的值。
UUID=24467f3e-bcda-5efc-a6aa-7d21384d64a4
LABEL=swap
Run Code Online (Sandbox Code Playgroud)