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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-31-2017, 02:32 PM
|
#1
|
Member
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127
Rep:
|
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
|
|
|
07-31-2017, 02:51 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,143
|
Quote:
Originally Posted by Joy Stick
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.
|
07-31-2017, 03:03 PM
|
#3
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,822
|
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.
|
07-31-2017, 03:17 PM
|
#4
|
Member
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127
Original Poster
Rep:
|
Actually i added 4 raw devices , then partitioned.
Type of file shows --> b - does it mean block devices ?
PHP Code:
ls -l /dev/sdb* brw-r----- 1 root disk 8, 16 Jul 31 03:10 /dev/sdb brw-r----- 1 root disk 8, 17 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 8, 32 Jul 31 03:12 /dev/sdc brw-r----- 1 root disk 8, 33 Jul 31 03:17 /dev/sdc1 [root@CATALOG linux_ora10gsoft]# ls -l /dev/sdd* brw-r----- 1 root disk 8, 48 Jul 31 03:14 /dev/sdd brw-r----- 1 root disk 8, 49 Jul 31 03:17 /dev/sdd1 [root@CATALOG linux_ora10gsoft]# ls -l /dev/sde* brw-r----- 1 root disk 8, 64 Jul 31 03:16 /dev/sde brw-r----- 1 root disk 8, 65 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.
|
|
|
All times are GMT -5. The time now is 01:59 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|