[pve-devel] restrict scsi-block to /dev/disk/

Alexandre DERUMIER aderumier at odiso.com
Mon Mar 12 10:43:52 CET 2012


I found these majors in doc :

major : 8,65,66,67,68,69,70,71,128,129,130,131,132,133,134,135

But they are more than 16 minors ? (kernel 2.6).

Checking major isn't enough ?

I can see 800 iscsi luns disk on my host


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 12 Mars 2012 10:34:08 
Objet: RE: [pve-devel] restrict scsi-block to /dev/disk/ 

There are 16 minor numbers for each major ==> 16x16 = 256 SCSI disks 

Note: we need to check major and minor numbers 

> -----Original Message----- 
> From: Alexandre DERUMIER [mailto:aderumier at odiso.com] 
> Sent: Montag, 12. März 2012 09:11 
> To: Dietmar Maurer 
> Cc: pve-devel at pve.proxmox.com 
> Subject: Re: [pve-devel] restrict scsi-block to /dev/disk/ 
> 
> Ok, got it ! I'll read the doc to see how it's work. (I like to learn new things ;) 
> 
> currently with my iscsi I have these majors 
> 
> 
> 8 
> 65 
> 66 
> 67 
> 68 
> 69 
> 70 
> 71 
> 128 
> 129 
> 130 
> 131 
> 132 
> 133 
> 134 
> 135 
> 
> ----- Mail original ----- 
> 
> De: "Dietmar Maurer" <dietmar at proxmox.com> 
> À: "Alexandre DERUMIER" <aderumier at odiso.com> 
> Cc: pve-devel at pve.proxmox.com 
> Envoyé: Lundi 12 Mars 2012 08:56:52 
> Objet: RE: [pve-devel] restrict scsi-block to /dev/disk/ 
> 
> Each unix device has a major and minor number: 
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documenta 
> tion/devices.txt;h=00383186d8fb3e2c0fc4d5a12852844cb5b2721f;hb=fde7d904 
> 9e55ab85a390be7f415d74c9f62dd0f9 
> 
> see 'man fstat' for detailes on how toö get those numbers (st_dev field) 
> 
> alse see: 'man mknod' and 'man 2 mknod' 
> 
> - Dietmar 
> 
> 
> 
> > -----Original Message----- 
> > From: Alexandre DERUMIER [mailto:aderumier at odiso.com] 
> > Sent: Montag, 12. März 2012 08:44 
> > To: Dietmar Maurer 
> > Cc: pve-devel at pve.proxmox.com 
> > Subject: Re: [pve-devel] restrict scsi-block to /dev/disk/ 
> > 
> > I don't known what is major/minor ;) 
> > 
> > Could you provide an example ? 
> > 
> > ----- Mail original ----- 
> > 
> > De: "Dietmar Maurer" <dietmar at proxmox.com> 
> > À: "Alexandre DERUMIER" <aderumier at odiso.com> 
> > Cc: pve-devel at pve.proxmox.com 
> > Envoyé: Lundi 12 Mars 2012 08:26:46 
> > Objet: RE: [pve-devel] restrict scsi-block to /dev/disk/ 
> > 
> > > Why do you mean by major/minor device number ? 
> > > 
> > > 
> > > we can also try to test if 
> > > 
> > > /sys/block/sdXXX/device/scsi_device 
> > > 
> > > exist 
> > > 
> > > 
> > > /dev/disk/by-id/scsi-XXXX are symlink to /dev/sdX 
> > 
> > But testing major/minor requires one simple stat call - isn't that easier? 
> > 
> > - Dietmar 
> > 
> > 
> > 
> > -- 
> > 
> > -- 
> > 
> > 
> > 
> > 
> > Alexandre D erumier 
> > Ingénieur Système 
> > Fixe : 03 20 68 88 90 
> > Fax : 03 20 68 90 81 
> > 45 Bvd du Général Leclerc 59100 Roubaix - France 
> > 12 rue Marivaux 75002 Paris - France 
> > 
> 
> 
> 
> 
> -- 
> 
> -- 
> 
> 
> 
> 
> Alexandre D erumier 
> Ingénieur Système 
> Fixe : 03 20 68 88 90 
> Fax : 03 20 68 90 81 
> 45 Bvd du Général Leclerc 59100 Roubaix - France 
> 12 rue Marivaux 75002 Paris - France 
> 




-- 

-- 




	Alexandre D erumier 
Ingénieur Système 
Fixe : 03 20 68 88 90 
Fax : 03 20 68 90 81 
45 Bvd du Général Leclerc 59100 Roubaix - France 
12 rue Marivaux 75002 Paris - France 
	



More information about the pve-devel mailing list