Trending Topics

VMware on AWS - How to restore NSX DFW firewall rules to previous state

Image
Customers who uses NSX day-in, day-out would like to have a point-in time restore functionality of DFW firewall rules. Many customer have a large footprints in VMC and make changes to DFW quite often. This feature was missing for long time and we could see its included in recent versions . Let's see how DFW configuration roll back works  NSX DFW configuration has versioning, and it is stored in the NSX Manager.  Every time when someone update DFW configuration, NSX creates one more version but keep storing the previous ones. You can rollback for previous config but reapplying it once again.  You can find the options under Networking & Security tab , > Security > Distributed Firewall . In the right side we see an Actions drop down. Choose View to get to the below screen.  Let’s go through the use case:  1. Original state- default config with no custom rules:  a. There are no saved configurations during last 30 days: In my existing test setup, with the current setting

How to umount when the device is busy

It happens all the time doesn’t it?
You need to unmount a CD or you want to pack away the external drive but when you try to umount it you get the dreaded “device is busy” message.
Wouldn’t it be great if Linux actually told you what was keeping the drive busy?

# umount /media/disk/
umount: /media/disk: device is busy
umount: /media/disk: device is busy

First thing you’ll do will probably be to close down all your terminals and xterms but here’s a better way.
You can use the fuser command to find out which process was keeping the device busy:

# fuser -m /dev/sdc1/
dev/sdc1: 538
# ps auxw | grep 538
johnd 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox


Another handy one is:

umount -l /dev/sdc1

This does a lazy umount which immediately detaches the drive from the filesystem, and then cleans up everything afterwards.
This is especially handy if it’s a networked file system (NFS etc) and the network has gone down.


You can also use:

umount -lfr /mnt/sambamountofboxthatsshutdown

l for lazyness, f for forced unmount for unreachable networked storage, r for just in case unmounting fails remount as readonly

Popular posts from this blog

What is a Sysvol?

HOW TO EDIT THE BCD REGISTRY FILE

AD LDS – Syncronizing AD LDS with Active Directory