1. Current Location: Home >  NAS >  With insufficient hard drives, iSCSI installed the NAS on the local site, causing three pitfalls in one night

With insufficient hard drives, iSCSI installed the NAS on the local site, causing three pitfalls in one night

iSCSI mounting illustration: File-level and block-level comparison between SMB and iSCSI, the four-step process of setting up a LUN on Feiniu NAS to Windows mounting, and three pitfalls

The desktop computer in the study, with its 512GB SSD, finally became popular. With only about thirty GB left, even editing and exporting a video was nerve-wracking. The most annoying thing is the asset management software I use. The asset library only recognizes local drive paths, I enter the NAS shared folder, but it ignores me. Adding a 2TB SATA SSD costs 600 to 700 yuan. I suddenly remembered there's another way—to attach the NAS space to a "local hard drive" on the computer, iSCSI. After a night of fussing around, I managed to get through it, but there were three pitfalls I wanted to give people a heads-up.

SMB and iSCSI differ in a translator

who

first breaks these two terms apart. When we connect to a NAS, we use SMB: you open \192.168.31.20\ Library on your computer, see folders and files, copy them in and drag them out. Throughout this process, the NAS acts as a translator—it translates the files on its hard drive into network protocols and hands them to you, clearly knowing the name, size, and layer of each file.

iSCSI is a different logic: NAS carves out a space from the storage pool, doesn't install a file system, and hands it directly to the computer; The computer received was a "brand new hard drive," which was partitioned and formatted as NTFS itself. For example, in SMB, when you borrow something from the warehouse, every item you pick up must be registered by the administrator; iSCSI means the administrator directly moves an entire empty shelf into your home. The administrator has no idea what to put on it or how to arrange it, nor does it want to know.

This "not knowing" is exactly what I want—for the computer, it's just a local drive, with drive letters, partitionable partitioning, and a path of D:\. That software that only recognizes local drives immediately accepts it. The cost also comes from this 'not knowing' part; you'll see this later when we talk about the pitfall.

NAS side: How to enable Feiniu and Synology?

My N100 small machine runs Feiniu, but it never had this feature before. After the system updated to 0.9.3x last month, iSCSI quietly appeared in the settings. The path is to find iSCSI in the application, then create a new LUN using advanced "LUN Management"—you can think of it as creating a hard drive out of thin air on the NAS, choosing which storage pool it is in, and how much capacity it is. I marked 1 T in the material library.

Here's an option called Thin, which is worth mentioning: check it, and filling in 1 T is the limit; the actual amount is counted. I only copied 180GB into the NAS storage pool that night, so the storage pool on the NAS side was just 180GB short. If you don't check it, it's a thick stockpile and you lose 1 T on the spot, which isn't friendly for old NAS with limited space. Also, which storage pool the LUN falls into depends on the ext4 is still Btrfs. The article about the temperament of two file systems is discussed. If you want to take a snapshot of a LUN, the pool must be Btrfs.

After building the LUN, create the Target, which is like opening a door for this bare disk. The house number is a string of characters called IQN, so you don't need to write it yourself—just generate it by default. Step three is permissions: Feiniu checks which initiators to connect in the "User Group" section. The logic on Synology's side is the same, except the entry point is changed to the SAN Manager in the package center. After installation, you create iSCSI LUNs and Targets, with the process being largely similar. My cousin owns a second-hand Synology car I casually drove one, and it only takes five minutes.

On the computer: Windows comes with built-in tools, four steps to get it

done.

On the computer's side, Windows comes with iSCSI to start programs, so you don't need to install anything. Win+R presses iscsippl and presses Enter. The first pop-up asks if you want to start the iSCSI service. Click Yes. Then switch to the "Discover" tab, click the Discovery portal, enter the NAS IP, and keep port 3260 unchanged; Go back to the 'Target' tab. The Target you just created is already in the list. Select and click to connect.

At this point, the disk still can't be seen, so don't panic. Then Win+R and type diskmgmt.msc to open Disk Management. A new "unknown, uninitialized" disk appears—right-click the left disk tab, first click "Online," then click "Initialize Disk," and select GPT as partition type; Then right-click on the right side of the unallocated space, create a new simple volume, then proceed to the next step, select NTFS as the file system, and assign it a drive letter. Once confirmed, the computer will have a 1TB D drive. The whole process is exactly like plugging in a brand-new hard drive into a computer.

By the way

, the order of disconnection should be reversed: first set that disk to "offline" in Disk Management, then return to iSCSI to initiate the program and disconnect. What happens if you unplug the network cable directly (shut down and restart the NAS)? I've stepped on it, let's look below.

Test: Sequential read/write max max gigabit, randomness is a weak point

. I

have some expectations for speed, and the test basically matches it. Copy large files into this "local drive," write stability at 106MB/s; Backread is 108MB/s—my home is a gigabit network, and the switch to the network card is wired throughout. This number is maxed out for gigabit usage, on par with local SATA solid-state sequential read/write speed. If you want to go faster, you have to run the network. 2.5G ports can reach 280/90, but that's another matter.

The shortcoming lies in random read/write. Each time a data block is addressed, it runs back and forth on the local area network. Although it's only a fraction of a millisecond, high-frequency operations like 4K small files amplify this amount. The feel is obvious: drag a video into the software and then quickly drag the progress bar. Scrub's response is a bit slower than the local SSD, roughly the feel of a local mechanical drive. Scenarios like the "write once, sequential read" scenario of the asset library are more than sufficient; If you want to use it as a system drive or a game board for competitive gaming, give up early.

There's also a rule written only for your own people: this thing is only for playing on the local network. Some forums use it to use it as a public remote NAS device, causing latency to tens of milliseconds, iSCSI timeouts and a "drive drop." On computers, the drive letters disappear and software freezing, similar to the hard drive being powered out.

Three pits, each more hidden than the last

.

Plot one, one LUN, only one computer can connect. After I explained, my cousin's first reaction was, "So if this drive is attached to two computers at home, isn't that basically sharing?" — please stop there. NTFS is not a cluster file system; two machines write to the same disk simultaneously, and the file system's ledger records separately and overwrites each other. At best, the file gets corrupted; at worst, the entire disk is scrapped. Even chkdsk may not be able to save everything. Feiniu's user group permissions and the list of allowed program initiators in Synology's Target—frankly, they're all helping you guard this line. If multiple machines really want to share files, < a href="https://www.shunot.com/en/nas/1042.html"> obediently use SMB, that's what you're doing.

Pitfall two: you can't see what you put on the NAS side. You stuff this "D drive" fully into your computer, and when you check the file manager on the NAS, you'll find only a large file with a name containing LUN; If you delete 100GB from your computer, the NAS storage pool space remains completely unchanged—the simplified configuration account only counts the actual block written to the file system, while NTFS deleting files only changes the directory and does not notify the underlying layer. Over time, this can become a confusing issue. The troubleshooting approach from the article on Where the Storage Pool Space Goes also applies here. What's worse, one day you accidentally delete this LUN from the NAS management interface, and the entire "drive" evaporates instantly. The Recycle Bin can't save it. accidental deletion rescue methods basically have no effect on the internal data of the LUN—the NAS only deletes one large file, and the 100,000 files inside have never existed for it.

Pitfall 3: The few minutes after the NAS restart are a minefield. On my first night, after finishing the setup, I immediately set it to reboot at a scheduled time The NAS restarted itself at 4 a.m., while I still had a few tasks left to write on the drive. As soon as the NAS disconnects, the drive on the computer disappears instantly, the file I was writing to is instantly corrupted, and a chkdsk pops up on startup. Later, I set rules for both sides: NAS reboot times should avoid my working hours, and if the computer isn't used for long periods, I'd take the drive off first. You need to be even more cautious about power outages. The UPS at home is now protected by both the NAS and optical modem router, so don't let this "local drive" experience a hard power outage.

Who is worth messing with, and who is avoided

? . If . . Two
Is your value worth hanging
The software only recognizes the local drive path (resource library, download tools, legacy software) values, which is exactly iSCSI's main domain
If you want to place a virtual machine disk on a NAS to centrally manage values, virtualization scenarios are designed for it
you simply want to run multiple drives for movies and photos, it's not worth it. SMB sharing is more hassle-free and supports multiple users
If you want to use it as a system drive or install competitive games, random performance and network disconnections won't let you off
or more computers need to use the same batch of files; one LUN per machine is the rule. If you use SMB

just because your computer drive is small and you don't want to open the case, there's actually a much easier way: plug a USB external hard drive into the NAS as a warehouse drive, plug and play without running the system. The path of iSCSI is reserved for those cornered by software that "only recognizes local drives"—like me.

Here's the final order: create a LUN on the NAS, check the streamlined configuration—set up Target, lock permissions—connect the computer to iscsipl to the portal—manage disk management online, initialize and format the files—first try reading and writing small files, then relocate the main file—remember to take the computer offline when not in use. After completing these six steps, your C-drive with the red light alarm can finally catch its breath.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《With insufficient hard drives, iSCSI installed the NAS on the local site, causing three pitfalls in one night》
Article URL: https://www.shunot.com/en/nas/1139.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow