How can I mount iSCSI devices in /etc/fstab at boot time in RHEL?

https://access.redhat.com/solutions/3889

 

How can I mount iSCSI devices in /etc/fstab at boot time in RHEL?

 SOLUTION 已验证 - 已更新 2017年三月30日11:19 - 

English 

环境

  • Red Hat Enterprise Linux 3
  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • iSCSI devices

问题

  • How to mount iSCSI devices at boot time?
  • Logical Volumes residing on my iSCSI devices are not activated after booting
  • iSCSI volumes are not getting mounted after rebooting system
  • After reboot iSCSI LVM volumes does not appear/visible and lvs status is offline.
  • SAN based FS not auto mounting after reboot.

决议

  • To mount iSCSI LUNs in /etc/fstab, add _netdev to the mount options near the end of the line. Properly formatted /etc/fstab lines for two different iSCSI mount points are shown below:

    Raw

    #device         mount point     FS      Options Backup  fsck
    LABEL=data1     /mnt/data1      ext3    _netdev 0       0
    LABEL=data2     /mnt/data2      ext3    _netdev 0       0
    
  • Note: If the file system being mounted exists directly on the device (i.e., does not use LVM), then the use of labels as in the example above is recommended.  Device ordering may change each time the iSCSI devices are presented, and either LVM or labels can ensure that the correct device is mounted.

  • The netfs service also needs to be enabled at boot time, as it is responsible for mounting devices that use _netdev:

Raw

 RHEL 4, 5, 6

# chkconfig netfs on

RHEL 7

# systemctl enable  remote-fs.target

转帖者注:

1.从上面来看,RHEL4、5、6下的netfs服务都等于RHEL7下的remote-fs.target

2.remote-fs.target服务对应哪些文件系统呢?目前能确定的是NFS、iscsi(IP-SAN),存疑SAN的是FC-SAN。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值