iSCSI after reboot

Status
Not open for further replies.

janr

Cadet
Joined
Aug 2, 2011
Messages
3
Hi,

I have one large volume called Backup (UFS) and one iSCSI file extent called backups (/mnt/Backup/backups). I believe istgt is started before the Backup volume is mounted because when I ssh in to the freenas box and umount the Backup volume I find a newly created backups extent. After every reboot I have to restart istgt so it picks up the right file.

Any idea how to fix this?
 

janr

Cadet
Joined
Aug 2, 2011
Messages
3
For what it's worth, it doesn't happen when I make it a ZFS volume.
 

aviegas

Dabbler
Joined
Aug 14, 2011
Messages
16
I think I know what's going on, as I'm having the same problem: during boot istgt is starting BEFORE the UFS volume is mounted. The result is that istgt sees the mounting point as the actual filesystem.

I have the following scenario:
- FreeNAS 8 (happens the same with RELEASE and BETA4)
- Running under VMWare ESXi (4.1U1)
- 2x 2TB disks (in raw moode) in a UFS raid1 (mounted at /mnt/rvolume01)

Stopping istgt and unmounting the raid volume, I see that there is a placeholder extent file (with the correct size) under the mounting point, thus explaining the whole behavior:

- After boot, another VMWare instance can see the target but it looks empty (as it is pointing to the placeholder).
- If I connect to it under Windows 7, the target is reported as uninitialized (same as being empty), that is consistent with what VMWare finds.
- If I restart istgt, now it picks the real volume and things work well.

Any known workaround for this issue?

And yes, it does not happen with ZFS (not an alternative at this time for me).
 

aviegas

Dabbler
Joined
Aug 14, 2011
Messages
16
Nice to see a ticket for it. I did some checking and it's probably a question of timing and it will depend how long it takes for the disks to initialize and be mounted, so depending on the configuration it may work or not. I've been checking other threads and I've seen at least one report stating that it works "most of the times" for a particular configuration, so it means that the timing is somewhat boderline.

I've checked the ix-istgt script and it has all the components to prevent the problem. The config files are written by the script so it knows all the targets and the extent locations. So it is quite simple to check if the filesystems where the target extents are mounted or not. If not, give it more time to mount and even if after some reasonable time it's not mounted, display a reasonable message.
 

aviegas

Dabbler
Joined
Aug 14, 2011
Messages
16
Good to know.
Question: is it waiting for the filesystem to mount or was a simple delay added?
 
Status
Not open for further replies.
Top