使用新選項重新掛載 fstab 中的所有檔案系統

使用新選項重新掛載 fstab 中的所有檔案系統

mount -a命令忽略安裝選項,這使得它在您更改時毫無用處。

如何像重新啟動一樣重新評估 fstab 中的所有掛載選項?

答案1

你有沒有嘗試過重新安裝選項?

mount -o remount -a

應該使用更改後的安裝選項重新安裝系統表

答案2

手動方式,作為fish多線:

cat /etc/fstab | while read dev mnt type opt dump pass
    if not string match noauto (string split , $opt)
        mount -o remount,$opt $mnt
    end
end

這假設noauto未安裝安裝點。我的情況就是這樣,因為我的備份磁碟通常是卸載的。

相關內容