Linux Help needed to understand partitions in linux

Compiler

Disciple
Hi guys,

It has been more than 2 month i switched to linux but i m still very much confused how linux handles and names the partitions.

I have gone through couple of beginners material and found linux doesnt treat partitions as c: and d: instead it uses /dev/hda1 /dev/hda2 hda3 .But now i have come across something like dev/sda1 dev/sda5 tmpfs

Please find output of df -h

PHP:
[root@test ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             3.9G  867M  2.9G  24% /
/dev/sda1              99M   45M   49M  48% /boot
tmpfs                 285M     0  285M   0% /dev/shm
/dev/sda5             1.1T  561G  544G  51% /var/ovs/mount/F179080BDBFD4C5596D03242EFE5179C
I have few questions regarding the same.
1)Why there is no sda2 sda 4 present?
2)What is tmpfs ?
3)What is the difference between sda and hda
4)I also heard there is something as LVM.(How do i know whether my drives are LVM supported or not?
If they are supported how do i extend the drives.

I know these are pretty basic for advance user but i m still a learner in linux . Please help.

View Original: Help needed to understand partitions in linux - The UNIX and Linux Forums
 
From my earlier post in similar thread

In windows, there are C drive.D Drive and so on

In Linux we have SDxy naming scheme

where,

x = number of hardrive in your system(a-z). if you have only one hdd, linux will name it as sda. second drive will be sdb and so on...

y = Number of pertion(1,2,3,4,5) and so on... so you have four partitions. you see your drivers

sda1

sda2

sda3

sda4

And forget about HDA naming scheme, its no longer used.officially retired.

How to Partition - Ubuntu Wiki

pinga123 said:
I have few questions regarding the same.

1)Why there is no sda2 sda 4 present?

1) sda2 or sda4 might not be mounted. always use fdisk -l to list all partition. On my system it lists all in order. alternatively you can GUI partition manager like Gparted

4)I also heard there is something as LVM.(How do i know whether my drives are LVM supported or not?

If they are supported how do i extend the drives.

LVM is just another method of partitioning of your harddrive, bit more flexible than msdos type partition table which we use mostly commonly. mostly its used together with RAID. [1][2]
 
Let me be a little more clear on the stuff.

/dev - Is basically naming of any device that is externally or internally attached to the system.

/dev/hda - Here hda is generally refers for IDE disks, now its sort of complex in IDE/PATA drives case. A IDE drive can hold 2 IDE devices (HDD, and Optical Drives), so if you have 2 drives , one is master and slave then in this scenario hda is master and hdb is the salve.

The above formula doesn't work in case of SCSI drives since there is no master and slave thingy. Since sata class is yet to be defined thus it falls under SCSI drives and similarly Linux do the naming reminiscent of SCSI naming that what has been coded.

/dev/sda means the first Sata/SCSI drive that is attached to the computer the more the letter the more the drivers.

/dev/sda1 - The number infront of sda refers to the partitions of that particular drives, the more the partition the more the number. Generally /dev/sda5 is the first logical partition on the disk ;)

That should do. Let me know if you need more help on it :)
 
Back
Top