UFS How to mount an iSCSI block device?

Hello!

I got this in /etc/fstab

/dev/ufs/iscsi_freebsd /mnt/iscsi ufs late,rw 2 2

but during boot I get kernel error, probably because the iSCSI subsystem is not up yet
when FreeBSD tries to mount /mnt/iscsi. If I mount it manually after the boot, it works.

Could you please tell me what is the proper way to mount iSCSI block devices? Thanks!

br,
KK
 
/dev/ufs/iscsi_freebsd /mnt/iscsi ufs late,rw 2 2
Maybe instead of late you could try failok flag.

Another way around the problem is use rc.conf and netwait.
Wait on bootup for iscsi IP to come up.

### Network link/usability verification options
netwait_enable="NO" # Enable rc.d/netwait (or NO)
#netwait_ip="" # Wait for ping response from any IP in this list.
netwait_timeout="60" # Total number of seconds to perform pings.
#netwait_if="" # Wait for active link on each intf in this list.
netwait_if_timeout="30" # Total number of seconds to monitor link state.
netwait_dad="NO" # Wait for DAD to complete
netwait_dad_timeout="" # Total number of seconds to wait for DAD, zero
# or unset to autodetect
 
I'm curious about the kernel error... because if this happens during boot I can't help but wonder if this could be a driver issue. Although the kernel can automatically load required kernel modules, this proces behaves a bit different during boot; and it's good practice to add kernel modules that are needed during boot phase to /boot/loader.conf so that they get loaded right away.

Do note: this is a guess on my end.
 
I got this in /etc/fstab

/dev/ufs/iscsi_freebsd /mnt/iscsi ufs late,rw 2 2
My way is different. I use the iSCSI IP/path as device. You are using a UFS device label.
late with faiilok should work.
Personally I would add a mountpoint directory outside of /mnt.

/etc/rc.local is a good choice for problems.. Add some sleep time to this before if still troublesome.
 
Back
Top