No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Administrator Guide 15

OceanStor 5300 V3, 5500 V3, 5600 V3, 5800 V3, and 6800 V3 Storage System V300R003

Routine maintenance activities are the most common activities for the storage device, including powering on or off the storage device, managing users, modifying basic parameters of the storage device, and managing hardware components. This document applies to the system administrators who are responsible for carrying out routine maintenance activities, monitoring the storage device, and rectifying common device faults.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Making Storage Space Available (Red Hat)

Making Storage Space Available (Red Hat)

This section describes how to enable a Red Hat-based application server to use the space of a storage system.

Procedure

  1. Log in to the Red Hat-based application server as user root.
  2. Scan for the LUNs mapped to the application server.

    Use any of the following methods based on your networking mode.
    • iSCSI networking where UltraPath is not installed
      Run the /etc/init.d/iscsi restart command to restart iSCSI services and scan for LUNs.
      [root@localhost ~] # /etc/init.d/iscsi restart
      Stopping iSCSI daemon: 
      iscsid dead but pid file exists                            [  OK  ]
      Turning off network shutdown. Starting iSCSI daemon:       [  OK  ]
                                                                 [  OK  ]
                                                                 [  OK  ]
      [root@localhost ~]# ifconfig
      
    • Fibre Channel networking where UltraPath is not installed
      NOTE:

      The following uses the QLA2460 Fibre Channel HBA as an example to explain how to scan for LUNs. For other Fibre Channel HBAs, see their corresponding manuals.

      1. Run the lsmod command to query the name of the Fibre Channel HBA driver.
        The following output is displayed.
        # lsmod
        Module                Size   Used by
        qla2xxx              749473   0
        autofs4              23749   2
        hidp                 23105   0
        rfcomm               42457   0

        The output shows that the name of the Fibre Channel HBA driver is qla2xxx.

      2. Run the rmmod command to deregister the Fibre Channel HBA driver.
        For example:
        # rmmod qla2xxx

        In this example, the deregistered Fibre Channel HBA driver is qla2xxx.

      3. Run the modprobe command to reload the Fibre Channel HBA driver.
        For example:
        # modprobe qla2xxx

        In this example, the reloaded Fibre Channel HBA driver is qla2xxx.

    • iSCSI or Fibre Channel networking where UltraPath is installed
      Run the hot_add command to scan for LUNs.
      starting new devices re-scan... 
                  scan mptsas HBA host /sys/class/scsi_host/host1...
                  no new device found run /usr/sbin/upTools -s busscan...
      found 2:0:0:0->/dev/sdb found 2:0:0:1->/dev/sdc /usr/sbin/hot_add is completed.

  3. Run the fdisk -l command to query the information about all disks on the application server.

    The application server detects a LUN of 1073 MB and named /dev/sdb, as shown below.
    Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track,
     1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
    
    Device Boot      Start         End      Blocks   Id  System /dev/sda1  
     *           1          13      104391   83  Linux /dev/sda2       
                 14        1044     8281507+  8e  Linux LVM 
    Disk /dev/sdb: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 
    1011 cylinders Units = cylinders of 2074 * 512 = 1061888 bytes
    Disk /dev/sdb doesn't contain a valid partition table
    
    NOTE:
    If no new logical disk is detected, troubleshoot the fault and rescan for logical disks. Possible faults include:
    • The application server is incorrectly connected to the storage system after the network cable has been removed and reinserted.
    • The link between the application server and storage system is down.
    • The rate of the Fibre Channel host port is inconsistent with that of the Fibre Channel HBA on the application server.
    • The HBA driver has been uninstalled.
    • The storage pool fails.
    • Multipathing software is not installed or an incorrect version is installed.
    • The device file on the application server is lost.

    For details, see Failure to Discover LUNs by an Application Server in the OceanStor 5300 V3&5500 V3&5600 V3&5800 V3&6800 V3 Storage System V300R003 Troubleshooting.

  4. Run the fdisk command to partition the logical disk.

    For example, to create a primary partition for the /dev/sdb logical disk, run the following command.
    # fdisk /dev/sdb
    Command (m for help): n 
    Command action e   extended 
    p   primary partition (1-4) 
    p Partition number (1-4): 1 
    First cylinder (1-1011, default 1): 1 
    Last cylinder (1-1011, default 1011): 1011
    Command (m for help): w 
    The partition table has been altered!
    Calling ioctl () to re-read partition table. Syncing disks.
    
    NOTE:
    If the capacity of the LUN is larger than 2 TB, run the parted command to change it to the GPT type and then partition it.

  5. Create a file system on the logical disk.

    Run the following command to create a file system on the logical disk:
    mkfs.ext3 /dev/sdb1

    In this example, an ext3 file system is created for the /dev/sdb1 logical disk.

    The following output is displayed.
    mke2fs 1.38 (30-Jun-2005) /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y
    Filesystem label= OS type: 
    Linux Block size=4096 (log=2)
     Fragment size=4096 (log=2) 
    131072 inodes, 262144 blocks 13107 blocks (5.00%) reserved for the super user 
    First data block=0 8 block groups 32768 blocks per group, 
    32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376
    Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done
    This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. 
    Use tune2fs -c or -i to override.
    

  6. Create a file directory.

    Run the following command to create a file directory:
    mkdir /directory

    In this example, the /directory directory is created.

    After mounting logical disks, modify the /etc/fstab file, set automatic loading configuration items, and bond UUIDs to prevent automatic logical disk loading failures or drive letter changes when the application server is restarted. For details, contact your operating system supplier or system administrator.

  7. Mount the partitioned logical disk to the directory.

    Run the following command to mount the logical disk:
    mount /dev/sdb1 /directory

    In this example, the /dev/sdb1 logical disk is mounted to /directory.

Result

Successful mounting ensures that the application server can read and write the logical disk as a normal disk. Run the mount command to check whether the logical disk is properly mounted. If the following output is displayed, the mounting was successful:
# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb1 on /directory type ext3 (rw)

LVM Management

LVM can combine the space of several disks (physical volumes) into a volume group and divide the space of the volume group into logical volumes.

Use LVM as follows:

  1. Run the fdisk command to create an LVM partition.
    # fdisk /dev/sdc
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel with disk identifier 0x1c36ca92.
    Changes will remain in memory only, until you decide to write them.
    After that, of course, the previous content won't be recoverable.
    
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
    
    Command (m for help): p
    
    Disk /dev/sdc: 107.3 GB, 107374182400 bytes
    
    255 heads, 63 sectors/track, 13054 cylinders
    
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
    
       Device Boot      Start         End      Blocks   Id  System
    
    /dev/sdc1               1         200     1606468+  83  Linux
    
    /dev/sdc4             201        1000     6426000    5  Extended
    
    /dev/sdc5             201         400     1606468+  8e  Linux
    
    /dev/sdc6             401         600     1606468+  83  Linux
    
     
    
    Command (m for help): t
    
    Partition number (1-6): 5
    
    Hex code (type L to list codes): 8e
    
    Changed system type of partition 6 to 8e (Linux LVM)
    
     
    
    Command (m for help): t
    
    Partition number (1-6): 6
    
    Hex code (type L to list codes): 8e
    
    Changed system type of partition 6 to 8e (Linux LVM)
    
     
    
    Command (m for help): p
    
     
    
    Disk /dev/sdc: 107.3 GB, 107374182400 bytes
    
    255 heads, 63 sectors/track, 13054 cylinders
    
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
     
    
       Device Boot      Start         End      Blocks   Id  System
    
    /dev/sdc1               1         200     1606468+  83  Linux
    
    /dev/sdc4             201        1000     6426000    5  Extended
    
    /dev/sdc5             201         400     1606468+  8e  Linux LVM
    
    /dev/sdc6             401         600     1606468+  8e  Linux LVM
    
  2. Run the pvcreate command to create a physical volume.
    # pvcreate /dev/sdc5
    
      Physical volume "/dev/sdc5" successfully created
    
    # pvcreate /dev/sdc6
    
      Physical volume "/dev/sdc6" successfully created
    
    After creating the physical volume, run the pvdisplay -v command to check whether the physical volume is created successfully.
  3. Run the vgcreate command to create a volume group.
    # vgcreate vg0 /dev/sdc5 /dev/sdc6
    
      Volume group "vg0" successfully created
    
  4. Run the lvcreate command to create a logical volume.
    # lvcreate -L 10m -n lv0 vg0
    
      Rounding up size to full physical extent 12.00 MB
    
      Logical volume "lv0" created
    
    After creating the logical volume, run the vgdisplay -v command to confirm the logical volume information.
  5. Run the mkfs.xx command to create a file system. The ext3 format is used as an example here.
    # mkfs.ext3 /dev/vg0/lv0 
    
    mke2fs 1.39 (29-May-2006)
    
    Filesystem label=
    
    OS type: Linux
    
    Block size=1024 (log=0)
    
    Fragment size=1024 (log=0)
    
    3072 inodes, 12288 blocks
    
    614 blocks (5.00%) reserved for the super user
    
    First data block=1
    
    Maximum filesystem blocks=12582912
    
    2 block groups
    
    8192 blocks per group, 8192 fragments per group
    
    1536 inodes per group
    
    Superblock backups stored on blocks: 
    
        8193
    
     
    
    Writing inode tables: done                            
    
    Creating journal (1024 blocks): done
    
    Writing superblocks and filesystem accounting information: done
    
     
    
    This filesystem will be automatically checked every 20 mounts or
    
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    
  6. Create a mount point to mount the logical volume.
    # mkdir /test/mnt1
    
    # mount /dev/vg0/lv0 /test/mnt1/
    
Translation
Download
Updated: 2019-04-17

Document ID: EDOC1000084191

Views: 86681

Downloads: 2301

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next