Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I set up a partition/ext4 of a nvme. Even though it shows as mounted, i dont think its actually mounted. I have
Code:
sudo mount /dev/nvme1n1p1 /mnt/data
] and i check
Code:
lsblk -f
and it shows as mounted. Whatever files i write to in /mnt/data it remains whether or not the m.2 is mounted or not.
Use df or df -h to see what's mounted where, and space consumed and used. You should there be able to notice changes when you add or remove files.
For an internal device, such as nvme, it's usually best to mount via an fstab entry. If you don't wish it mounted always, use a noauto option in the fstab entry. Mounting and unmounting can then be done with a simpler command, and with greater reliability.
Quote:
I also tired to change permissions to the partition with
, but it doesnt work. i still have to sudo my cmds.
Changing permissions one does to directories or regular files, not device files. So, you would apply the command to /mnt/data/, not /dev/disk/by-uuid/yada...
The above code is an example of the entry you could put in /etc/fstab, as already mentioned, you can add "noauto" to the options highlighted in blue so it is not auto-mounted upon bootup.
To mount manually with user read/write access, mount with the same options as in the example below. This assumes your user UID and GID are 1000 which is the typical ID values for first user created:
Code:
sudo mount -o defaults,uid=1000,gid=1000,umask=022 /dev/nvme1n1p1 /mnt/data
FYI:
uid, gid and umask mount options only apply to filesystems that do not support native linux permissions like FAT and NTFS. They are not valid options for ext filesystems.
What mrmazda is trying to explain (I believe) is that permissions apply to the filesystem not the mount point.
FYI:
uid, gid and umask mount options only apply to filesystems that do not support native linux permissions like FAT and NTFS. They are not valid options for ext filesystems.
Good, didn't know that, TX.
EDIT: I do remember fighting with this in the past also, gave up and just expanded the / filesystem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.