jboyce at meridianenv.com
2013-Mar-05 20:24 UTC
[CentOS-virt] Need to unmount an LV from host system
Greetings - Ok, I made a mistake that I need to fix. Fortunately it is not a destructive mistake, but I need some advice on how to correct the problem. CentOS 6.3 host system named Earth I was creating some new logical volumes within my exiting volume group for a new virtual machine using the LVM GUI. When I created the LV that I plan to use for root partition of the new VM (Bacteria) I mistakenly clicked on the box to mount the LV, and specified the mount point as /. [root at earth ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_mei-lv_earthroot 5.0G 3.9G 880M 82% / tmpfs 5.9G 276K 5.9G 1% /dev/shm /dev/sda1 485M 116M 344M 26% /boot /dev/mapper/vg_mei-lv_earthvar 3.0G 748M 2.1G 27% /var /dev/mapper/vg_mei-lv_bacteriaroot 5.0G 3.9G 880M 82% / I tried to unmount the device, but as shown below, it is busy. [root at earth ~]# umount /dev/mapper/vg_mei-lv_bacteriaroot umount: /: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) I tried to force unmount the device, but that failed also. [root at earth ~]# umount -f /dev/mapper/vg_mei-lv_bacteriaroot umount2: Device or resource busy umount: /: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) umount2: Device or resource busy What other options are there. Is there are way to get this unmounted without having to shutdown my host system and boot into rescue mode. I don't really want to shutdown my active VM's while other staff are working on them right now. Please cc me directly as I only receive the daily digest. Thanks. Jeff Meridian Environmental
On Tue, Mar 5, 2013 at 3:24 PM, <jboyce at meridianenv.com> wrote:> Greetings - > > Ok, I made a mistake that I need to fix. Fortunately it is not a > destructive mistake, but I need some advice on how to correct the problem. > > CentOS 6.3 host system named Earth > > I was creating some new logical volumes within my exiting volume group for > a new virtual machine using the LVM GUI. When I created the LV that I > plan to use for root partition of the new VM (Bacteria) I mistakenly > clicked on the box to mount the LV, and specified the mount point as /. > >So you mounted that new LV as / (or over the existing root) on your host node? You may end up needing to boot to a rescue CD, mount, and rsync files from Bacteria's root to Earth's [real] root. ( I wonder if anything is being written to Bacteria's root since it's mounted over the real root. )> [root at earth ~]# df -h > Filesystem Size Used Avail Use% Mounted on > /dev/mapper/vg_mei-lv_earthroot > 5.0G 3.9G 880M 82% / > tmpfs 5.9G 276K 5.9G 1% /dev/shm > /dev/sda1 485M 116M 344M 26% /boot > /dev/mapper/vg_mei-lv_earthvar > 3.0G 748M 2.1G 27% /var > /dev/mapper/vg_mei-lv_bacteriaroot > 5.0G 3.9G 880M 82% / > > I tried to unmount the device, but as shown below, it is busy. > > [root at earth ~]# umount /dev/mapper/vg_mei-lv_bacteriaroot > umount: /: device is busy. > (In some cases useful info about processes that use > the device is found by lsof(8) or fuser(1)) > >I would have expected you could unmount it given that you're umounting by the device name. Having it mounted on or over root likely makes this a bit finicky.> I tried to force unmount the device, but that failed also. > > [root at earth ~]# umount -f /dev/mapper/vg_mei-lv_bacteriaroot > umount2: Device or resource busy > umount: /: device is busy. > (In some cases useful info about processes that use > the device is found by lsof(8) or fuser(1)) > umount2: Device or resource busy > > > What other options are there. Is there are way to get this unmounted > without having to shutdown my host system and boot into rescue mode. I > don't really want to shutdown my active VM's while other staff are working > on them right now. >Take the advice of the output you pasted ... check the output from lsof and see if you can't narrow down the problem. After you accidentally mounted that LV on root did you change your directory? Something is hanging on to that device.> > Please cc me directly as I only receive the daily digest. Thanks. > > Jeff > Meridian Environmental > > > _______________________________________________ > CentOS-virt mailing list > CentOS-virt at centos.org > http://lists.centos.org/mailman/listinfo/centos-virt >-- ---~~.~~--- Mike // SilverTip257 // -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20130305/e76e5d52/attachment-0006.html>
Gabriele Matteelli
2013-Mar-06 06:55 UTC
[CentOS-virt] Need to unmount an LV from host system
Il 05/03/2013 21:24, jboyce at meridianenv.com ha scritto:> Greetings - > > Ok, I made a mistake that I need to fix. Fortunately it is not a > destructive mistake, but I need some advice on how to correct the problem. > > CentOS 6.3 host system named Earth > > I was creating some new logical volumes within my exiting volume group for > a new virtual machine using the LVM GUI. When I created the LV that I > plan to use for root partition of the new VM (Bacteria) I mistakenly > clicked on the box to mount the LV, and specified the mount point as /. > > [root at earth ~]# df -h > Filesystem Size Used Avail Use% Mounted on > /dev/mapper/vg_mei-lv_earthroot > 5.0G 3.9G 880M 82% / > tmpfs 5.9G 276K 5.9G 1% /dev/shm > /dev/sda1 485M 116M 344M 26% /boot > /dev/mapper/vg_mei-lv_earthvar > 3.0G 748M 2.1G 27% /var > /dev/mapper/vg_mei-lv_bacteriaroot > 5.0G 3.9G 880M 82% / > > I tried to unmount the device, but as shown below, it is busy. > > [root at earth ~]# umount /dev/mapper/vg_mei-lv_bacteriaroot > umount: /: device is busy. > (In some cases useful info about processes that use > the device is found by lsof(8) or fuser(1)) > > I tried to force unmount the device, but that failed also. > > [root at earth ~]# umount -f /dev/mapper/vg_mei-lv_bacteriaroot > umount2: Device or resource busy > umount: /: device is busy. > (In some cases useful info about processes that use > the device is found by lsof(8) or fuser(1)) > umount2: Device or resource busy > > > What other options are there. Is there are way to get this unmounted > without having to shutdown my host system and boot into rescue mode. I > don't really want to shutdown my active VM's while other staff are working > on them right now. > > Please cc me directly as I only receive the daily digest. Thanks. > > Jeff > Meridian Environmental > > > _______________________________________________ > CentOS-virt mailing list > CentOS-virt at centos.org > http://lists.centos.org/mailman/listinfo/centos-virtI don't know if this is usefull to you but you can try one of these: mount --bind olddir newdir or mount -o remount olddir newdir or mount --move olddir newdir Hope this can help you. Sincerely, Gabriele Matteelli
Possibly Parallel Threads
- Resizing est4 filesystem while mounted
- Failing to start or create VM, cannot connect to hypervisor host
- Selecting raw logical volumes during guest VM creation
- how to unmount an NFS share when the NFS server is unavailable?
- Issue with hard links, please help!