How to create 5 primary partitinos (more than 4 as a matter of fact )
How to create more than four primary partitions in order to create the following file systems in their own respective partitions; /, /boot, /usr, /var, /tmp, /tmp and /opt and /home.
Does LVM allow it? Or is it only possible in non-pc system? Thanks.. |
Can't be done
This is why the extended partition and logical partitions exist. |
Thanks.
I know that but want to know how did they install unix in the system where every file system had got its own partition. |
Quote:
Quote:
|
Quote:
Now did you really want the answer? |
Quote:
1st primary partition of ext3/4: /boot (512MB should be good enough for /boot) 2nd primary partition of LVM: this will hold the other partitions separately First create 2 primary partitions using fdisk or parted. Then Code:
mkfs.ext4 /dev/sda1 Code:
pvcreate /dev/sda2 |
LVM is possible, but "logical partitions" can also be used for what vectrum wants. You don't need a partition to be a primary one to use a different filesystem on it.
|
You can fiddle around and make more than four primaries but... why? Three primaries and some number of logical partitions accomplishes what you want to do without the need to fiddle and twiddle when you get around to updating or reinstalling or whatever may come up. Maybe the only thing you have to worry about is how much the drive heads are flying around to read or write although that's more or less moot nowadays.
I use nine partitions: /root, /swap, /home /usr/local, /opt, /var/lib/mysql, /var/lib/virtual, /spares and /var/lib/psql. I do it so that I do not have to back off large-scale data bases (in /var/lib/mysql and /var/lib/psql), virtual machines (in /var/lib/virtual -- do not want to have to reinstall Windows!), additional applications (/opt), additional utilities, all my user's stuff (/home) and other software (/usr/local) when I upgrade to a new release of Slackware (all you do is not format the partitions you want to "save" when assigning the partition names to fstab during installation -- gives me a "clean" install rather than going through all the trouble of upgrading). I've never needed a /boot partition for anything I know of (it's in /root, why fiddle?), I don't do /usr because that's were all the system libraries live and, well, that works for me. You can, of course, add additional drives (just make sure they get mounted at the right time so the the thing'll boot, eh?). I have kept the data bases on separate drives but anymore I just let 'em live in their own logical partitions and life (so far) is good. Everything works if you let it. Hope this helps some. |
Thank you very much for the suggestions. One thing I should have mentioned that when I referred to a primary
partition, I actually wanted to mean physical partition because if I was able to set up aforementioned file systems in separate physical partitions then, in case of any particular file system damage, other file systems wouldn't be affected as this is not the case in logical partitions where a corrupt logical partition will destroy other logical partitions. wildwizard told me 'Now did you really want the answer?' Yes, Your link has reminded me of setting up solaris and freebsd sys(many slices inside a partition). Thanks for providing the empirical knowledge. LVM solution is really nice. Master's solution without any gripe. :) Thanks. tronayne: Here is my scenario. Why I have had to fiddle with boot partition. I have got two hdds, sda and sdb. I installed win, solaris and linux 100mb boot partitions in three primary partitions in sda(sda1, sda2, and sd3) and installed freebsd, slack and linux swap in three primary partitions, sdb1, sdb2 and sdb3. My boot manager is lilo (I could have used soalaris' grub)and it couldn't boot if I place boot in sdb so I have had to keep /boot in sda. I don't know whether that was possible to make solaris, freebsd boot from logical partitions. My entire partition scheme was faulty I suppose but I can't make it from scratch due to the admin level hitch. You have created nine partitions! How did you do it? Are all these primary partitions? Are all in a single hdd? Thanks again. |
Quote:
To clarify that: Due to limitations of the old MS-DOS style partition table you can not create more than 4 primary partitions when using this style (when using GPT instead you can create many more). One of these primary partitions can be an extended partition. Extended partitions are nothing more than a way to overcome the partition tables limitation with creating a container for more physical partitions, called logical partitions. There are only two things that are different for a logical partition compared to a primary partition: 1. They have to be in an extended partition. 2. There data (read: start-sector, end-sector, ID, ..) is not stored in the partition table in the MBR. Nonetheless, they are physical partition, a corrupted logical partition has the same chance of corrupting other partitions as a primary partition. |
Thank you. I need a time out as I discard the concept about logical partition. It might be possible that I came to know from a dos community when I learnt to install dos. I hadn't got any chance to install *nix.
Can I boot linux from a logical partition? |
Without any problem.
|
Quote:
Quote:
Quote:
Well, I don't have multiple Linux distributions, just Slackware (hmm. "just?" Well, go with the best, methinks). I do have two virtual machines, XP and Win7, and those are in the partition mounted to /var/lib/virtual. Right now, in this box, there is only one drive -- the other box has two (both 500G). There are only three primary partitions -- as explained above by TobiSGD, you can only have four primaries (and no logical) or three primaries plus X number of logical. I use the cfdisk utility to set up disk drives (it uses ncurses to display all the drive information and permit easy editing). cfdisk is on the Slackware installation CD-ROM/DVD and you use it to partition your drive before you execute setup to install Slackware. The display looks like this: Code:
cfdisk (util-linux 2.19) Code:
su - The primary-logical thing is a hangover from olden days and Miserydos, partition tables and MBRs and who knows what all. Keep in mind that your partitions, whether they're called primary or logical start and end at specific addresses on the drive and have a specific size. You don't really care what the addresses are (that's taken care of by the controller and system software) and utilities such as df and du will tell you how much storage space you've got available and how much you've used. And when you run out of space in a given partition, well, then you'll find out that it really is physical space and holy toot, what do I do now. Hope this helps some. |
If you use either EFI or UEFI instead of BIOS then you are not limited to just four primary partitions. The upper limit is not a fixed number, but is typically more than 128 partitions.
|
There are reasons to have separated file system areas. Some of those reasons go away, when we're talking about a system without multiple physical drives, and without NFS mounts.
|
Thanks tronayne.
I've got the under-the-hood stuff of partitioning and gradually drove away the misconception I had had about logical partition as I considered that was a very dangerous and error prone area. I tried to use cfdisk long ago but had to change to fdisk, perhaps due to any difficulty I might have faced then but now I will try it. Can't remember why I couldn't use cfdisk then. "The primary-logical thing is a hangover from olden days and Miserydos, partition tables and MBRs and who knows what all." Yes, very true as told by Frisch and Nemeth. AIX doesn't support at all. But Solaris still does... God know why Albeit thank you very much. |
the_gripmaster sent me the following link on LVM so I think this can be of great help to anyone who is in need of it.
http://www.tuxradar.com/content/lvm-made-easy The article also begins with a nice allegory; Quote:
|
Since this is a slackware forum, and we're talking about /boot (whether needed or not), LVM, and the potential for multiple partitions you can move about and plop down during upgrades or on top of fresh installs, this was written to address such issues directly: http://northtech.us/content/20120213...lvm-partitions
I hope that helps :) Kindest regards, . |
Quote:
As I remember you could just tab around and hit enter. ew.... I must be one of those cronies that uses regular fdisk. :doh: . |
Oh, yeah, [n]curses, tab, type, hit the carriage return, runs the same on anything with termcap/terminfo, never take your hands off the keyboard, no reaching for a mouse (or those gawd-awful finger pad things!). I still use it for production data entry, users love it.
|
All times are GMT -5. The time now is 04:26 PM. |