LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2017, 02:32 PM   #1
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Rep: Reputation: 0
Partitions on LINUX


Hi all,


I have added some disks

sdb, sdc, sdd, sde

>> Before Partition

PHP Code:
# cat /proc/partitions  
major minor  #blocks  name  
  
   
8     0   78643200 sda  
   8     1     104391 sda1  
   8     2   25599577 sda2  
   8     3   10241437 sda3  
   8     4          1 sda4  
   8     5    2867571 sda5  
   8     6    1534176 sda6  
   8     7   38290896 sda7  
   8    16   10485760 sdb  
   8    32   10485760 sdc  
   8    48   10485760 sdd  
   8    64   10485760 sde 
>> After partition

PHP Code:
$  cat /proc/partitions  
major minor  
#blocks  name  
  
   
8     0   78643200 sda  
   8     1     104391 sda1  
   8     2   25599577 sda2  
   8     3   10241437 sda3  
   8     4          1 sda4  
   8     5    2867571 sda5  
   8     6    1534176 sda6  
   8     7   38290896 sda7  
   8    16   10485760 sdb  
   8    17   10482381 sdb1  
   8    32   10485760 sdc  
   8    33   10482381 sdc1  
   8    48   10485760 sdd  
   8    49   10482381 sdd1  
   8    64   10485760 sde  
   8    65   10482381 sde1 
marjor and minor, iam NOT getting exactly.

1) Why major values are always 8 ?
2) Why minor values are changing ? especially 16+ ? i.e (16, 32, 48, 64)

3) Why OS displays 2 names for a single disk after partition ?

sdb sdb1,
sdc,sdc1,
sdd,sdd1,
sde,sde1

example :

8 16 10485760 sdb
8 17 10482381 sdb1
 
Old 07-31-2017, 02:51 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,143

Rep: Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048
Quote:
Originally Posted by Joy Stick View Post
Hi all,
I have added some disks sdb, sdc, sdd, sde
>> Before Partition
PHP Code:
# cat /proc/partitions  
major minor  #blocks  name  
  
   
8     0   78643200 sda  
   8     1     104391 sda1  
   8     2   25599577 sda2  
   8     3   10241437 sda3  
   8     4          1 sda4  
   8     5    2867571 sda5  
   8     6    1534176 sda6  
   8     7   38290896 sda7  
   8    16   10485760 sdb  
   8    32   10485760 sdc  
   8    48   10485760 sdd  
   8    64   10485760 sde 
>> After partition
PHP Code:
$  cat /proc/partitions  
major minor  
#blocks  name  
  
   
8     0   78643200 sda  
   8     1     104391 sda1  
   8     2   25599577 sda2  
   8     3   10241437 sda3  
   8     4          1 sda4  
   8     5    2867571 sda5  
   8     6    1534176 sda6  
   8     7   38290896 sda7  
   8    16   10485760 sdb  
   8    17   10482381 sdb1  
   8    32   10485760 sdc  
   8    33   10482381 sdc1  
   8    48   10485760 sdd  
   8    49   10482381 sdd1  
   8    64   10485760 sde  
   8    65   10482381 sde1 
marjor and minor, iam NOT getting exactly.
1) Why major values are always 8 ?
2) Why minor values are changing ? especially 16+ ? i.e (16, 32, 48, 64)
One of the first hits in Google for "what are major and minor numbers in linux" is:
http://www.tldp.org/HOWTO/Partition-...OWTO/x183.html

...which tells you what the 8 is for the major number. You can also look in /usr/src/linux/Documentation/devices.txt and find explanations for both, and this has been covered here before too. http://www.linuxquestions.org/questi...itions-677811/
Quote:
3) Why OS displays 2 names for a single disk after partition ?
sdb sdb1,
sdc,sdc1,
sdd,sdd1,
sde,sde1

example :

8 16 10485760 sdb
8 17 10482381 sdb1
Very obviously, sdb is the entire disk. sdb1 is the first partition on that disk. Very basic partitioning info, as you were asking about previously:
http://www.linuxquestions.org/questi...es-4175607240/
 
3 members found this post helpful.
Old 07-31-2017, 03:03 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,822
Blog Entries: 4

Rep: Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984Reputation: 3984
Also, may I take this opportunity to strongly suggest that you learn about "LVM = Logical Volume Management" in Linux. This will make disk management much, much easier.

LVM introduces the concept of a distinction between logical volumes ("the picture seen by the operating system"), and physical volumes ("the actual disks and partitions"). It severs the once-fundamental idea that the two were the same.

For example, a single "logical volume" (mount point ...) can be served by more-than-one "physical volume or portion thereof." You can change this mapping without even having to reboot the system. If you "run out of space somewhere" (normally a very tricky situation to walk away from ...), now it's no big deal: "just add some more, and keep right on going."
 
1 members found this post helpful.
Old 07-31-2017, 03:17 PM   #4
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Actually i added 4 raw devices , then partitioned.
Type of file shows --> b - does it mean block devices ?

PHP Code:
ls -/dev/sdb*
brw-r----- 1 root disk 816 Jul 31 03:10 /dev/sdb
brw
-r----- 1 root disk 817 Jul 31 03:17 /dev/sdb1
 
You have 
new mail in /var/spool/mail/root
 
[root@CATALOG linux_ora10gsoft]# ls -l /dev/sdc*
brw-r----- 1 root disk 832 Jul 31 03:12 /dev/sdc
brw
-r----- 1 root disk 833 Jul 31 03:17 /dev/sdc1
 
[root@CATALOG linux_ora10gsoft]# ls -l /dev/sdd*
brw-r----- 1 root disk 848 Jul 31 03:14 /dev/sdd
brw
-r----- 1 root disk 849 Jul 31 03:17 /dev/sdd1
 
[root@CATALOG linux_ora10gsoft]# ls -l /dev/sde*
brw-r----- 1 root disk 864 Jul 31 03:16 /dev/sde
brw
-r----- 1 root disk 865 Jul 31 03:17 /dev/sde1 
1) After partition why raw devices became as block devices ?
2) Why we need to bind these partitions with the raw devices ?


e.g

PHP Code:
# raw /dev/raw/raw1  /dev/sdb1
# raw /dev/raw/raw2  /dev/sdc1
# raw /dev/raw/raw3  /dev/sdd1
# raw /dev/raw/raw4  /dev/sde1 

Last edited by Joy Stick; 07-31-2017 at 03:24 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] what is a logical partitions and group partitions and how to check disk space on a partition ITareliteralyMyInitials Linux - Newbie 10 02-08-2016 11:19 AM
rebuild partitions/label from existing partitions - used parted on wrong drive zedmelon Linux - Software 4 07-26-2013 03:42 PM
Change primary partitions to logical partitions AND migrate their data? chickenlinux Linux - Hardware 10 04-04-2010 04:31 PM
windows killed my partitions! no linux partitions found on this computer. The MJ Linux - Software 10 01-05-2007 08:31 AM
Question on creating more partitions than default ones, i.e. /home,/root partitions casmac SUSE / openSUSE 1 12-20-2006 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration