[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: trying to umount a chroot /dev



On Tue, Aug 21, 2012 at 9:46 PM, Ross Boylan <ross@biostat.ucsf.edu> wrote:
>
> I setup a chroot on a snapshot.  Part of the setup was
> mount --rbind /dev /mnt/chrtest/dev
>
> I have exited the chroot and, I believe, ended the processes I started.
> umount /mnt/chrtest/dev
> gives umount: /mnt/chrtest/dev: device is busy
>
> How can I get this to work?
>
> After reviewing the output of mount I umounted the mounts below /dev,
> which seems to be the main advice on the net for undoing rbinds.
>
> The net also mentions using lsof to see what is accessing the file
> system.  lsof isn't much help because it shows everything that is
> touching /dev (I presume--it's a long list), and I can't shut all that
> down without a reboot.
>
> My ultimate goal is to destroy the snapshot, but neither lvremove nor
> lvchange -an work with the volume "in use".

Since you used "rbind", you must also have mounted
submounts/subdirectories of "/dev" like "its" and "shm". Try
umount-ing "/dev" with "-l" or umount-ing all three.


Reply to: