LinuxQuestions.org
Review your favorite Linux distribution.
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 08-02-2017, 01:40 PM   #16
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0

@ suicidaleggroll

Pls help me to understand clearly.


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
   8    80   20971520 sdf 
I do NOT understand values such as (16,17) , (32,33) , (48,49), and (64-65)

1) Why those values are displayed here ? What is the logic behind ?
2) Values are gradually increasing 16+ why so ?

Last edited by Joy Stick; 08-02-2017 at 01:42 PM.
 
Old 08-02-2017, 01:45 PM   #17
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
This question has been answered. You can find more information by doing a simple internet search.

http://www.linuxquestions.org/questi...itions-677811/

http://letmegooglethat.com/?q=linux+...on+minor+major

Last edited by szboardstretcher; 08-02-2017 at 01:46 PM.
 
Old 08-02-2017, 01:47 PM   #18
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi suicidaleggroll

Quote:
I think you need to back up and tell us what it is you're trying to accomplish here though. With a more focused discussion we'd be able to provide much more applicable and accurate advice.
Basically I am an Oracle DBA.
Somewhat i need good knowledge on LINUX also.

To provide ASM disk, i need to understand differences between Block devices Vs Raw devices.

1) How ASM treats Block Devices and Raw devices to provide ASM disks ?

ASM - Automatic Storage Management from Oracle.

Simply Difference between raw device and a block device in ASM.


One
 
Old 08-02-2017, 01:49 PM   #19
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi

You can find more information by doing a simple internet search. - Yes i am doing.


http://www.linuxquestions.org/questi...itions-677811/

http://letmegooglethat.com/?q=linux+...on+minor+major

Already i gone through following link. But NOT able to understand it.

If possible please expalin in layman language then it is easy to capture.

Last edited by Joy Stick; 08-02-2017 at 01:51 PM.
 
Old 08-02-2017, 01:55 PM   #20
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138
We're not going to sit down and explain in layman's terms the entirety of how Linux handles storage devices to you. You need to do this research on your own. If you end up with a couple of specific questions, you can ask them here, but not everything under the sun. I said to run "fdisk -l /dev/sda", not "cat /proc/partitions". The major/minor numbers for block devices has nothing to do with anything else you've asked in this thread.

Last edited by suicidaleggroll; 08-02-2017 at 01:58 PM.
 
1 members found this post helpful.
Old 08-02-2017, 01:55 PM   #21
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
What specifically do you NOT understand about the explanation?

Quote:
You can see that the disks are numbered with major 8, which is the number for scsi drives (SATA disks are seen as SCSI drives) as said on the header of that section (8 block SCSI disk devices). There are several numbers for IDE drives, grep that file to see them. Minor numbers are as specified. The whole device is numbered as 0, 16, 32.. (n-1)*16. The partitions are numbered with the minor number for the drive + the number of partition. Thus, if sdb is 16, sdb1 is 17. Note that it's the partition number which counts, and not the order. For example, if sdc is 32, sdc3 is 35, and sdc5 is 37 even if sdc4 doesn't exist.
I'm not sure there is a non-technical way to describe this technical information.
 
Old 08-02-2017, 02:59 PM   #22
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,547

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
Quote:
Originally Posted by suicidaleggroll View Post
On MBR:
One extended, it has to be one of the four primary partitions, and serves as a container for logical partitions.
Actually, Linux is happy with more than one extended partition. DOS/Windows is not, and that is the reason partition type 0x85 "Linux extended" was defined so that a second extended partition can exist for Linux without confusing DOS/Windows.

There are a few other partition types that contain subpartitions (e.g., 0xa5 "FreeBSD partition"), and those behave much like extended partitions in Linux.
 
1 members found this post helpful.
Old 08-02-2017, 03:38 PM   #23
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
Quote:
On MBR:
One extended, it has to be one of the four primary partitions, and serves as a container for logical partitions.
I'm not aware of any limit on the number of logical partitions.
This is a common misconception. Extended partitions (or extended boot records) are actually chained internally and contain one logical partition and a pointer to the next extended partition if it exists. The first extended partition must be one of the four primary partitions and is the only one given a device node in Linux such as /dev/sdb4.

If you have an MBR disk with 2 or more logical partitions this can be shown with sudo sfdisk --show-extended /dev/sdX

If someone reading this has an MBR disk with 3 or more logical partitions please run the above command and post the results in a code block.

The following is a listing of my only remaining MBR disk with two extended partitions each containing a logical partition which can contain data. The first extended is labelled /dev/sd4. The second is hidden. They are both underlined for clarity.

The two logical partitions /are /dev/sdc5 and /dev/sdc6. Two of the four entries in each extended boot record are always empty.

Code:
sudo sfdisk --show-extended /dev/sdc

Disk /dev/sdc: 77825 cylinders, 255 heads, 63 sectors/track
Old situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0+     12      13-    104391   83  Linux
/dev/sdc2         13    1970    1958   15727635   83  Linux
/dev/sdc3       2493   55042   52550  422107875   83  Linux
/dev/sdc4      55043   77824   22782  182996415    5  Extended

/dev/sdc5      55043+  61544-   6502-  52224000   83  Linux
    -          61545   62067-    523-   4194667+   5  Extended
    -          55043   55042       0          0    0  Empty
    -          55043   55042       0          0    0  Empty

/dev/sdc6      61545+  62067-    523-   4194304   83  Linux
    -          61545   61544       0          0    0  Empty
    -          61545   61544       0          0    0  Empty
    -          61545   61544       0          0    0  Empty
 
Old 08-03-2017, 11:23 AM   #24
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
Quote:
Here some partitions are missing.
/sda4, sda6 - where are they ? How do i check ?
There are simple explanations for both of these.

/dev/sda4 is the first extended partition which is one of the four primary partitions and is the only one given a /dev/sdX device node in Linux. As it is a container for other partitions it has no data or file systems itself so can't be mounted. You can see it is extended by noticing that its size is only 1 512-byte block. From your post
cat /proc/partitions "8 4 1 sda4"

As for /dev/sda6 that could very well be the Linux swap partition. Swap partitions are mounted by the kernel and don;t have file systems that are written to by users and so don't show up in df. You can verify this with lsblk as follows:

lsblk -f /dev/sda6

My swap partition is:
Code:
$ lsblk -f /dev/sdb6
NAME FSTYPE LABEL       UUID                                 MOUNTPOINT
sdb6 swap   swap-shared 6d654c43-5683-42ee-9657-d742af1bfc39
Quote:
2) Values are gradually increasing 16+ why so ?
The SCSI/SATA driver has a limit of 15 partitions per disk for each major device number. You will notice that they jump by 16 for each new disk.

Code:
8     0   78643200 sda 
8    16   10485760 sdb
8    32   10485760 sdc
8    48   10485760 sdd
8    64   10485760 sde
8    80   20971520 sdf
Quote:
1) are they called as 'block devices or raw devices' ?
A raw device is generally a block device that hasn't been formatted with a linux file system such as ext4 or xfs.
 
1 members found this post helpful.
Old 08-03-2017, 11:38 AM   #25
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi,

Thanks for your reply.

Quote:
A raw device is generally a block device that hasn't been formatted with a linux file system such as ext4 or xfs.
You are saying if a device is NOT partitioned, we can call that disk as 'RAW DISK or BLOCK DISK.

1) What is the difference between raw device and block device ?

2) All following disk partitions are block devices because first letter starts with 'b'
but raw devices will start with 'c' - am i right ?


PHP Code:
[root@CATALOG ~]# ls -l /dev/sd*
brw-r----- 1 root disk 8,  0 Aug  4 00:21 /dev/sda
brw
-r----- 1 root disk 8,  1 Aug  4 00:21 /dev/sda1
brw
-r----- 1 root disk 8,  2 Aug  4 00:21 /dev/sda2
brw
-r----- 1 root disk 8,  3 Aug  4 00:21 /dev/sda3
brw
-r----- 1 root disk 8,  4 Aug  4 00:21 /dev/sda4
brw
-r----- 1 root disk 8,  5 Aug  4 00:21 /dev/sda5
brw
-r----- 1 root disk 8,  6 Aug  4 00:21 /dev/sda6
brw
-r----- 1 root disk 8,  7 Aug  4 00:21 /dev/sda7
brw
-r----- 1 root disk 816 Aug  4 00:21 /dev/sdb
brw
-r----- 1 root disk 817 Aug  4 00:21 /dev/sdb1
brw
-r----- 1 root disk 832 Aug  4 00:21 /dev/sdc
brw
-r----- 1 root disk 833 Aug  4 00:21 /dev/sdc1
brw
-r----- 1 root disk 848 Aug  4 00:21 /dev/sdd
brw
-r----- 1 root disk 849 Aug  4 00:21 /dev/sdd1
brw
-r----- 1 root disk 864 Aug  4 00:21 /dev/sde
brw
-r----- 1 root disk 865 Aug  4 00:21 /dev/sde1
brw
-r----- 1 root disk 880 Aug  4 00:21 /dev/sdf 
I hope, some differences are there between raw devices and block devices.
They are mutually NOT exclusive.

Pls reply.

Last edited by Joy Stick; 08-03-2017 at 11:41 AM.
 
Old 08-03-2017, 12:22 PM   #26
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
Quote:
You are saying if a device is NOT partitioned, we can call that disk as 'RAW DISK or BLOCK DISK.
I am not saying this at all. You are saying this and asking people to confirm ideas that you are essentially making up.

First of all no one has yet explained this but the concept of a block device and a "raw disk" are completely separate. Disks are always block devices at low level regardless of whether they are formatted or partitioned.

This has nothing to do with partitioning as well. It is possible to format an unpartitioned disk with a file system such as with mkfs.ext4 /dev/sda. Therefore a disk could be unpartitioned and formatted and thus not a raw device. It is better to have partitions however.

An HDD or SSD is always a block device regardless of whether it has been partitioned or formatted.
A Block ('b') Device is one with which the Driver communicates by sending entire blocks of data.

Quote:
1) What is the difference between raw device and block device ?
As mentioned they are completely separate concepts.

Quote:
2) All following disk partitions are block devices because first letter starts with 'b'
but raw devices will start with 'c' - am i right ?
No, actually you are very wrong and making things up at this point. Block devices start with 'b' while character devices start with 'c'.
 
Old 08-03-2017, 01:34 PM   #27
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
Quote:
I am using OEL 5.5 and OEL 6.8
If you are having a hard time understanding all of this,.. you are using Oracle Enterprise and have to pay for support. Why not use that support and call them up?
 
  


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
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
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 06:15 PM

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

All times are GMT -5. The time now is 10:44 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