From d31fd0f69d13a03bfd9872fe7c1e6919257e45ce Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 6 Aug 2023 15:26:09 +0200 Subject: [PATCH] feat: nfs mount in fstab --- knowledge base/fstab.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/knowledge base/fstab.md b/knowledge base/fstab.md index 7969443..7a8e693 100644 --- a/knowledge base/fstab.md +++ b/knowledge base/fstab.md @@ -8,15 +8,19 @@ ## TL;DR ```txt -# by label -# e2label /dev/sdc1 -# mount -L seagate_2tb_usb /media/usb +# By label. +# Get the label of a device: `e2label '/dev/sdc1'` +# Mount a device by label: `mount -L 'seagate_2tb_usb' '/media/usb'` LABEL=seagate_2tb_usb /media/usb ext3 defaults 0 0 -# by uuid -# vol_id --uuid /dev/sdb2 -# mount -U 41c22818-fbad-4da6-8196-c816df0b7aa8 /disk2p2 +# By UUID. +# Get the UUID of a device: `vol_id --uuid '/dev/sdb2'` +# Mount a device by UUID: `mount -U '41c22818-fbad-4da6-8196-c816df0b7aa8' '/disk2p2'` UUID=41c22818-fbad-4da6-8196-c816df0b7aa8 /disk2p2 ext3 defaults,errors=remount-ro 0 1 + +# Remote NFS shares. +# Mount a device: `mount 'nas.local:/volume1/media' '/media'` +nas.local:/volume1/media /media nfs4 noauto,user 0 0 ``` ## Sources