Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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'm busy trying to get to grips with LVM. So far I'm thinking that I'll give 8Gb across to / (*not* LVM), and manage /opt, /home & /var in LVM as they're the ones which could possibly grow out of control.
How can I mount them all on the same physical partition so that I don't have to manage each one's partitions in LVM seperately? ie. Can they share the same partition?
So far I'm thinking that I'll give 8Gb across to / (*not* LVM), and manage /opt, /home & /var in LVM as they're the ones which could possibly grow out of control.
If you're going for LVM, I'd say go all the way. Leave /boot and / (root) as seperate physical partitions, and swap as well, but then put everything else on LVM. /usr, /var, /opt, /home, /tmp, /usr/local, etc. I'm setup this way and currently I'm only using 18Mb on /boot and 142Mb on /. Yes, Mb, not Gb. Many systems find the majority of their data stored under /usr or /home. Webserver machines or database machines may need large /var or /opt. It all depends on how things get set up.
If I ignore all the other dual booting and specialized stuff on my systems, I could easily get by with four physical partitions on my harddisk. One for /boot (about 30Mb), one for / (about 250Mb), one for swap (about 500Mb), and one for an LVM physical volume (PV) which takes up the remainder of the disk. That PV is then added to an volume group (VG) and then that VG is carved up into logical volumes (LVs). /usr gets it's own LV, /opt it's own LV, /home it's own LV, etc.
Quote:
How can I mount them all on the same physical partition so that I don't have to manage each one's partitions in LVM seperately? ie. Can they share the same partition?
I'm not 100% sure what you're asking here, but maybe what I said above answered it???
You can't. You need to have 3 Logical partitions, one for /var, another to /opt and the last for /home. There is no way to have one single logical partition with /var /opt and /home.
In another hand, you may try to use a trick with symbolic links.
Let say you have just one single logical partition, with /opt, /home and /var. You may mount this one at, eg, /mnt/extra or whatever. Then you remove the mount points /var /home and /opt, and create symbolic links from /var to /mnt/extra/var, /opt -> /mnt/extra/opt and /home -> /mnt/extra/home.
But this does not make any sense for me.
And there is a chance some dumb (or smart ?!?!) program will complain about one of theses are not a real partition. There is sided effects to. For instance, in the hipotetic scenario above:
Code:
$ cd /home/john
$ pwd
/mnt/extra/home/john
Separate partitions are good. And since they are logical volumes, you can expand/shrink as needed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.