Deleting files via command prompt

Status
Not open for further replies.

grw

Cadet
Joined
Mar 18, 2018
Messages
3
Hello,

hope it goes into this category. I'm a beginner so sorry in advance for some dumb questions:).

My backup software filled the HDD on my NAS on HP Proliant.
The disk is full and I can't get into it via the network address, through Windows.
I can log in into freenas or work via the screen connected into the HP and a keyboard.

I presume I have to delete some files manually and via the command prompt either from FreeNas or the console.

Could you give me the details on this procedure (I am not so skilled at Linux bud I can use the commands like ls, cd, rm).
Do I presume correctly that I can get "to the files" via the command line?? I need to get into the folder called "mnt" (the mount disk) and then further.


Thank you. If there is already a topic specifically for this, please link it.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Yes, the files are in /mnt/your_pool/the_files but IIRC if you're at 100 % usage rm might not work so you'll have to first truncate some files by doing echo "" > your_file and then when enough space has been freed you can use rm as usual.

Also, do you have any snapshots enabled? because if you do then deleting files will do nothing until you delete some snapshots too.
 

grw

Cadet
Joined
Mar 18, 2018
Messages
3
Thanks for your reply.

I think it is at 100 % unfortunatelly, I will try and see. If it works without the echo command.

For snapshots, I have to check it because I did not set this Nas up.

Or is there any easier way? Would it be easier to boot on my pc into ubuntu and connect the disk from the HP directly and delete the files or it won't work this way?
 

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
If you are accessing from windows download a programming call putty, this will allow you to SSH over to the FreeNAS box and get a command prompt. Once logged in (probably using the root account so be VERY careful with the commands you enter !) you can cd to the folder's you want to work with and start deleting from there with "rm" . To repeat, be VERY careful as using root as you can delete virtually anything.

Sent from my A0001 using Tapatalk
 
Last edited by a moderator:

grw

Cadet
Joined
Mar 18, 2018
Messages
3
I know Putty. Thank you for the tip. How is it different from the command line in the FreeNAS interface?
 
Last edited by a moderator:

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
I know Putty. Thank you for the tip. How is it different from the command line in the FreeNAS interface?
No different really. Just a different way of getting a command prompt on the freenas system
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
download a programming call putty
Just for the sake of giving another option, I've heard strong recommendations for Bitvise as well.
start deleting from there with "rm" . To repeat, be VERY careful as using root as you can delete virtually anything.
Another option would be to use the Midnight Commander--type mc at the command prompt.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
It continues to baffle me as to how the "echo > /path/to/file" works to make space available. Shouldn't those blocks still be referenced by snapshots? Surely the "echo" doesn't modify the snapshot data.
 

Linkman

Patron
Joined
Feb 19, 2015
Messages
219
It continues to baffle me as to how the "echo > /path/to/file" works to make space available. Shouldn't those blocks still be referenced by snapshots? Surely the "echo" doesn't modify the snapshot data.

Bidule0hm mentioned that too... "Also, do you have any snapshots enabled? because if you do then deleting files will do nothing until you delete some snapshots too."
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Ah, I missed that. I could swear I've seen the "echo" trick posted as being successful even if snapshots are enabled. Maybe I'm mis-remembering.
 
Status
Not open for further replies.
Top