Storage separation and external storage under Linux

Source: Internet
Author: User
Tags oracle database

storage separation under Linux

Service side:
First take out a piece of zoning/dev/sda5



# Yum Search Target
# yum Install scsi-target-utils.x86_64-y//service-side packages
# vim/etc/tgt/targets.conf//Edit service-side configuration

<target redhat:1>//share the name of this partition as Redhat:1
Backing-store/dev/sda5
</target>

/ETC/INIT.D/TGTD Restart//Restart service



Installation of client:
# Yum Search iSCSI find iSCSI packages and install

[Root@redhat conf.d]# iscsiadm-m discovery-t st-p//First discovery of this partition on the server side
Starting iscsid: [OK]
192.168.3.60:3260,1 redhat:1
[Root@redhat conf.d]#

[Root@redhat conf.d]# iscsiadm-m node-t redhat:1-P 192.168.3.60-l//use Access to this partition
Logging in to [Iface:default, Target:redhat:1, portal:192.168.3.60,3260] (multiple)
Login to [Iface:default, Target:redhat:1, portal:192.168.3.60,3260] successful.

disk/dev/sda:209 MB, 209715200 bytes
# FDISK-CU/DEV/SDA

[Root@redhat conf.d]# partx-d/DEV/SDA
Error deleting partitions 2-256:blkpg:no such device or address
[Root@redhat conf.d]# partx-a/DEV/SDA

# MKFS.EXT4/DEV/SDA1
[Root@redhat conf.d]# mount/dev/sda1/mnt/
[Root@redhat conf.d]# DF
FileSystem 1k-blocks Used Available use% mounted on
/dev/mapper/volgroup-lv_root 6926264 1557096 5017324 24%/
Tmpfs 244988 0 244988 0%/dev/shm
/DEV/VDA1 495844 33487 436757 8%/boot
/DEV/SDA1 197338 5646 181504 4%/mnt
# umount/mnt/

# iscsiadm-m node-t redhat:1-P 192.168.3.60-u

# Fdisk-l//SDA1 is gone
#/ETC/INIT.D/ISCSI Restart
# fdisk-l//reboot found and recovered.
disk/dev/sda:209 MB, 209715200 bytes
# iscsiadm-m node-t redhat:1-P 192.168.3.60-u
# iscsiadm-m node-t redhat:1-P 192.168.3.60-o Delete

#/ETC/INIT.D/ISCSI Restart
# fdisk-l
No, it won't come back.



plug-in storage under Linux

Take server 41 for example.

Use the tool SSH to access Linux.
10.117.10.41/123123

1. Enter the database first to execute the command to start the databaseTo see if it can start normally, normally it will not start properly because there is no mount on the storage.

SQL code
[Root@new-jwtest/]# su-oracle--Access to Oracle Users
[Oracle@new-jwtest ~]$ sqlplus "/as sysdba"-Enter the database as an administrator
Www.2cto.com
Sql*plus:release 10.2.0.1.0-production on Sun APR 8 17:29:54 2012

Copyright (c) 1982, +, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition release 10.2.0.1.0-64bit Production
With the partitioning, OLAP and Data Mining options

Sql> Startup--Start the database
--This may prompt: No storage/u03 found
Sql> quit--Exit database
[Oracle@new-jwtest ~]$ Exit--Exit Oracle User

2. Perform fdisk-l to view the partition of the disk (note:-L is lowercase l)

SQL code
[Root@new-jwtest ~]# Fdisk-l

disk/dev/sda:146.5 GB, 146544787456 bytes
255 heads, Sectors/track, 17816 cylinders
Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 200781 Linux
/dev/sda2 2065 16386300 Linux Swap/solaris
/dev/sda3 2066 17816 126519907+ Linux
Www.2cto.com
disk/dev/sdb:1498.6 GB, 1498657587200 bytes
255 heads, Sectors/track, 182201 cylinders
Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System
/DEV/SDB1 * 1 182201 1463529501 Linux

3. External storage Mount


SQL code

[Root@new-jwtest/]# mount/dev/sdb1/u03--Hangs the storage/u03 in/DEV/SDB1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.