Question about iSCSI vs a simple network share
I'm trying to understand the difference between an iSCSI and a network share. So I've got a NAS device on the network.
When i use a network share, the computer knows that the location is remote. While, when i have an iSCSI target connected, the computer thinks that the target is another Hard Disk that is physically connected to itself. kewl - i get all that.
What I don't understand is the next bit. When i connect the iSCSI target.. my computer sees the new Hard Disk and wants me to format it. er.... waa???????? format it? But its already formatted! and i have data on it already .. just connect to the share and have a look in there.
So that's what I don't understand. Why do we need to format the disk when it's already formatted? If i format it, what will happen with the size of the other stuff? and the existing data?
I understand that, when u create an iSCSI target, u specify the size. So what happens if i specify more size than is free? (eg. we have existing data, remember).....
UPDATE:
FWIW, the NAS is a Synology DS211.
First, the word format
is a holdover from ancient times. What it means these days is to initialize the file system (file systems are just data on the disk for keeping track of your files). Modern disks are permanently formatted, you can't actually change the on disk format as you could (and had to do) 20+ years ago.
The NAS device almost certainly runs some proprietary or Linux OS; so the file system is likely EXT3 or some other FS that Windows doesn't read/recognize.
When you attach the disk via iSCSI Windows doesn't recognize the file system and deems it necessary to format the disk. Also, the "disk" your attaching to doesn't necessarily have to be a phystical disk. It might be a file in the existing file system; it could be a reserved block section of the disk pool (ZFS can do this notably); or it might be some logical/physical disk(s).
NAS devices typically export file systems over IP; such as CIFS/SMB, AFS, or NFS. SAN devices typically export block storage over the network, such as FC/FCoE, iSCSI, or ATAoE.
They both provide access to storage over the network. The difference is that a standard network share (SMB, CIFS, AFS) typically share at the file level, whereas iSCSI shares storage at the block level.
You can think of iSCSI-attached storage as if you're adding another hard drive to your system.
Because iSCSI is raw storage, you will need to create a filesystem on it before using it.
When you create an iSCSI share, the NAS is likely creating a disk image on its filesystem that will be associated with the iSCSI target. All IO bound for this specific target will be constrained to within that disk image.