1826427 Members
3546 Online
109692 Solutions
New Discussion

DELETING FILES

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

DELETING FILES

OK, I've been in this business long enough, when I come in to work and I can't delete a file. (humor)

OK, I set up a va7100 to store fall back data during a PS conversion. PS conversion went well, now I am removing all data. cd /OLDT01;
exec a rm -ri * and get the following error for only 2 directories.

/OLDT01/app]# rm -r oracle
rmdir: oracle: Cannot remove mountable directory

I am trying to delete all files, then format the autoraid to scrub all data from disks. These are medical records so I need to be sure that data is really gone. Can I be sure that by deleting all files (once I get past this error) and formating the array, that my data is truely gone?
UNIX IS GOOD
8 REPLIES 8
Alan Casey
Trusted Contributor
Solution

Re: DELETING FILES

You can't delete this as this is a mount point of a logical volume.
You need to delete the logical volume to remove it.
Bill McNAMARA_1
Honored Contributor

Re: DELETING FILES

well, lets just say that it is _extremely_ difficult to recover it... if you require military DOD style erase, you should create a new lun on the autoraid and dd if=/dev/zero of=/dev/dsk/cXtYdZ bs=4096k

Because the autoraid is such a beast of an array, I would seriously challenge anyone to be able to recover it - it kindof works like magic where your data is in there! ;)

I'd still do a dd if=/something of=/dev/dsk/autoraid in any case.
It messes it up more than an rm (filesystem based delete)

Later,
Bill
It works for me (tm)
Bill Hassell
Honored Contributor

Re: DELETING FILES

The error is due to the fact that the oracle directory is busy (it's mounted). Directories serve tqo purposes: storing names and inode numbers (files) and also acting as 'glue' to connect other filesystems into the system.

So the correct command would be rm -r oracle/* assuming that there are no . (dot) files in oracle. However, it's infinitely faster just to unmount the filesystem, then newfs the raw lvol. Follow that with lvremove and finally vgremove for all the lvols in the volume. Now this doesn't erase the data so a mediainit is needed once the volume group is removed.

If you are truly concerned, I would use dd to copy something like /stand/vmunix to each physical (raw) disk (wipes out data at front of disk) and then mediainit for each raw disk devicefile.


Bill Hassell, sysadmin
Domenico_5
Respected Contributor

Re: DELETING FILES

hi

have you configured a automount directory?

you must sconfigure it before.

regards
Nobody's Hero
Valued Contributor

Re: DELETING FILES

OK, all my other file systems deleted ok now. I did a rm on data, unmounted, removed lv. But I still have this one file system /OLDT01/app
that has oracle and psfin directories under it that wont delete. So i tried to umount the /OLDT01.. not found in /etc/mnttab
bdf does not show it either.
when I try to mount it... already mounted.

So I can't remove the lv because it is busy and I can't umount it. Not sure what I can do now.
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: DELETING FILES

Never mind, my bag. all is ok.

Thanks everyone, much appreciated.
UNIX IS GOOD
MANOJ SRIVASTAVA
Honored Contributor

Re: DELETING FILES

Hi Robert


The thumb rule is to check whether ther are mountpoint under that direcotry which ahve not been unmounted . You can do a fuser -c /mntpt to know any process holding up the umount and once you ar done you ahve to umount teh mnt point and then delete the parent directory.


Manoj Srivastava
Sean OB_1
Honored Contributor

Re: DELETING FILES

You need to umount the file system that is mounted. Umount it then see if you can delete it.

Also check to see what if anything is using it via fuser -c /directory/name