Not enough space for upgrade error

Hey guys! I own a 3 TB my cloud and i have this bit of an issue. When i try to update to the latest firmware it says Device does not have enough space for upgrade. (370002). I have messed it up with putty some time ago. Installed transmittion. changed sudoers, SSH users ( I added my user to ssh access users), and changed root password. Anyway now when i try to update my firmware it gives me that message. I tried updating through SSH as well but the same message appears. I even put the update file on my public folder and tried to update from it and still nothing.

Can you guys please tell me how to restore it back to defaults and still keep my data.

I think when you update your firmware it deletes all the settings that you made on debian and just keeps your files. correct me if im wrong

The HDD has 250 GB free

1 Like

Likely you have been filling the  /dev/md1: 2047 MB. partition with logs and stuff.

Before undertaking a full restore you could/should perhaps try to use the -du command to find where the garbage is so you can remove it.

BE EXTREMLY CAREFULL NOT TO TOUCH/DELETE CRITICAL SYSTEM FILES

 This may be a good starting point:

 10 Useful du (Disk Usage) Commands to Find Disk Usage of Files and Directories

 

Directories to look for could be /home/whatever_users_you_have_created

 

Eventually /root (root user home).

Can you please tell me how to access /dev/md1 because there is no such directory here. (I accessed with SSH and used cd /dev/md1/. I am not that good with linux commands i guess…

Both /root and /home are empty

Don’t worry about “how to access /dev/md1”. Mount points appear mingled.

If you perform a df -h command something like this should show up:

Filesystem Size Used Avail Use% Mounted on
rootfs          1.9G 939M 887M 52%    /

etc…

If you have little available space in the rootfs you will know that is likely the problem.

Again, check this out:

12 Useful “df” Commands to Check Disk Space in Linux

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       1.9G  666M  1.2G  37% /
tmpfs            23M  448K   23M   2% /run
tmpfs            40M  4.0K   40M   1% /run/lock
tmpfs            10M     0   10M   0% /dev
tmpfs           5.0M     0  5.0M   0% /run/shm
tmpfs           100M  184K  100M   1% /tmp
ramlog-tmpfs     20M  2.9M   18M  15% /var/log
/dev/sda4       2.7T  2.4T  261G  91% /shares

so how do i free up space from /dev/root?

“so how do i free up space from /dev/root?”

Drop that idea. Judging by what you copy&pasted that does not seem to be the issue. You should have enough space there.

So any other ideas of what should I do to get it to update. Or restore its linux system to default state without deleting my files.

Your problem should lie in here somewhere:

# check disk usage
dfout=df | grep /DataVolume
avail=echo "$dfout" | awk '{printf("%d",$2-$3)}'
if [“${avail}” -lt “${fwUpdateSpace}”] && [“${system_boot_type}” != “flash”]; then
error=“failed 201 "not enough space on device for upgrade"”
echo ${error} > /tmp/fw_update_status
pre-update_error $error

 

Now you just need someone to decrypt that for you  :smiley:

and you will have your course of action.

 

Actually, judging by the content of updateFirmwareFromFile.sh whatever you have in the rootfs shoud not be a problem since it seems it will overwrite everything.

1 Like

Device does not have enough space for upgrade. (370002)

thats the error i get. in the script it only says the message but not the code. maybe the code can tell us what the problem is? even though WD has to tell us what the code means?

 Anyone else guys?

(thanks hvalentim for your help and your time. appreciate it.)

Sounds like you run out of space on your /datavolume which is your main user partition/drive. Try free some space from your shares, guessing 700mb - 1gb should be enough.

You can issue the command
df
This will show global usage of your nas drive.

I have 10% out of 2.7 TB free…which means 280 GB.  df command output is a bit more up if you read the topic.

Filesystem      1K-blocks       Used Available Use% Mounted on
/dev/root         1968336     625508   1242840  34% /
tmpfs               23056        328     22728   2% /run
tmpfs               40960          4     40956   1% /run/lock
tmpfs               10240          0     10240   0% /dev
tmpfs                5120          0      5120   0% /run/shm
tmpfs              102400        152    102248   1% /tmp
ramlog-tmpfs        20480       2832     17648  14% /var/log
/dev/sda4      2879644152 2547715344 273417776  91% /shares

The script is specifically looking for a line containing “DataVolume” in the df command.

But your output does not have that line?

In fact, if you’re including the ENTIRE output of df, there’s lots of stuff missing.

Here’s mine, for comparison:

CloudNAS:/usr/local/sbin# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1968336 631400 1236948 34% /
/dev/root 1968336 631400 1236948 34% /
tmpfs 23296 3648 19648 16% /run
tmpfs 40960 64 40896 1% /run/lock
tmpfs 10240 0 10240 0% /dev
tmpfs 5120 0 5120 0% /run/shm
tmpfs 102400 2944 99456 3% /tmp
/dev/root 1968336 631400 1236948 34% /var/log.hdd
ramlog-tmpfs 20480 6720 13760 33% /var/log
/dev/sda4 1918217296 1359388864 519852496 73% /DataVolume
/dev/sda4 1918217296 1359388864 519852496 73% /CacheVolume
/dev/sda4 1918217296 1359388864 519852496 73% /nfs/TVShows
/dev/sda4 1918217296 1359388864 519852496 73% /nfs/Public
/dev/sda4 1918217296 1359388864 519852496 73% /nfs/Movies2
/dev/sda4 1918217296 1359388864 519852496 73% /nfs/TivoFiles
/dev/sda4 1918217296 1359388864 519852496 73% /nfs/Movies1

 The fact that it’s not finding DataVolume means the AWK command is returning “nul,” which gets interpreted as NO space.

You can manually mount DataVolume with:

mount -o noatime /dev/sda4 /DataVolume

…and see if that gets you anywhere.

1 Like

Thats what i got from :

KetseCloud:~# mount -o noatime /dev/sda4 /DataVolume
mount: /dev/sda4 already mounted or /DataVolume busy
mount: according to mtab, /dev/sda4 is already mounted on /DataVolume

and df

KetseCloud:~# df
Filesystem      1K-blocks       Used Available Use% Mounted on
/dev/root         1968336     625508   1242840  34% /
tmpfs               23056        328     22728   2% /run
tmpfs               40960          4     40956   1% /run/lock
tmpfs               10240          0     10240   0% /dev
tmpfs                5120          0      5120   0% /run/shm
tmpfs              102400        152    102248   1% /tmp
ramlog-tmpfs        20480       2832     17648  14% /var/log
/dev/sda4      2879644152 2547715344 273417776  91% /shares

gasketse wrote:

Thats what i got from :

KetseCloud:~# mount -o noatime /dev/sda4 /DataVolume
mount: /dev/sda4 already mounted or /DataVolume busy
mount: according to mtab, /dev/sda4 is already mounted on /DataVolume

and df

 

KetseCloud:~# df
Filesystem      1K-blocks       Used Available Use% Mounted on
/dev/root         1968336     625508   1242840  34% /
tmpfs               23056        328     22728   2% /run
tmpfs               40960          4     40956   1% /run/lock
tmpfs               10240          0     10240   0% /dev
tmpfs                5120          0      5120   0% /run/shm
tmpfs              102400        152    102248   1% /tmp
ramlog-tmpfs        20480       2832     17648  14% /var/log
/dev/sda4      2879644152 2547715344 273417776  91% /shares

if mtab is showing it (which is a symlink to /proc/mounts) but df is not, then it’s out of my league!

What are all the options shown in /etc/mtab for that line?

Mine shows:

/dev/sda4 /DataVolume ext4 rw,noatime,nodiratime,user_xattr,barrier=0,data=writeback 0 0

1 Like

Sorry I kinda lost you. Which command did you use for that output? :

/dev/sda4 /DataVolume ext4 rw,noatime,nodiratime,user_xattr,barrier=0,data=writeback 0 0

That’s the line in /etc/mtab

So anyone with a better idea of what the problem might be?

/dev/sda4      2879644152 2547715344 273417776  91% /shares

V.S.

/dev/sda4      2879644152 2547715344 273417776  91% /DataVolume

 

I can’t recall but I believe in the latest firmware “/shares” is now a symlink. Are you able to access your data since the system mounts not reporting them?

You may try below see if it helps:

  1. CD to root (incase PWD is on /dev/sda4) and force unmount all the /dev/sda4 shares you can find in /etc/mtab e.g.

    umount -fl /DataVolume

    umount -fl /shares

If you get any “Device or resource busy”, use command “lsof /shares” to locate the pids. Using the results, you may want to manually 9 (PID) e.g.

kill -9 `lsof /DataVolume | grep '\d' | grep -v $$ | awk {'print $2'}` >/dev/null 2>&1

 , then try re-unmount again.

  1. Mount back to the correct path:

    mount /dev/sda4 /DataVolume

  2. Try the upgrade…

Yes I can see all my files normally. I am not home atm but I am going to try what you told me later today. Ill let you guys know! thank you for your time!

So that didnt work…I unmounted the Data Volume and Shares…still same error…any other ideas?