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:

 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:

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:

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

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

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

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

I would�nt know if /dev/sdb1 is a new LUN, and the output of vgdisplay -v is

[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

uname -a

is

[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 :

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

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:-

   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

1 Like

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:

[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 !!

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

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:-

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

df
[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

I'd be a little surprised if it doesn't handle multipath devices and associate them to form just the devices you need. What would happen if someone later decided to overwrite /dev/sdf because it looks to be free?

At first glance, the proposed commands looks fine to me although personally I would use a more human name for the volume group & logical volume, such as vg_oracle and lv_oradata.

Your mkdir doesn't force it to create the directory in the root directory though, so you might need to check that. You need to be consistent with your device names too. Are you using /dev/sdc or /dev/sdd? What's wrong with /dev/sdb anyway? That looks to be over 500Gb of unused disk.

Robin

As I said initially I do not have skills on redhat , so because I did not set-up this server, I am not to keen on touching something that I did not do /dev/sdb!, so I will follow your advice and create the volume group.

Thanks for your help