Visit The New, Modern Unix Linux Community


LUN Presentation

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat LUN Presentation
# 8  
Code:
scsi_id -g -u -s /block/sd*

will give SCSI_ID try this may help
# 9  
Quote:
Originally Posted by Duffs22
Thanks Mark54g,

Now once I have scanned in the new LUN on the OS how do I create a new FS from this space?

Can I use "fdisk" against the dm-<no> to present all paths to the OS?

.....or can I just pvcreate the /dev/dm-<no> and take it from there?

R,
D.
You would work against the dm device like you would /dev/sdb, et al.

You can fdisk it (unless it is too large, then you may need to use parted)

Then you can use mkfs on it to create a file system, unless you use volume groups first, at which point you can do that with pvcreate.

Here's a trick, though. If you are going to add many volumes of the same size (careful on an EVA, they have lower limits on the number of presented LUNs), you can use:

Code:
sfdisk -d <a device with the layout you like>| sfdisk <device you want to copy the layout to>


Last edited by mark54g; 05-02-2012 at 11:45 PM..
This User Gave Thanks to mark54g For This Post:
# 10  
Great thanks! Just one more thing.....

I fdisk'ed the /dev/dm-<no> to create a new LVM partition, however the associated paths show up as not having valid partition tables.

Is this ok or should I create new partitions for these path devices also?

Code:
Disk /dev/sdc: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
 
Disk /dev/sdc doesn't contain a valid partition table
 
Disk /dev/sdd: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
 
Disk /dev/sdd doesn't contain a valid partition table
 
Disk /dev/dm-8: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
     Device Boot      Start         End      Blocks   Id  System
/dev/dm-8p1               1         261     2096451   83  Linux

R,
D.
# 11  
Are you sure that those devices are the ones for your dm? What does sfdisk -d /dev/<name> tell you?
# 12  
yes positive.
I ran a diff against the fdisk output before and after I rescanned the scsi_bus.

Code:
# sfdisk -d /dev/sdc
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdc: unrecognized partition table type
No partitions found
 
# sfdisk -d /dev/sdd
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdd: unrecognized partition table type
No partitions found
 
# sfdisk -d /dev/dm-8
# partition table of /dev/dm-8
unit: sectors
/dev/dm-8p1 : start= 63, size= 4192902, Id=83
/dev/dm-8p2 : start= 0, size= 0, Id= 0
/dev/dm-8p3 : start= 0, size= 0, Id= 0
/dev/dm-8p4 : start= 0, size= 0, Id= 0

R,
D.

---------- Post updated at 11:27 AM ---------- Previous update was at 10:19 AM ----------

Ok, I have created the other paths as LVM type the same as my dm-8:

Code:
Disk /dev/sdc: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
 
Device Boot Start End Blocks Id System
/dev/sdc1 1 1009 2095662 83 Linux
 
Disk /dev/sdd: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
 
Device Boot Start End Blocks Id System
/dev/sdd1 1 1009 2095662 83 Linux
 
Disk /dev/dm-8: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
 
Device Boot Start End Blocks Id System
/dev/dm-8p1 1 1009 2095662 83 Linux
 
# multipath -ll
xxrts1_test (3600143800648d7280000800000300000) dm-8 HP,HSV300
[size=2.0G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=100][active]
\_ 0:0:0:2 sdc 8:32 [active][ready]
\_ 0:0:1:2 sdd 8:48 [active][ready]

I added the following filters to the lvm.conf file but did not make any difference to the fdisk output even after a pvscan:

Code:
      # Filters all SCSI devices ijn the multipath config file
      filter = [ "r/disk/", "r/sd.*/", "a/.*/" ]
 
      # Instructs LVM not to look at the path but only at the multipaths:
      filter = [ "r/sd.*/", "a/.*/" ]

R,
D.
# 13  
fdisk does not do well on volumes that size. This is why I suggested parted when you hit a size limitation. You might also be able to use sfdisk or cfdisk. My suggestion is to use parted, or one of the other tools to create your partition, because it appears ioctl has not been properly updated.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #733
Difficulty: Medium
AmigaBASIC is a complied BASIC programming language implementation for the Amiga, designed and written by Microsoft.
True or False?

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Logs Presentation

Hello All, I am trying to capture system logs for specific tools run by users. So my script create logs from 10 different server.So is there any script & tool from that i can read or present them easily ?. Regards Ankit (1 Reply)
Discussion started by: ajaincv
1 Replies

2. OS X (Apple)

Wireless presentation system for mac

I am a system developer for a major university and currently trying to find out WPS software for mac that can connect a mac to a wireless projector server. The software functions with Win OS XP and 7. The server is a EDIMAX WP-S1100 WIRELESS PROJECTOR SERVER. (0 Replies)
Discussion started by: mobilemaster
0 Replies

3. Solaris

I have LUN ID, how to find disk relate to that LUN ID?

I have a list of LUN ID, my task is to find if disk has been added or not. How do I do that? I have been searching the forum and not able to find answer. thanks (4 Replies)
Discussion started by: uuontario
4 Replies

4. Shell Programming and Scripting

format date/time presentation

1) i am trying to print the timeframe of a log file using the start/end date/time being extracted from the file itself. my problem is how to convert the following numeric date format to the one that i prefer: Start time: 0204161129 End time : 0204171431 into: Start time: Apr 16 2002... (6 Replies)
Discussion started by: apalex
6 Replies

Featured Tech Videos