Visit Our UNIX and Linux User Community


Partitions.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Partitions.
# 1  
Old 03-10-2011
Partitions.

Hi All,

My colleague says . On some boxes we have /var/,/opt are inside root and on some they are not on root they are separately. So please any one explain me what actually the difference is.

Thanks is Advance.
# 2  
Old 03-10-2011
In Windows, each drive letter is its own seperate little world. c:\ gets you files under partition 1, d:\ gets you files under partition 2, etc.

In UNIX, all files and partitions are accessed through the same directory tree. The root partition is attached first, at /, and other partitions can be optionally attached to any directories inside /, even ones inside other partitions.

On one of my systems:
Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc3            1008M  298M  660M  32% /
udev                   10M  340K  9.7M   4% /dev
/dev/sdc5              20G   12G  7.2G  62% /home
/dev/sdc6             9.9G  4.6G  4.9G  49% /usr
/dev/sdc7             5.6G  735M  4.6G  14% /var
/dev/sdc8             116G  5.0G  111G   5% /var/lib/mysql
shm                   948M     0  948M   0% /dev/shm
/dev/md1p8            394G  301G   74G  81% /opt
/dev/md1p9            1.4T  848G  552G  61% /opt/disk-images
/dev/sdc1              63M   28M   32M  47% /boot

So the root directory exists on the partition /dev/sdc3. If you created a file /randomname, it'd go into sdc3.

"udev" and "shm" are special filesystems handled by the kernel, you can ignore them for the moment.

Anything under /home/ goes into sdc5, so all user directories reside on that partition.

Our mysql database used to reside inside under the /var/ partition, in /var/lib/mysql, but it outgrew it. I had to give /var/lib/mysql its own partition so mysql would have more room.

And so on, and so forth.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 03-10-2011
Hi Crona688,

Thanks for your reply.

As per what you said on one of your systems.
On one of my systems:
Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc3            1008M  298M  660M  32% /
udev                   10M  340K  9.7M   4% /dev
/dev/sdc5              20G   12G  7.2G  62% /home
/dev/sdc6             9.9G  4.6G  4.9G  49% /usr
/dev/sdc7             5.6G  735M  4.6G  14% /var
/dev/sdc8             116G  5.0G  111G   5% /var/lib/mysql
shm                   948M     0  948M   0% /dev/shm
/dev/md1p8            394G  301G   74G  81% /opt
/dev/md1p9            1.4T  848G  552G  61% /opt/disk-images
/dev/sdc1              63M   28M   32M  47% /boot

You have the above mentioned partitions but as per my knowledge we can just have seven slices in a disk .If that's the case how can we accommodate all the above mount points.

Last edited by Scott; 03-10-2011 at 07:41 PM.. Reason: Please use code tags.
# 4  
Old 03-10-2011
Quote:
Originally Posted by rama krishna
You have the above mentioned partitions but as per my knowledge we can just have seven slices in a disk.
Maybe that's true for SPARC based systems, I don't know. Mine is a PC system with an old-fashioned MS-DOS boot sector. That only supports 4 partitions, but any of those can be an "extended" partition that holds other partitions. Like so:
Code:
If that's the case how can we accommodate all the above mount points.[/QUOTE]$ fdisk -l /dev/sdc

Disk /dev/sdc: 163.9 GB, 163928604672 bytes
16 heads, 63 sectors/track, 317632 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x73ee210d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         131       65992+  83  Linux
/dev/sdc2             132        1172      524664   82  Linux swap / Solaris
/dev/sdc3            1173        3254     1049328   83  Linux
/dev/sdc4            3255      317632   158446512    5  Extended
/dev/sdc5            3255       44865    20971912+  83  Linux
/dev/sdc6           44866       65671    10486192+  83  Linux
/dev/sdc7           65672       77504     5963800+  83  Linux
/dev/sdc8           77505      317632   121024480+  83  Linux

$

Partitions 1 through 3 are regular partitions. Partition 4, the very last partition I'd be able to fit in the table, is an "extended" partition which holds other partitions: sdc5, sdc6, sdc7, and sdc8 actually reside inside it.

This is architecture-specific and OS-specific, don't try fdisk on a solaris system -- it's either absent or something completely different.

What isn't OS and PC specific is what you can do with the partitions once they've been made: Attach them wherever you want in your file tree.

Last edited by Corona688; 03-10-2011 at 06:36 PM..
 

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Partitions necessary in RHEL 6

I had a query as to what are the partitions that should be necessary in RHEL 6. My knowledge says that 1) / 2) /home 3) Swap 4) /boot should be sufficient. But, I am seeing in my production environment which is RHEL 5 that there are partitions also for 1) /var 2) /tmp... (8 Replies)
Discussion started by: RHCE
8 Replies

2. Solaris

Create new partitions

Hello, Can someone tell me why should i do to resolve this problem? I cant creat the news partitions!! # /etc/init.d/volmgt start volume management starting. # format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0d0 <DEFAULT cyl 1955 alt 2 hd 255 sec 63> ... (5 Replies)
Discussion started by: herbich1985
5 Replies

3. UNIX for Advanced & Expert Users

Partitions

Hello masters, Actually, i am user of Ubuntu, but I want to use Debian too. I have a computer with a product key for w7 so i will use too, only for games... The structure I have thought is the next with 1TiB of capacity. Primary: 50 GB NTFS for W7 Extended: Logical: 20 GB FAT32... (3 Replies)
Discussion started by: albertogarcia
3 Replies

4. Solaris

Problems with partitions

Hi. I newbie in solaris. I have server T2000 with 2 disk on raid. I have partitions: Part Tag Flag Cylinders Size Blocks 0 root wm 825 - 3916 15.00GB (3092/0/0) 31464192 1 swap wu 0 - 824 4.00GB ... (6 Replies)
Discussion started by: burdock
6 Replies

5. AIX

Logical Partitions?

I'm trying to find out how many logical partitions our AIX box has. I'm running the command: topas -C and nothing is showing up. Is it safe to say that there is only one LPAR, which is what AIX is installed on? Move to AIX - jim mc (2 Replies)
Discussion started by: NycUnxer
2 Replies

6. UNIX for Dummies Questions & Answers

unix partitions

how to access/sliceing different partions using divvy (1 Reply)
Discussion started by: sobin
1 Replies

7. UNIX for Dummies Questions & Answers

Monitoring partitions

Sun Solarus 8. I have a partition that due to some automated processes can fill a partition to 100% before the weekly backup and cleanup process happens. Is there a way I can monitor a partition and send a page or email if the partition gets above 85% full? (2 Replies)
Discussion started by: PrimeRibAndADew
2 Replies

8. Shell Programming and Scripting

Monitoring partitions

I have a partition that sometimes grows to 100% before the weekly backup and perge can happen. Can someone leade me to a script that will monitor the size of a partition and send me an email when it is over a certain percent? Unix Solarus 8. Thanks (1 Reply)
Discussion started by: PrimeRibAndADew
1 Replies

9. UNIX for Advanced & Expert Users

partitions

HI. i installed solaris on a x86 machine and i only partition for 4 gig when it suppose to be 8. i only using 4 gig right now how can i start using the other four. please help, thanks in advance Meeh (2 Replies)
Discussion started by: souldier
2 Replies

10. Filesystems, Disks and Memory

raw partitions

i want to know, how do i to create a rwa partttions in unixware 7 wit raid 5 best regards felix arteaga (1 Reply)
Discussion started by: farteaga
1 Replies

Featured Tech Videos