How to Clear space on the / mount on Linux (Openfiler NAS Install - rpath)

Hi Guys,

I have a customer that installed a version of Openfiler 2.99 as a VM on an ESXi Server, he has a little bit of IT knowledge which as we all know gets people in trouble.

Anyway all has been going well with this install but the other day he rang and said the shares had stopped working getting errors when he tried to access them from his windows server.

I started to have a look around and eventually found that the / mount was 100% which i am sure might be causiung the issue.

Anyway as i am not a Linux Expert, i need some help in clearing space.

When i have setup these in the past advise given to me by my Linux expert which i cant get in touch with at the moment was always to make a /var/log mount for all the logs to go into rather then letting logs build up in the / mount and i presume getting in trouble like this.

My Customer did not set this up when he installed openfiler at the start so my understanding is that all his log files are going into the / mount which might have filled up.

I can use WinSCP to get into the Install and can see everything but i am unsure what to delete/move etc

Can someone please let me know how to handle this.

Thanks Adam
Who is Participating?
nociConnect With a Mentor Software EngineerCommented:
if du (disk usage) command is installed you can more easily drill down where the biggest files are:

cd /
du -s | sort -n

should give you a list of files and directories in increasing space usage. (including all subdirectories).
this might take a while if there are a lot of files. Some directories you cannot do anything about so
if you already have a suspect like  /var
cd /var
du -s | sort -n

that should tell you were most space is taken.
Having ALL in one filesystem is in general not a wise decision.
Use a different file system for file storage
and also preferably for /var.

if the main storage is also in the root filesystem best is probably pull all data from the device and set it up again
as shrinking filesystems is very hard to do.
vgs should tell you if there is still space free
if there is space the solution is easy,
  reboot in single user mode
  create a lvm volume for /var
  initialise a filesystem on it with mkfs
  add filesystem to /etc/fstab so after reboot the filesystem will be mounted on /var
  mv /var /scratch
  mkdir /var
  mount /var
  mv /scratch/* -> /var
  (the last command may fail if there are active services that use /var, hence single user mode)

if there is no free space on the lvm storage .... you need to somehow create it first.
cdsausAuthor Commented:
Status System Volumes Cluster Quota Shares Services Accounts

System Information: mca-nas03.carrumdowns.mcaaccountants.local (
System Vital
Canonical Hostname mca-nas03.carrumdowns.mcaaccountants.local
Listening IP
Kernel Version 2.6.32-71.18.1.el6-0.20.smp.gcc4.1.x86_64 (SMP)
Distro Name  Openfiler NAS/SAN  
Uptime 2 days 12 hours 26 minutes
Current Users 1
Load Averages 0.00 0.00 0.00

Network Usage
Device Received Sent Err/Drop
lo 9.36 KB 9.36 KB 0/0
eth0 111.62 MB 179.21 MB 0/0
 Hardware Information
Processors 1
Model Intel(R) Xeon(R) CPU X5355 @ 2.66GHz
CPU Speed 2.66 GHz
Cache Size 4.00 MB
System Bogomips 5320
PCI Devices - Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI
- Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
- Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
- IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE
- ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA
- PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge
- (32x) PCI bridge: VMware PCI Express Root Port
- PCI bridge: VMware PCI bridge
- SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
- System peripheral: VMware Virtual Machine Communication Interface
- VGA compatible controller: VMware SVGA II Adapter
IDE Devices none
SCSI Devices - NECVMWar VMware IDE CDR10 (CD-ROM)
- VMware Virtual disk (Direct-Access)
- VMware Virtual disk (Direct-Access)
USB Devices none
Memory Usage
Type Percent Capacity Free Used Size
Physical Memory   13%  3.35 GB 526.48 MB 3.86 GB
- Kernel + applications   6%    217.68 MB  
- Buffers   3%    116.82 MB  
- Cached   5%    191.97 MB  
Disk Swap   0%  2.00 GB 0.00 KB 2.00 GB
Mounted Filesystems
Mount Type Partition Percent Capacity Free Used Size
/mnt/volgroup00/volgroup00_data1 ext3 /dev/mapper/volgroup00-volgroup00_data1  89% (1%) 36.58 GB 524.73 GB 591.35 GB
/boot ext3 /dev/sda1  5% (10%) 438.73 MB 22.33 MB 486.16 MB
/ ext3 /dev/sda3  100% 0.00 KB 1.87 GB 1.87 GB
/dev/shm tmpfs tmpfs  0% (1%) 1.93 GB 172.00 KB 1.93 GB
Totals :    88% 38.94 GB 526.63 GB 595.63 GB
This is what the openfiler webgui shows, as you can see the / (/dev/sda3) is 100%
Aaron TomoskyTechnology ConsultantCommented:
FYI, openfiler hasn't been updated in waaaay too long. If he wants to play with this sort of thing, I'd suggest either zfsguru or freenas.
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

compdigit44Connect With a Mentor Commented:
The follow link shows how to search for all files in Linux that are large than a given size...

Also in /var/log if you do a ls -al what is the size of wtmp
Duncan RoeConnect With a Mentor Software DeveloperCommented:
du -s only shows the size of the current working directory, at least on my system.
I use the following script to show a sorted list of directory sizes immediately below
11:28:28$ cat ~/bin/vss
find . -mount -type d -mindepth 1 -maxdepth 1 -exec du -sx "{}" \;|sort -n

Open in new window

Also don't forget to get a sorted list of large files in the current directory: ls -lSr
cdsausAuthor Commented:
Resolved by Deleting a heap of Logs in root

Going to look at another NAS solution although i must say apart from this i have been using openfiler for years and never much problems

Thanks Adam
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.