Saturday, 31 March 2012

Remove unused filesystem from linux

On one of the redhat server, found a non-standard filesystem was mounted under /migwork.
From the name, it looks like it was used for some migration work.

check whether the file system is still in use
$ fuser /migwork

No process is using /mitwork, so we can safely remove it.
$ umount /migwork

update /etc/fstab to prevent it from being mounted after reboot.
#/dev/md20        /migwork        ext3        defaults     1 2

check the information about md20
$ cat /proc/mdstat
$ mdadm --detail /dev/md20 | sed -n '/RaidDevice/,$p'

destroy md20
$ mdadm --stop /dev/md20
$ mdadm --remove /dev/md20

mdstat showed these sub disks are from SAN, inform storage engineer to take them back.

No comments:

Post a Comment