Can't Delete Files From Full Drive

Status
Not open for further replies.

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
The other day i dumped some large files on my nas that has filled the drive 100%. This supposed to have been temporary but now i every time i delete any files the delete then come back. How can i fix this?.
 

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
Thanks but i've been reading that but i still can't delete, i tried the following.

echo > /mnt/HTPC/Movies/Twister 1996

But i get the following

bash: /mnt/HTPC/Movies/Twister: No space left on device
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Since the path contains a space, you have to put the path in quotation marks. Try
Code:
echo > "/mnt/HTPC/Movies/Twister 1996"
 

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
I've entered that but got this below, not very savy with this stuff lol

bash: /mnt/HTPC/Movies/Twister 1996: Is a directory
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
You need to specify a file, not a directory :)
Replace <somebigfile> with a file name in the directory.

Code:
echo > "/mnt/HTPC/Movies/Twister 1996/<somebigfile>"


If you are using SSH, you can autocomplete with TAB.
 

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
Right i typed the following

echo > "mnt/HTPC/Movies/Twister (1996)/Twister (1996)"

The file i want to delete is an mkv named Twister 1996 that is in the Twister 1996 folder.

I got the following.
mnt/HTPC/Movies/Twister (1996)/Twister (1996): No such file or directory
 

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
Does this have to be done from the nas machine as i'm working from my laptop via shell?.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
You have to add the file extension as well. If you press TAB it will autocomplete for you in SSH.
Should look like that:

Code:
echo > "/mnt/HTPC/Movies/Twister (1996)/Twister 1996.mkv"

Oor "Twister (1996).mkv" at the ende, depending how the file is named exactly.

And don't forget the leading slash / in front of mnt
 

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
Still getting this
bash: /mnt/HTPC/Movies/Twister (1996)/Twister (1996).mkv: No such file or directory

:mad:

Has this got to be typed on the gui in the nas system itself?, im doing this at the moment via the online gui with my laptop.
 

ser_rhaegar

Patron
Joined
Feb 2, 2014
Messages
358
You need to escape the spaces. Like:
Code:
echo > /mnt/HTPC/Movies/Twister\ (1996)/Twister\ 1996.mkv


You may need to escape the parenthesis as well. Easiest way to do this is to use tab auto complete on each section. Tabs may not work in the GUI. Might only work in SSH.

/mn
Tab
HT
Tab
Movi
Tab
Twister
Tab
Twister
Tab

If a tab doesn't auto complete, more than one item starts with what you typed and you can press tab twice to list them.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Doesn't matter where it is typed, should work both in the GUI Shell and SSH Shell.

Can you post the output of:

Code:
ls -al "/mnt/HTPC/Movies/Twister (1996)/"


Edit: Thanks ser_rhaegar, that should get the job done as well.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Holy crap.. how hard is this!?
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Either one of those should do the trick. Double check that you use a leading slash

Code:
echo > /mnt/HTPC/Movies/Twister\ (1996)/Twister\ (1996).mkv

Code:
echo > "/mnt/HTPC/Movies/Twister (1996)/Twister (1996).mkv"
 

voyagerxp

Dabbler
Joined
Sep 26, 2013
Messages
14
Either one of those should do the trick. Double check that you use a leading slash

Code:
echo > /mnt/HTPC/Movies/Twister\ (1996)/Twister\ (1996).mkv

Code:
echo > "/mnt/HTPC/Movies/Twister (1996)/Twister (1996).mkv"

The 2nd code worked a treat thank you my friend, is there any way i can set something to stop me filling the drive to 100% or is it just a matter of keeping my eye on it.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You will have to keep an eye on it yourself. Also realize that once you hit less than 10% remaining in your pool that your ZFS system will slow down. If you are really running out of room then you need to either clean house on your storage or increase your storage.

As for why the second one worked, that is because you have spaces in the file name so you need quotations to keep it together. Also I learned something today, I've never seen echo used to remove a file. I would have used 'rm'.
 

ser_rhaegar

Patron
Joined
Feb 2, 2014
Messages
358
You will have to keep an eye on it yourself.
Would quotas work? Or does a dataset with a quota have the same issue if you fill up to the quota limit? I haven't hit a quota limit yet, but I broke up my datsets with quotas that add up to less than 80% of the pool to keep myself from accidentally filling it.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
I thought once you exceeded 20% fragmentation occur in the longer run which can permanently slow the pool..
 
Status
Not open for further replies.
Top