In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "Linux system how to mount iscsi storage", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Linux system how to mount iscsi storage" bar!
The way Linux mounts iscsi storage
There are two ways for iscsi to mount to Linux, one through ip mapping of iscsi protocol, and the other through file sharing nfs mount. Among them, through the ip mapping of iscsi protocol, it is mounted to Linux to show in the form of disk. After ip mapping, the disk needs to be partitioned and formatted.
Mounting steps:
1: check the iscsi rpm package
2: start the iscsi service and set the boot self-startup
3: find the logical volumes provided by the storage
4: map logical volumes to Linux system
5: set boot automatic mapping
6: partition the mapped disk
7: format after partition
8: Mount the partition
Note: after Linux formatting, the system file of the logical volume is the file system of Linux type. if the logical volume is to be hung on the window server, you need to reformat the logical volume, and the formatted system is the system file type of window. In short, iscsi storage mapped through ip cannot be mounted to both Linux and window, and if sharing is needed, it is best to make the storage lun for file sharing.
1. Check the iscsi rpm package
Copy the contents to the clipboard
Rpm-qa | grep iscsi
Install the RPM package
Copy the contents to the clipboard
[root@qionghai11g Packages] # rpm-Uvh iscsi-initiator-utils-6.2.0.873-2.el6.x86_64.rpm
2. Start the iscsi service and set the boot self-startup
Copy the contents to the clipboard
[root@qionghai11g Packages] # service iscsi start
[root@qionghai11g Packages] # chkconfig-- list | grep iscsi
3. Find the logical volumes provided by the storage
Copy the contents to the clipboard
[root@qionghai11g] # iscsiadm-m discovery-t sendtargets-p 192.16.10.188 purl 3260
Starting iscsid: [OK]
192.16.10.188 purl 3260 iqn.2004-01.com.storbridge:block02-wt
192.16.10.188 purl 3260 iqn.2004-01.com.storbridge:block01-wt
4. Map logical volumes to Linux system
Copy the contents to the clipboard
[root@qionghai11g] # iscsiadm-m node-T iqn.2004-01.com.storbridge:block01-wt-p 192.16.10.188 purl 3260-l
Logging in to [iface: default, target: iqn.2004-01.com.storbridge:block01-wt, portal: 192.16.10.188 Magi 3260] (multiple)
Login to [iface: default, target: iqn.2004-01.com.storbridge:block01-wt, portal: 192.16.10.188 Magi 3260] successful.
[root@qionghai11g] # iscsiadm-m node-T iqn.2004-01.com.storbridge:block02-wt-p 192.16.10.188 purl 3260-l
Logging in to [iface: default, target: iqn.2004-01.com.storbridge:block02-wt, portal: 192.16.10.188 Magi 3260] (multiple)
Login to [iface: default, target: iqn.2004-01.com.storbridge:block02-wt, portal: 192.16.10.188 Magi 3260] successful.
5. Set automatic mapping for boot.
Copy the contents to the clipboard
[root@qionghai11g] # iscsiadm-m node-T iqn.2004-01.com.storbridge:block02-wt-p 192.16.10.188 iqn.2004 3260-- op update-n node.startup-v automatic
[root@qionghai11g] # iscsiadm-m node-T iqn.2004-01.com.storbridge:block01-wt-p 192.16.10.188 iqn.2004 3260-- op update-n node.startup-v automatic
These two are automatically mapped on the boot.
6. Partition the mapped disk
Since the storage capacity is 12T and greater than 2T, different partitions fdisk cannot be used, only GPT partitions can be used.
Parted / dev/sdb partitions / dev/sdb
Print print information, from which you can see the disk size and partition format
Mklabel gpt
Mkpart primary 0% 100%
Print can see that the disk partition format has changed to GPT.
7. Format after partition
Copy the contents to the clipboard
[root@oracle11g ~] # mkfs.ext3 / dev/sdb
Mke2fs 1.39 (29-May-2006)
/ dev/sdb is entire device, not just one partition!
Proceed anyway? (YBM n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1708998656 inodes, 3417968064 blocks
170898403 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
104309 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632
2560000000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
Done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs-c or-i to override.
8. Mount the partition
[root@qionghai11g ~] # cd / var/www/html/
[root@qionghai11g html] # mkdir kk1 kk2
[root@qionghai11g mnt] # mount / dev/sdb1 / var/www/html/kk1/
Thank you for reading, the above is the content of "how to mount iscsi storage in Linux system". After the study of this article, I believe you have a deeper understanding of how to mount iscsi storage in Linux system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.