[CentOS] iSCSI, windows, & local linux access

Fri Feb 23 15:29:19 UTC 2007
Ross S. W. Walker <rwalker at medallion.com>

> -----Original Message-----
> From: centos-bounces at centos.org 
> [mailto:centos-bounces at centos.org] On Behalf Of Andrew Cotter
> Sent: Friday, February 23, 2007 7:32 AM
> To: centos at centos.org
> Subject: [CentOS] iSCSI, windows, & local linux access
> 
> Hello all,
> 
> I am looking to build a larger array (6TB) using CentOS 4.4 
> to archive 
> data to.  We want to have the Windows server mount this array 
> as a local 
> drive so we were looking at iSCSI to do it.  I have played with it in 
> the past and gotten it to work in this combo, but I have a question 
> about access to the data on the local (Centos) machine.
> 
> If I understand correctly, when I mount the device on 
> windows, I need to 
> format the array in a format that Windows (2003 server) can 
> understand. 

Yes, it will be an NTFS partition, but with the "plus" kernel you can
use the read-only ntfs module to read the data on the Linux side, just
take an LVM snapshot, use the loopback with the sector offset of the
partition in the snapshot lv to mount it locally. Remove the snapshot
when done.

1) Find the offset

# fdisk -l -u /dev/VG/lv-snap

Disk /dev/VG/lv-snap: XXX MB, XXX bytes
255 heads, 63 sectors/track, XXXX cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes

       Device Boot    Start       End    Blocks   Id  System
/dev/VG/lv-snap1        *63    XXXXXX   XXXXXXX    7  HPFS/NTFS

63 sectors = 63*512 = 32256 bytes

2) Mount into the offset using the loopback option

# mount -t ntfs -o loop,offset=32256 /dev/VG/lv-snap1 /mnt

>      Also, iSCSI only allows you to mount the array on one 
> server at a 
> time.  Once I do that and write files to this array, is there 
> anyway to 
> access those files from the local machine (Centos)?  I may want to do 
> things like rsync to another location, copy files to another 
> removable 
> SATA disk, or just plain delete something.

The method above is read-only access, which is what I highly highly
advise. If you want to delete something, delete it on the Windows
server.

Hint: Look at the latest Sharepoint Services 3.0 for fine-grained file
management and look at DFSR for file level replication of Sharepoint
managed files.

Multiple Windows hosts can log into the iSCSI volume at the same time,
but only 1 can mount the NTFS partition at a time, and you would use
Microsoft Clustering to do that.

You can't rsync NTFS partitions, but you could use drbd and scheduled
replication to block-level replicate it. Use drbd without heartbeat,
have it sync up asynchronously using Prot A, once it is sync'd have it
disconnect and run standalone with secondary in wait-for-connect, using
'cron' bring up the connection again, when it is sync'd bring it down
again.


> Is it a choice of the OS so both windows and linux can read 
> it?  Little 
> help with which one then.  I know NTFS is still somewhat in 
> its infancy.

CentOS is a good platform, I use CentOS here to do exactly what you are
talking about. I have Exchange, SQL and Virtual Server running off
iSCSI.

> Any thoughts would be much appreciated!
> 
> Andrew
> 
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.