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.
You can do it, but since there is no unallocated space you will have to shrink the cl/home LV and filesystem to make space. Note that keeping a backup on the same disk does not give any protection against disk failure or damage to the partitioning or LVM structure. I presume you have some other goal for that backup.
You cannot shrink a filesystem while it is mounted, and an XFS filesystem cannot be shrunk at all. For non-XFS filesystems, you will need to boot single user, unmount /home, and then resize the LV and filesystem. (All of the following commands need to be run as root.)
[zillur@localhost ~]$ sudo pvscan
PV /dev/sdb3 VG cl00 lvm2 [109.79 GiB / 0 free]
Total: 1 [109.79 GiB] / in use: 1 [109.79 GiB] / in no VG: 0 [0 ]
[zillur@localhost ~]$ sudo lvscan
ACTIVE '/dev/cl00/swap' [4.00 GiB] inherit
ACTIVE '/dev/cl00/home' [55.79 GiB] inherit
ACTIVE '/dev/cl00/root' [50.00 GiB] inherit
[zillur@localhost ~]$ sudo vgscan
Reading volume groups from cache.
Found volume group "cl00" using metadata type lvm2
Do you guys think its a good idea? I don't have any volume group or logical volume for /dev/sda1 and /dev/sdg1. Can I run a system like this where users will login and then work in /gondor and /mordor ?? Need your suggestions.
[zillur@localhost ~]$ sudo pvscan
PV /dev/sdb3 VG cl00 lvm2 [109.79 GiB / 0 free]
Total: 1 [109.79 GiB] / in use: 1 [109.79 GiB] / in no VG: 0 [0 ]
[zillur@localhost ~]$ sudo lvscan
ACTIVE '/dev/cl00/swap' [4.00 GiB] inherit
ACTIVE '/dev/cl00/home' [55.79 GiB] inherit
ACTIVE '/dev/cl00/root' [50.00 GiB] inherit
[zillur@localhost ~]$ sudo vgscan
Reading volume groups from cache.
Found volume group "cl00" using metadata type lvm2
Do you guys think its a good idea? I don't have any volume group or logical volume for /dev/sda1 and /dev/sdg1. Can I run a system like this where users will login and then work in /gondor and /mordor ?? Need your suggestions.
Best Regards
Zillur
I do not know much of anything about LVM but I do suppose it cannot be much different when it comes to setting it up to be used in Linux via the fstab and mount methodology.
where mount and bind commands are put to use. therefore if you want someone to log in and work or have their home directory be on a different volume. I do not see why one could not just used mount then bind to set that particular person in a different volume then the others are in whenever they log in. While it will look like he is on the same volume it is not so. Due to binding his /home/user to a different volume /directory to his entire /home/user area.
Thank you very much for a quick reply. I also don't know anything on partitioning or LVM. In my current system, I want users will login normally and cd to /gondor or /mordor to use /dev/sdg1 or /dev/sda1. Is it possible without changing anything? Do you think "chown user /mordor" will be sufficient?
Thank you very much for a quick reply. I also don't know anything on partitioning or LVM. In my current system, I want users will login normally and cd to /gondor or /mordor to use /dev/sdg1 or /dev/sda1. Is it possible without changing anything? Do you think "chown user /mordor" will be sufficient?
Best Regards
Zillur
where /gondor or /mordor I take it are just directories where you want others to work in. then all they have to do is cd into it. and yes just change its permissions.
you can keep control of it while giving certain permissions to others as well to either read, or read write, or read, write and execute within any directory.
Your line of thought is correct in thinking that chown will work. Their is also many other ways to get this done.
Keeping in mind this is a root user permissions that can only do this with others stuff. and a user permissions that can do this with one own "stuff".
as you see it can be broken into parts to set permission onto an item in any fashion one wants as long as it stays within the limits given that allows this to be done.
You can still allow root to own the directory so no one else can delete it. then do this in any fastion you wish.
User gets read, write, and execute,Group gets read only, Other gets nothing, the minus '-' removes permissions. the equal '=' adds permissions.
Making sure that the users that you want to use that directory are assigned to the group.
Code:
usermod -aG users UserName
u = User (owner)
g = Group
o = Others or anyone else that can get inside of a directory, but when the other has all permissions removed then what takes place?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.