Delete entire directory

3,349 views
Skip to first unread message

Italo Santos

unread,
May 10, 2013, 11:06:09 AM5/10/13
to isilon-u...@googlegroups.com
Hello all,
I have two clusters replicating between them, but I broke this replication and I need remove all replicated data / directory in both clusters.

Anyone knows if possible delete the entire directory replicated (/ifs/replicated)?

Erik Weiman

unread,
May 10, 2013, 11:07:34 AM5/10/13
to isilon-u...@googlegroups.com
Are you planning to resync them?

--
Erik Weiman 
Sent from my iPhone 4
--
You received this message because you are subscribed to the Google Groups "Isilon Technical User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isilon-user-gr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Italo Santos

unread,
May 10, 2013, 11:11:26 AM5/10/13
to isilon-u...@googlegroups.com
Initially, not.

Erik Weiman

unread,
May 10, 2013, 11:21:13 AM5/10/13
to isilon-u...@googlegroups.com
From the target side you will need to do this from the CLI.
You may need to add --force to the end of the command.
All this will do is break the smartlock read-only setting from the data.
If you wanted to delete it all you will want to use the treedelete job.

mavericks-2# isi sync target list
Policy         | Source | Target Path                                 | Run     | FOFB State
---------------+--------+---------------------------------------------+---------+----------------
siq_test | gs-gp  | /ifs/data/siq_depth_folder/siq_target | Success | writes disabled

mavericks-2# isi sync target break --policy=siq_test

!! Breaking a policy's target association will result in a full
!! synchronization of all data. Type 'yes' to continue. (yes, [no])

>>> no

!! Aborting.


The treedelete is like this:

# isi job start treedelete --path=/ifs/data/siq_depth_folder/siq_target
You can run multiple instances of the path argument in a single job.

Monitor the progress via # isi job status -v
If you have snapshots protecting this data you will also have to delete those if you want the space back after the treedelete runs.

Chris Pepper

unread,
May 10, 2013, 11:23:04 AM5/10/13
to isilon-u...@googlegroups.com
Italo,

You can use "rm -Rf /ifs/replicated" or "isi job start treedelete --path=/ifs/replicated" (OneFS 6, at least). TreeDelete is not terribly fast but it is multithreaded and multinode. The quickest way is to manually run multiple 'rm' operations against subdirectories on all nodes.

If you haven't already you will probably need to "isi sync target break POLICYNAME" on the target before you can delete the replica. SyncIQ makes the target read-only when it starts.

Chris

Italo Santos

unread,
May 10, 2013, 1:05:56 PM5/10/13
to isilon-u...@googlegroups.com
Thanks, I'll try this…
Other hand, anyone knows if this JOB can impact the clients access?

Andrew Stack

unread,
May 10, 2013, 1:10:27 PM5/10/13
to isilon-u...@googlegroups.com
Set the treedelete impact to medium or low.  If you have a several million inodes that you are attempting to delete this can have an impact on the cluster as it try's to manage the delete.  So I would do this operation after hours.  If you are dealing with very large data sets with millions of files / directories then imo rm -Rf is ill advised.


--
Andrew Stack
Sr. Storage Administrator
Genentech

Saker Klippsten

unread,
May 10, 2013, 1:22:34 PM5/10/13
to isilon-u...@googlegroups.com
Agreed. I find that TreeDelete is the fastest and you can queue a bunch up to run off hours if need be. But usually We set to high because we are out of space :) and need asap.

Also if you are running snapshots. Make sure to delete those too  before the the tree delete.

-s

Italo Santos

unread,
May 10, 2013, 1:28:57 PM5/10/13
to isilon-u...@googlegroups.com
I'm asking about the impact because I know some other JOBs have impact over the cluster and clients access, but this impact occur because the cluster face concurrency file access.

In my case all data I'll remove haven't access, are just the replicated data I think the CPU impact, setting the JOB impact to MEDIUM, isn't a concern, and all data is in other disk pool so the disk impact is minimum.

I think the rm -Rf in entire directory can do the snapshots growth overly, no? And my snapshots are placed on the same disk pool I'll remove the data.

Chris Pepper

unread,
May 10, 2013, 2:06:20 PM5/10/13
to isilon-u...@googlegroups.com
Sure, it puts load on the system but shouldn't be very disruptive. You can check on running jobs with "isi job status". You can adjust the priority or impact of a single running job with "isi job update".

I have been told that TreeDelete works better on smaller directories, although (at least through OneFS 6.5) it is not parallelized -- just better to do a bunch of TreeDeletes on subdirectories in series than a giant one on the parent.

Chris

Italo Santos

unread,
May 13, 2013, 2:03:51 PM5/13/13
to isilon-u...@googlegroups.com
Thanks for help, I'll try this...
Reply all
Reply to author
Forward
0 new messages