Help needed to understand partitions in linux


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help needed to understand partitions in linux
# 1  
Old 04-23-2010
Help needed to understand partitions in linux

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 Code:
 [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.
# 2  
Old 04-23-2010
Quote:
Originally Posted by pinga123
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 Code:
 [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.
tempfs is a temp file system in memory - more like a ram disk (not to be confused with swap space)

hda - normal IDE disks
sda are disks using SCSI emulation built into the kernel
you can partition (and hence number the partitions) differently during the install phase - all depends on how you partitioned your disk
# 3  
Old 04-23-2010
Does this means if i have 2 gb as my physical memory space and if i allocate tmpfs 1 gb then i can only use 1 gb of my physical memory?
Where would i need tmpfs(Practical usage of it)?
# 4  
Old 04-23-2010
Quote:
Originally Posted by pinga123
Does this means if i have 2 gb as my physical memory space and if i allocate tmpfs 1 gb then i can only use 1 gb of my physical memory?
Instead of allocating a fixed amount of memory for exclusive use as a file system, tmpfs file system
is dynamic depending on use, allowing the system to decide the optimal use of memory

physical memory gets reduced and then your into the realms of swapping / swap space etc

Last edited by Celtic_Monkey; 04-23-2010 at 08:16 AM..
# 5  
Old 04-23-2010
Quote:
Originally Posted by Celtic_Monkey
Instead of allocating a fixed amount of memory for exclusive use as a file system, tmpfs file system
is dynamic depending on use, allowing the system to decide the optimal use of memory
Does this mean i can use it dynamically whenever required and all the data in tmpfs get flushed incase i restart the system?
# 6  
Old 04-23-2010
correct
# 7  
Old 04-23-2010
Regarding the last question, LVM is a method for managing disks where you can assign physical volumes to volume groups (a group of physical disks) and then split the volume group into partitions as if it were a single disk, each division is called a logical volume.

You can easily resize a LV on the fly (e.g. if you run out of space), attach more disks to the VG, create new partitions, etc.

To the eyes of the kernel there is no difference between a regular partition and a Logical Volume

Quote:
VM is a method of allocating hard drive space into logical volumes that can be easily resized instead of partitions.

With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. A physical volume cannot span over more than one drive.

The physical volumes are combined into logical volume groups, with the exception of the /boot/ partition. The /boot/ partition cannot be on a logical volume group because the boot loader cannot read it. If the root (/) partition is on a logical volume, create a separate /boot/ partition which is not a part of a volume group.

Since a physical volume cannot span over multiple drives, to span over more than one drive, create one or more physical volumes per drive.

Linux LVM


Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to check used space for each partitions in Linux?

we are using Disk utilization and filesystem utilization seperately. In AIX using $lsvg rootvg datavg $lspv hdisk1 PHYSICAL VOLUME: hdisk1 VOLUME GROUP: datavg PV IDENTIFIER: 00f65eab7acabb17 VG IDENTIFIER 00f65eab00004c00000001567b60a848 PV STATE: ... (3 Replies)
Discussion started by: freeaac
3 Replies

2. Linux

Linux partitions and limitations

In recently reading an article on linux basics before I embark and my personal installation project I came across this passage - IDE drives have three types of partition: primary, logical, and extended. The partition table is located in the master boot record (MBR) of a disk. The MBR is the... (12 Replies)
Discussion started by: Synchlavier
12 Replies

3. UNIX for Dummies Questions & Answers

LINUX to UNIX... changes needed?

I developed the following in LINUX: cat monica.txt | sed 's/;;;/\n;;;/g'> fixed.txt csplit -f comment -n 4 fixed.txt '/;;;/' {*} Basically, I want it to take the file monica.txt and put every instance of ;;; on a new line and put it in fixed.txt, then split fixed.txt at every instance of ;;;... (13 Replies)
Discussion started by: mschpers
13 Replies

4. UNIX for Dummies Questions & Answers

Linux Tutorial Needed

Hi guys , I m new to linux and would like to buy some quality video tutorials . Request you to guide me any good source for programming(C,Java,VB) or linux tutorials. Tutorials should be known and good like lynda.com (5 Replies)
Discussion started by: pinga123
5 Replies

5. Linux

What is the minimum number of partitions you need to install Linux?

I think its 3. Just to know if I am correct. / /boot swap :confused: (2 Replies)
Discussion started by: nitin09
2 Replies

6. Shell Programming and Scripting

help needed to understand the process entry in ps -ef

Hi Guys, I am running a script which will refresh the views in my database. After running the script, when i ran ps -ef | grep "script_name" I found there are two entries for the same script process (actually 3 including the grep process). /bin/ksh path/scriptname sh -c... (4 Replies)
Discussion started by: mac4rfree
4 Replies

7. Linux

grub error 22,after removing linux partitions only windows is threre.Pc not booting.i

hi, in my pc linux and windows was there with 2 hdd in raid.i removed linux partititons.Now my ps is not booting giving grub error 22.Nothing works.I hace my data in windows.Hard disks are RAID.when tried to go to recovery mode from windoes boot cd,it says hard disk not detected.when tried with... (2 Replies)
Discussion started by: pankajd
2 Replies

8. Gentoo

I want to learn & understand all abt LINUX

Salute 2 All. I am totally unknown in LINUX glaxy. There is any one whu can let me know abt LINUX. There is any one whu have a few time to help me for teaching LINUX I want to learn & understand all abt LINUX (5 Replies)
Discussion started by: AhsanPrince
5 Replies

9. Linux

File Sharing among NTFS Partition & RH Linux 9 Partitions

Well Guys, will anybody solve my problem? I have installed Win XP and RH Linux 9 (Dual Boot) on an Intel x86 Machine. Everything is going fine except that I cannot share files among the two operating systems. For example, if I download a PDF file from internet and save it in my Win XP partition... (1 Reply)
Discussion started by: Jawwad
1 Replies
Login or Register to Ask a Question