0

I have created a virtual machine with mount point of directory stored locally. It is mounted on /dev/sdb as shown below.

NAME                             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                                8:0    0  100G  0 disk 
├─sda1                             8:1    0  487M  0 part /boot
├─sda2                             8:2    0    1K  0 part 
└─sda5                             8:5    0 99.5G  0 part 
   ├─r730bld--04--vm22--vg-root   252:0    0 95.5G  0 lvm  /
   └─r730bld--04--vm22--vg-swap_1 252:1    0    4G  0 lvm  [SWAP]
sdb                                8:16   0  200G  0 disk /var/details
sdc                                8:32   0  200G  0 disk 

I have also added the details for the same in /etc/fstab.

/dev/sdb /var/details xfs rw,user,auto,_netdev 0 0

But after i do the reboot of this virtual machine, mount points are lost and i get below output in lsblk.

NAME                             MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda                                8:0    0  100G  0 disk  
├─sda1                             8:1    0  487M  0 part  /boot
├─sda2                             8:2    0    1K  0 part  
└─sda5                             8:5    0 99.5G  0 part  
  ├─r730bld--04--vm22--vg-root   252:0    0 95.5G  0 lvm   /
  └─r730bld--04--vm22--vg-swap_1 252:1    0    4G  0 lvm   [SWAP]
sdb                                8:16   0  200G  0 disk  
└─QEMU_HARDDISK_QM00002          252:2    0  200G  0 mpath 
sdc                                8:32   0  200G  0 disk  
└─QEMU_HARDDISK_QM00003          252:3    0  200G  0 mpath 

This VM is created on a KVM box. I am not sure if this is a generic bug or problem in my setup.

  • What happens when you run mount -a after the reboot? Do all the entries in /etc/fstab mount? – Raman Sailopal Oct 9 '17 at 13:18
  • it says root:~# mount -a mount: /dev/sdb is already mounted or /var/details busy – CbK Oct 9 '17 at 13:21
  • Check the output of dmesg to see if anything is reported. – Raman Sailopal Oct 9 '17 at 13:23
  • i got only this error in whole output of dmesg. [ 6.616492] device-mapper: table: 252:2: multipath: error getting device. And there was no reference of /var/details or /dev/sdb – CbK Oct 9 '17 at 13:31
  • Why are you using _netdev when the device isn't a network device and therefore doesn't need to wait for the network device to come up? – Raman Sailopal Oct 9 '17 at 13:33
0

Grrr.... yes, there two possible issues to content with, the first being systemd on recent machines, and there I'm sorry to say I have no intention to wonder about that one this week, however, let's look at the second issue:

The recent advice is to make use of the most appropriate /dev/disk/{by-id|by-label|by-partlabel|by-partuuid|by-uuid}, as the order of the devices (especially with friend(?) systemd) might change around. Okay, I have a historical preference to the Solaris and old devfsd naming conventions, but the disk/by- does work.

Adding to that, I'd also advice you to reconsider using a partition, just to have it better recognized than the raw disk as a filesystem. Perhaps even (during the mkfs or a tunefs afterwards) label the partition, that way systemd might behave also a tad better.

0

I have resolved the issue by modifying /etc/fstab using UUID of the disk instead of the name.

UUID="1a1cbf5d-b358-48fe-adf4-aa748b55e6c4" var/details xfs rw,user,auto,_netdev 0 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.