Iscsi-target dynamically increases virtualdisk Space

Source: Internet
Author: User

1. For example, we already have a target image file 10g. IMG.

# Dd If =/dev/Zero of = 10g. img bs = 1 m COUNT = 10240

 

2. Add the following code to the/etc/Iet. conf file:


Target fat10g. img

Lun 0 Path =/work/janco/virtualdisk/fat10g. IMG, type = fileio

 

3. Restart the service:/etc/init. d/iSCSI-target restart

 

4. Mount windows or Linux and Write File data.

 

5.ISCSI

Initiator disconnect target

 

6. increase the size of the target image file by 10 Gb. IMG to 20 GB.

# Dd If =/dev/Zero of = 10g. img bs = 1 m COUNT = 10240 seek = 10240

 

7. Restart the service:/etc/init. d/iSCSI-target restart

 

8. Remount on Windows or Linux.

----------------------------------------------------------------

The above operations can be integrated into the NAS iSCSI Network Virtual Drive. You only need to capture the error "insufficient disk space when writing Files" between step 4 and Step 5 at the user's operation end"
You can.

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.