fstab device ID not setup, restarts breaking system #17

Closed
opened 2023-11-12 12:12:40 -05:00 by sickprodigy · 2 comments
Owner

use blkid to find UUID and use that instead of /dev/sdf , /dev/sdd, /dev/sdg, etc.

lsblk to list drives/devices

nano /etc/fstab

Can I figure out a single command to implement device id into fstab instead of copying and pasting from 2 terminals. (not possible when i'm sitting at a server with 1 screen and no mouse especially)

blkid -o value -s UUID >> /etc/fstab
This line appends ALL UUIDs to the end of fstab. Just delete the ones you don't want and go from there.

With awk
# blkid | awk '{print $2" /part/"NR" ext4 acl,rw,noatime 0 2"}'

Without awk

# blkid -s UUID /dev/sdb1
/dev/sdb1: UUID="a7d4c7ff-2ccc-4171-8976-aca87c5a24bd"
# blkid -s UUID -o value /dev/sdb1
a7d4c7ff-2ccc-4171-8976-aca87c5a24bd

One of these should work for terminal only users.

use blkid to find UUID and use that instead of /dev/sdf , /dev/sdd, /dev/sdg, etc. lsblk to list drives/devices nano /etc/fstab Can I figure out a single command to implement device id into fstab instead of copying and pasting from 2 terminals. (not possible when i'm sitting at a server with 1 screen and no mouse especially) `blkid -o value -s UUID >> /etc/fstab` This line appends ALL UUIDs to the end of fstab. Just delete the ones you don't want and go from there. With awk `# blkid | awk '{print $2" /part/"NR" ext4 acl,rw,noatime 0 2"}'` Without awk ``` # blkid -s UUID /dev/sdb1 /dev/sdb1: UUID="a7d4c7ff-2ccc-4171-8976-aca87c5a24bd" # blkid -s UUID -o value /dev/sdb1 a7d4c7ff-2ccc-4171-8976-aca87c5a24bd ``` One of these should work for terminal only users.
Author
Owner

Copy of fstab now:

(redacted)

Should be fixed, haven't restarted server to check.

Copy of fstab now: (redacted) Should be fixed, haven't restarted server to check.
sickprodigy pinned this 2023-11-12 20:12:58 -05:00
Author
Owner

Have restarted and can confirm no issues anymore. Even mounted a new drive using HD ID for /srv/samba/media/games folder.

Have restarted and can confirm no issues anymore. Even mounted a new drive using HD ID for /srv/samba/media/games folder.
sickprodigy unpinned this 2023-11-23 13:43:34 -05:00
Sign in to join this conversation.