• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

LVM ISCSI Physical Volume Not Available After Server Reboot

By admin

Problem 1

After a reboot the LVM volumes located on iscsi disks are not activated. Manually activating with “lvchange -ay” works fine.

Using the _netdev option in /etc/fstab

LVM is started before network initialisation is complete, thus the iscsi disks are not detected by the OS. Use the “_netdev” mount option to instruct the system to delay the mount attempt until network initialisation is complete. Properly formatted /etc/fstab lines for two different iSCSI mount points are shown below:

#device         mount point     FS      Options Backup  fsck
LABEL=data1     /mnt/data1      ext3    _netdev 0       0
LABEL=data2     /mnt/data2      ext3    _netdev 0       0

Problem 2

ISCSI volumes cannott be mounted automatically after reboot in CentOS/RHEL. As you can see below, even the _netdev mounting option has been set on /etc/fstab:

# vi /etc/fstab
LABEL=data /data ext4 _netdev 1 2

FIlesystem fails to get mounted booting by default. Manually mount the device failed with error below:

# mount /dev/mapper/vg_datavg-lv_data /data
mount: you must specify the filesystem type

Enabling “netfs” service

The netfs service is responsible for mounting the network-related file systems listed in /etc/fstab (NFS, iSCSI, SMBFS/CIFS, NCP, or any line with “_netdev” option) AFTER the system starts the network. If this service is not started at boot time, the network-related file systems are not mounted. The netfs service is disabled be default for the normal runlevels 3 and 5:

$ chkconfig --list netfs
netfs           0:off 1:off 2:off 3:off 4:off 5:off 6:off

Without the netfs service running, ‘_netdev’ in /etc/fstab is ignored. Thus to make iscsi volume to use the “_netdev” option, Set the netfs service to be started automatically on the next boot:

For RHEL/CentOS 4,5,6

# chkconfig netfs on

For RHEL/CentOS 7

# systemctl enable  remote-fs.target

Filed Under: CentOS/RHEL 5, CentOS/RHEL 6, Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 6 : How to password-protect single user mode
  2. Maintaining Linux filesystems using “fsck” and “tune2fs”
  3. How to Move Swap From Disk Partition to LVM Volume in Linux
  4. How to Use Udev Rules to Create oracleasm Disks in CentOS/RHEL 8
  5. How To Add New Disk to An Existing Diskgroup on RAC Cluster or Standalone ASM Configuration
  6. How to Migrate CentOS/RHEL 6 iptables Rules to CentOS/RHEL 7 firewalld
  7. How To Disable Ksplice Service on OEL
  8. Downgrading an rpm package to a lower version (using “rpm” command)
  9. How to use “xfs_admin” command to change parameters of an XFS filesystem
  10. What are Reserved User Accounts in MySQL

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ACPI in CentOS/RHEL 7
  • How to Use real-time query to access data on a physical standby database
  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary