[MB-7307] Couchbase Console disk overview doesn't deref data dir symlink Created: 01/Dec/12  Updated: 05/Nov/13  Resolved: 06/Dec/12

Status: Closed
Project: Couchbase Server
Component/s: UI
Affects Version/s: 2.0-developer-preview-4
Fix Version/s: 2.0, 2.0.1
Security Level: Public

Type: Bug Priority: Critical
Reporter: Quinn Slack Assignee: kzeller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

In the EC2 AMI for 2.0, the data dir is on the large (100GB) EBS partition, but the server is given a symlink to it (underneath /var/lib/couchbase). When it reports the available disk space in the Disk Overview, it seems to report it based on the partition that the symlink is on, not the partition that the symlink dereferences to.

Found a related issue... http://www.couchbase.com/issues/browse/MB-1994

Comment by Quinn Slack [ 03/Dec/12 ]
This appears to be preventing compaction, fyi.

Cannot compact view items/_design/all/main: the estimated necessary disk space is about 6668918434 bytes but the currently available disk space is 2113779712 bytes. (repeated 1 times) compaction_daemon000 ns_1@ 11:12:08 - Mon Dec 3, 2012
Comment by Aleksey Kondratenko [ 03/Dec/12 ]
Please take a look. Looks bad enough for fixing asap
Comment by Aleksey Kondratenko [ 03/Dec/12 ]
IMHO should be allowed for 2.0 given that it prevents compaction from happening
Comment by kzeller [ 06/Dec/12 ]
Added to RN as:

By default the image provided on Amazon EC2 of Couchbase Server may
incorrectly report disk free space in the Couchbase
Web Console. This occurs if your data directory is pointing to a symbolic link.
Comment by Aliaksey Artamonau [ 06/Dec/12 ]
Actually we merged a fix for this: http://review.couchbase.org/23003
Comment by kzeller [ 06/Dec/12 ]
Relabeled "Fix" + This has been fixed in 2.0.
Comment by kzeller [ 06/Dec/12 ]
Added: This has been fixed in 2.0.
Comment by kzeller [ 10/Dec/12 ]
Updated in Release Notes:

In the past, if you used a symbolic link to reference a data directory for
Couchbase Server, when the server determined remaining free disk space, it
only found the free disk space for the partition that contained the symbolic link.
This resulted in two issues: 1) incorrect information in the
Couchbase Web Console, 2) more significantly, it would accidentally inhibit the
data compaction process because of incorrect information free disk space.
This has been fixed in 2.0.
Comment by John Wong [ 05/Nov/13 ]
I'm actually still encountering a problem that this ticket describes exactly. I'm using Couchbase 2.0.1 and I have the entire Couchbase directory moved out from /opt/couchbase to a NFS volume which autogrows /mnt/nfs/couchbase and symlinked back.

Cannot compact view xmshd_fifa/_design/dev_xmshd/main: the estimated necessary disk space is about 1725133984 bytes but the currently available disk space is 665651200 bytes. compaction_daemon000 ns_1@ 15:24:58 - Tue Nov 5, 2013

load [johnwong@easotestdb079 ~]$ df -h /opt /mnt/nfs/couchbase
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Sys-opt 60G 465M 56G 1% /opt
                      363G 316G 47G 88% /mnt/nfs/couchbase

The web GUI is reporting some weird numbers:

Usable Free Space (1.86 GB) Total Cluster Storage (2.91 GB)
In Use (295 GB) Other Data (0 B) Free (-313519279707 B)
Generated at Thu Nov 27 07:11:10 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.