McLean IT Consulting

WORRY FREE IT SUPPORT

Call Us: 250-412-5050
  • About
  • Services
    • IT Infrastructure Design
    • Remote & Onsite IT Support
    • Disaster Recovery
    • IT System Monitoring
    • IT Audit
    • Documentation
    • Medical IT Solutions
    • Wireless Networks
    • Cloud Computing
    • Virtualization
  • Partners
    • Lenovo
    • Ubiquiti Networks
    • Dragon Medical Practice Edition (Nuance)
    • Synology
    • Drobo
    • Adobe
    • Bitdefender
    • NAKIVO
  • Contact
  • Blog
  • Remote Support

Reclaiming iSCSI Space After Deleting on Synology NAS

November 15, 2017 By Andrew McLean 3 Comments

A few days back I phased out an old iSCSI backup repository, which I was using as a temporary measure while I worked on a more robust backup solution. It did the job alright but iSCSI gets a bit finicky with latency, so WBADMIN backups to an iSCSI volume can take a lot longer unless everything is ideal as in lab conditions. In general I don’t recommend it. At least not long-term.

Anyway so part of the phase-out process involved deleting the iSCSI target and LUN from the Synology NAS, which is easy enough to do. But today I noticed that the Storage Manager still claimed the LUN was still consuming the same amount of space it always did. I had expected it would take a while for the DSM software to reflect the new available storage, but it should have updated this long before now. Some recommendations out there was to simply reboot the unit, which I had already done more than once in the interim, which obviously had no effect.

A quick search on the Synology forum revealed a nice quick solution — though it’s still unclear why the space wasn’t automatically recovered to begin with, here’s the method to delete the LUN manually (thanks to Synology forum user mugz):

  • Enable SSH service via the Terminal & SNMP tool in the Control Panel.
  • Log into the Synology as user “admin” using the appropriate password.
  • ‘sudo -s’ for root shell
  • Confirm there are no iSCSI LUNs in Storage Manager.
  • Stop the iSCSI service:
    /usr/syno/etc/rc.sysv/S78iscsitrg.sh stop
  • Remove files in folder and in subfolder /volume1/@iSCSI/
    rm -rf /volume1/@iSCSI/*
  • Start the iSCSI service again:
    /usr/syno/etc/rc.sysv/S78iscsitrg.sh start
  • Log out of the Synology

mugz also mentions deleting /var/db/iscsi/EP_JNL, but I could find no record of this file, so I could not say for sure whether it is necessary under normal circumstances. Arguably the DSM should be able to recover the data without having to resort to such brute-force measures, but if computers always did what they were supposed to, I wouldn’t have a job.

Filed Under: Tips

Comments

  1. JJ_R says

    October 30, 2018 at 6:58 pm

    Hi there,

    Have you figured out how to reclaim space from a Synology iSCSI LUN after you’ve deleted data and zeroed out the space (sdelete)?
    I couldn’t get this working for me. I’ve been trying to use the best of both worlds: the management simplicity of a Synology NAS and the robustness of Windows block-level deduplication for (mostly) lab VM storage: Create large, thin-provisioned iSCSI LUNs, present them to Windows Server 2019 (with Hyper-V), format the LUNs with ReFS or NTFS and deduplicate them on nightly schedules….then store VMs and VHD/VHDX files there…but if space can’t be reclaimed, it would be a bummer.
    Thick provisioning is not what I had in mind….

    Reply
  2. Jason from Toronto says

    May 11, 2019 at 8:56 pm

    thanks! it works for me!

    Reply
  3. Stein says

    May 4, 2020 at 11:54 am

    Thanks worked for me ;-)

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Contact Us

McLean IT Consulting Inc.
Serving Greater Victoria

P: 250-412-5050
E: info@mcleanit.ca
C: 250-514-2639

Featured Article

Save By Going Green

I've mentioned in the past that I specialize in "Green Computing" and I thought I should explain what that means. Essentially it turns hardware … Continue Reading

Blog Categories

Our Mission

We seek to enrich and improve small and medium businesses by delivering best-in-class technology solutions, and offering a premier customer service experience. Contact Us Now!

Quick Menu

  • About
  • Testimonials
  • Contact
  • Blog
  • Sitemap

Let’s Get Social

  • Email
  • Facebook
  • Google+
  • LinkedIn
  • Twitter
  • YouTube

Copyright © 2021