Problem configuring a new 1TB drive on Ubuntu 20.04.3 using fstab

Bo Berglund bo.berglund at gmail.com
Tue Jan 4 07:21:15 UTC 2022


On Mon, 3 Jan 2022 23:27:31 +0000, Colin Watson <cjwatson at ubuntu.com> wrote:

>On Tue, Jan 04, 2022 at 12:06:33AM +0100, Bo Berglund wrote:
>> Now I unmount the drive and edit /etc/fstab so it contains this:
>> 
>> #Below is the 1TB drive sdb partition data
>> #PARTUUID=5ac54f4c-0819-4595-b457-f7d144df8076 /mnt/data   ext4  0 0
>> #UUID=b8dae32b-cb17-41f7-8e56-e3a5e49c1992 /mnt/data   ext4  0 0
>
>These lines don't seem to contain enough fields.  I would expect to see
>something like "... /mnt/data ext4 defaults 0 0" (i.e. you're missing an
>options field after the filesystem type).

Thanks,
I had been looking at other lines in fstab and these did not have a defaults
item, but once I added it the sudo mount -a works.
So this is what I have now:

PARTUUID=5ac54f4c-0819-4595-b457-f7d144df8076 /mnt/data ext4 defaults  0 0

And the listing of the mount point:
/mnt/data$ ll
total 24
drwxr-xr-x 3 root root  4096 2022-01-04 08:13 .
drwxr-xr-x 4 root root  4096 2022-01-03 23:26 ..
drwx------ 2 root root 16384 2022-01-03 21:48 lost+found

Follow-up questions:
1) What is this dir lost+found used for and is it neccessary?

2) In order to write files to this new disk I must use sudo, how can I allow a
regular user (me) to also create files and dirs here?
Do I have to sudo create a directory first and chmod it to 777?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list