You are not logged in.

#1 2012-11-23 20:55:19

struthio
Member
Registered: 2005-11-07
Posts: 28

Create mirrored iSCSI target

hello,

I a bit ArchLinux fan. Recently I wanted to create specific NAS that allows iSCSI connection for disk mapping on other computer (running windows). I would like a bit 'advanced' configuration and would like to ask for help.

I want to put in my box 2 x 1TB hard drive, and those drive should mirror itself (so 1TB will be only available but with full backup).

BUT, I would like to:
1. Forward whole drive (block device) to as iSCSI Target (and I will attach this drive to Windows, Partition if from windows and put there NTFS)
2. When I disconnect one of 1TB drive and connect to Windows PC it should be recognized without problems as normal drive and display partitions etc.

In firstplace i thought about mdadm but as far as I know mdadm stores special data on disks about raid configuration, which I think will not be correctly recognized by windows.

Second thought was create iSCSI device for both 1TB drives and create software RAID inside windows, but this is not solution I want since this will double transfer over LAN.

So summing up, I would like to create target for 1TB and then have some 'process' that will dynamically and online do something like
dd if=/dev/disk1 of=/dev/disk2 .... *but ofcourse not by dd wink*

Can you know how to create such nas undex ArchLinux ?

Offline

#2 2012-11-24 11:08:00

teekay
Member
Registered: 2011-10-26
Posts: 270

Re: Create mirrored iSCSI target

You could create a mdraid1 on the server, and export /dev/md0 as iscsi target.

Offline

#3 2012-11-25 22:15:09

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,296
Website

Re: Create mirrored iSCSI target

RAID-1 devices handled by mdadm do not do anything "special" to the underlying drives. You can take 1 and plug it somewhere else and it will appear "normal" [1]

To be able to pull 1 drive and plug it to Windows, and expect Windows to "just work" with it, you'll obviously need to have it formatted as NTFS or FAT. I've never heard of anyone creating an NTFS formatted Linux RAID array, and while in theory it should work, I would never do that. The NTFS-3G driver under Linux is good, but I wouldn't trust it for important data like backups. I don't even trust the genuine Windows NTFS driver with my backups. Use an ext file system and install an ext driver on your Windows machine.

[1] As long as your partition table type is set to the correct file system type instead of 'fd'

Last edited by fukawi2 (2012-11-25 22:16:13)

Offline

Board footer

Powered by FluxBB