Scan for new LUN and create a new file system

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Scan for new LUN and create a new file system
# 1  
Old 11-26-2014
Scan for new LUN and create a new file system

Hi

Please I dont have a lot of redhat skills, but I need some help on creating a file system.
I need to rescan for this new LUN, so I try to check existing LUNs:

Code:
 fdisk -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes
255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000080

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       36405   291908608   8e  Linux LVM

Disk /dev/sdb: 598.9 GB, 598879502336 bytes
255 heads, 63 sectors/track, 72809 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ddc20

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       72809   584838261   83  Linux

Disk /dev/mapper/vg_outsystemdb-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_outsystemdb-lv_swap: 29.6 GB, 29611786240 bytes
255 heads, 63 sectors/track, 3600 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_outsystemdb-lv_home: 215.6 GB, 215612391424 bytes
255 heads, 63 sectors/track, 26213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Then I try to check for controllers:

Code:
ls -lrt /sys/class/fc_host
total 0
lrwxrwxrwx. 1 root root 0 Nov 20 15:26 host2 -> ../../devices/pci0000:00/0000:00:07.0/0000:06:00.1/host2/fc_host/host2
lrwxrwxrwx. 1 root root 0 Nov 20 15:26 host1 -> ../../devices/pci0000:00/0000:00:07.0/0000:06:00.0/host1/fc_host/host1

Then I try to scan for new disks:

Code:
echo "1" > /sys/class/fc_host/host2/issue_lip

But now I dont seem to see anything usefull in /var/log/messages:

Code:
tail /var/log/messages
Nov 24 03:10:02 OutsystemDB rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.
Nov 25 03:35:02 OutsystemDB rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.
Nov 26 03:21:01 OutsystemDB rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.
Nov 26 10:03:55 OutsystemDB kernel: qla2xxx [0000:06:00.1]-1020:2: **** Failed mbx[0]=4005, mb[1]=8, mb[2]=0, mb[3]=0, cmd=72 ****.
Nov 26 10:24:12 OutsystemDB kernel: qla2xxx [0000:06:00.1]-1020:2: **** Failed mbx[0]=4005, mb[1]=8, mb[2]=0, mb[3]=0, cmd=72 ****.
Nov 26 10:24:55 OutsystemDB kernel: qla2xxx [0000:06:00.0]-505f:1: Link is operational (8 Gbps).
Nov 26 10:24:55 OutsystemDB kernel: qla2xxx [0000:06:00.0]-2064:1: SNS scan failed -- assuming zero-entry result.
Nov 26 10:25:16 OutsystemDB kernel: qla2xxx [0000:06:00.1]-1020:2: **** Failed mbx[0]=4005, mb[1]=8, mb[2]=0, mb[3]=0, cmd=72 ****.
Nov 26 10:25:38 OutsystemDB kernel: qla2xxx [0000:06:00.0]-505f:1: Link is operational (8 Gbps).
Nov 26 10:25:39 OutsystemDB kernel: qla2xxx [0000:06:00.0]-2064:1: SNS scan failed -- assuming zero-entry result.

Please help me to scan for this new LUNs
# 2  
Old 11-26-2014
Do you have anything on /dev/sdb1, or is that the new LUN? It's showing as an un-partitioned volume at the moment. I'm guessing that you might want to turn this into a volume group or add it to your existing volume group that /dev/sda2 is in, vg_outsystemdb.

If this is the case, then pvcreate and vgextend will help you.

Can you show use the output for vgdisplay -v so we can avoid anything that already exists.

The output from uname -a would also ensure we give you appropriate commands for your OS version.


If /dev/sdb1 is not your new LUN, a boot should pick it up if that can be arranged.



Regards,
Robin
# 3  
Old 11-27-2014
I wouldīnt know if /dev/sdb1 is a new LUN, and the output of vgdisplay -v is
Code:
[root@OutsystemDB /]# vgdisplay -v
    Finding all volume groups
    Finding volume group "vg_outsystemdb"
  --- Volume group ---
  VG Name               vg_outsystemdb
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               278.38 GiB
  PE Size               4.00 MiB
  Total PE              71266
  Alloc PE / Size       71266 / 278.38 GiB
  Free  PE / Size       0 / 0
  VG UUID               7jqi8V-DZL2-74Sy-Cnfh-zqXG-t1z9-aWccpl

  --- Logical volume ---
  LV Path                /dev/vg_outsystemdb/lv_root
  LV Name                lv_root
  VG Name                vg_outsystemdb
  LV UUID                2JYtuE-xT5P-9OpV-59g3-qdth-kIbM-xlNJyG
  LV Write Access        read/write
  LV Creation host, time OutsystemDB, 2014-03-19 18:48:00 +0200
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/vg_outsystemdb/lv_home
  LV Name                lv_home
  VG Name                vg_outsystemdb
  LV UUID                DSzA8C-cHoV-rU6W-d3Om-90jR-TVMn-nD9MIZ
  LV Write Access        read/write
  LV Creation host, time OutsystemDB, 2014-03-19 18:48:07 +0200
  LV Status              available
  # open                 1
  LV Size                200.80 GiB
  Current LE             51406
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/vg_outsystemdb/lv_swap
  LV Name                lv_swap
  VG Name                vg_outsystemdb
  LV UUID                NBlWMD-08LW-Nd6T-MhZO-uSgL-s8Vn-pgYfL2
  LV Write Access        read/write
  LV Creation host, time OutsystemDB, 2014-03-19 18:48:31 +0200
  LV Status              available
  # open                 1
  LV Size                27.58 GiB
  Current LE             7060
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Physical volumes ---
  PV Name               /dev/sda2
  PV UUID               CDntvD-CZ4e-w2T6-wwcf-kZgW-KQZ4-kVVEhc
  PV Status             allocatable
  Total PE / Free PE    71266 / 0

[root@OutsystemDB /]#

The output of
Code:
uname -a

is
Code:
[root@OutsystemDB /]# uname -a
Linux OutsystemDB 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@OutsystemDB /]#

.

Does the /dev/sdb1 not a boot partition? as it says on the output of fdisk -l:
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       72809   584838261   83  Linux


Last edited by rbatte1; 11-27-2014 at 06:33 AM.. Reason: Changed some CODE tags to ICODE
# 4  
Old 11-27-2014
Thanks for all this output - it's good stuff.

The volume group vg_outsystemdb is made from just a single disk partition at the moment, /dev/sda2 which is fine. The query you have about /dev/sdb1 is valid, but a boot disk would have an asterix in the Boot column, like /dev/sda1 in this display:-
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2         501      512000   83  Linux
/dev/sda2             502       16384    16264192   8e  Linux LVM

If the output from df doesn't show any filesystems mounted from device /dev/sdb and you don't have a database that directly uses disk, then I'm pretty confident that you new LUN has been detected as /dev/sdb

Can we be sure of that before proceeding?



Robin
This User Gave Thanks to rbatte1 For This Post:
# 5  
Old 11-27-2014
Hi

My Storage Admin (NetApp) guy, just told me that the problem was actually zoning, so after he actually set up zoning problem, I am now able to view the LUN that he mapped on the system:

Code:
[root@OutsystemDB /]# fdisk -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes
255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000080

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       36405   291908608   8e  Linux LVM

Disk /dev/sdb: 598.9 GB, 598879502336 bytes
255 heads, 63 sectors/track, 72809 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ddc20

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       72809   584838261   83  Linux

Disk /dev/mapper/vg_outsystemdb-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_outsystemdb-lv_swap: 29.6 GB, 29611786240 bytes
255 heads, 63 sectors/track, 3600 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_outsystemdb-lv_home: 215.6 GB, 215612391424 bytes
255 heads, 63 sectors/track, 26213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdc: 429.5 GB, 429523992576 bytes
255 heads, 63 sectors/track, 52219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 65536 bytes
Disk identifier: 0x00000000


Disk /dev/sdd: 429.5 GB, 429523992576 bytes
255 heads, 63 sectors/track, 52219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 65536 bytes
Disk identifier: 0x00000000


Disk /dev/sde: 429.5 GB, 429523992576 bytes
255 heads, 63 sectors/track, 52219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 65536 bytes
Disk identifier: 0x00000000


Disk /dev/sdf: 429.5 GB, 429523992576 bytes
255 heads, 63 sectors/track, 52219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 65536 bytes
Disk identifier: 0x00000000

Its the 429.5 GB disk shown as /dev/sdc!!

Last edited by rbatte1; 11-27-2014 at 08:50 AM.. Reason: Changed some ICODE tags to just CODE tags
# 6  
Old 11-27-2014
So are /dev/sdd, /dev/sde & /dev/sdf not needed? Lovely to have three spares of such size too!

Are you looking to grow the existing volume group or add a new one? I suppose the eventual aim is to allocate at least one new filesystem or extend an existing one, but it depends on how you want to allocate the space for what we actually do.

Can you show me the output from df -k too?


Thanks,
Robin
# 7  
Old 11-27-2014
The /dev/sde and on are the same disk, itīs shown like this because there are more that 1 controller on the NetApp.

So now I want to create a new vg and subsequently a new file system, so I believe the order of commands are as follows, please correct me if I am wrong:-
Code:
pvcreate -f /dev/sdd
vgcreate -s 20480m -v /dev/vg01 /dev/sdd
lvcreate -L 400G -n lvol1 /dev/vg01
mkfs.ext4 -t ext4 /dev/vg01/lvol1
mkdir oradata
mount /dev/vg01/lvol1 /oradata

current output of
Code:
df

Code:
[root@OutsystemDB /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_outsystemdb-lv_root
                       50G  2.7G   45G   6% /
tmpfs                  28G   72K   28G   1% /dev/shm
/dev/sda1             485M   38M  422M   9% /boot
/dev/mapper/vg_outsystemdb-lv_home
                      198G  185G  2.8G  99% /home
/dev/mapper/vg01-lvol1


Last edited by rbatte1; 11-27-2014 at 09:48 AM.. Reason: Consolidated CODE block and converted some CODE tags to ICODE tags and and one CODE tag to set bold.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to scan the disks and make file system

Hi What I'm trying to do(manually) is logging into the server and running the below mentioned commands ls /sys/class/scsi_device/ | while read i; do echo "- - -" > /sys/class/scsi_device/$i/device/rescan;done lsblk echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/sdd partx -a /dev/sdd1... (7 Replies)
Discussion started by: James0806
7 Replies

2. Shell Programming and Scripting

Create automated scan of specific directory using bash

I am trying to use bash to automate the scan of a specific directory using clamav. Having this in place is a network requirement. The below is an attempt to: 1. count the extensions (.txt, .jpeg) in a directory and write them to a virus-scan.log (section in bold) 2. scan each folder in the... (6 Replies)
Discussion started by: cmccabe
6 Replies

3. Shell Programming and Scripting

Scan directories and create a list of files

Gents, Please can you help. I want to create a list which contends the complete patch of the location of some directories with the size of each file. need to select only .txt file In this case I am try to find the subdirectories tp1 and tp2 and create the output list. jd175-1 tp1... (3 Replies)
Discussion started by: jiam912
3 Replies

4. Ubuntu

Scan and create file systems in new LUNs

Hi I have a system running uname -a Linux cmoveldb02 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux and I was told by the NetApp Admin that he has provided 5 LUNs of 1Tb, 200Gb and remaining 3 of 300Gb, but I am not able to see the new LUNs. I have... (4 Replies)
Discussion started by: fretagi
4 Replies

5. HP-UX

FC Lun scan without unmount

OS : 11.31 Storage : HP P2000 WE extended one lun to 100GB which was previously 50GB from storage side... How to get detect the size without unmounting.... ---------- Post updated at 04:39 AM ---------- Previous update was at 12:37 AM ---------- No LVM and No online JFS installed... (2 Replies)
Discussion started by: selvaforum
2 Replies

6. UNIX for Advanced & Expert Users

Scan all mail messages through the server and save a copy into file system following a rule

In our company we work for our customer with a job# philosophy, managing all the informations about a job in a share with directories whose name is starting with job number. Under this entry point we have a standard structure of folders, comprising a "communications" folder. When we send emails... (0 Replies)
Discussion started by: vroby67
0 Replies

7. UNIX for Dummies Questions & Answers

For create file system.

How many ways and how we can create unix file system in sun solaris? (1 Reply)
Discussion started by: anupdas
1 Replies

8. UNIX for Dummies Questions & Answers

How to create a new file system

Is there any URL or procedure to create a new file system on solaris 8/9/10.. (3 Replies)
Discussion started by: tintedwindow
3 Replies

9. Solaris

command to scan Enterprise storage Lun disk in Solaris

I just installed IBMsdd on Solaris diver along with the patches recommended. I also installed 2 - 2Gigs qlogic fiber cards & the corresponding pkges for the cards. What command can I use to scan this LUN disks from my Soalris servers. Solaris doen't seem to be seeing this disks presented on it.... (2 Replies)
Discussion started by: Remi
2 Replies

10. SCO

create a new file system

I have just installed 5.0.7 of openserver and forgot to create a /u filesystem. I have a root filesystem that takes up most of the hard disc space and I want to reduce the size of that and create a /u. I have tried divvy amd mkdev fs but to no avail. Could somebody give me some idea as to how I... (2 Replies)
Discussion started by: rongrout
2 Replies
Login or Register to Ask a Question