Is it possible mount a fake disk or virtual disk?

Hi everyone, would it be possible to create a virtual disk with a large fake space or something like that and mount it on nextcloud? I am using ubuntu server 20.04. The purpose is to give a large false space to the client to whom I have configured nextcloud, I want to give something like virtual 10TB I already know that he will not use all this space but I would like to make a good impression. I will go to increase the real HDDs only when the client really begins to fill at least half of the virtual space. What do you think, is there any tool that can help me?

Thanks for the replies

That sounds like a terrible idea and you shouldn’t do that! I don’t even know if it can be done…

But you could remove the monitoring app and hope that the customer doesn’t figure out how to install it again. Then he can’t see that the effective storage is much smaller than what he pays for :stuck_out_tongue_winking_eye:

No seriously! Don’t do any of that!

And I sincerely hope that you have a storage concept that is easy to expand, has a certain redundancy and you already know how you are going to expand it, when the customer actually wants to use the storage you have promised him. Backups would be another thing that you have hopefully thought about and that you also have extensively tested, especially if you host data from customers.


it must be clear that I do not want to scam anyone, I want to give real space to my customers only when they really need it! I want to sell more space than I really have in the company just to not have big start-up costs for the service, I want to do what the banks do, they can afford to lend a lot of money just because the money belongs to other users XD, my users pay me and if they want they can use all the space, I don’t scam them, but 95% of users buy a big space just to be fanatics in front of their friends / competitors and then leave it empty. In these cases, I can avoid throwing large quantities of gigs into the bin. What do you think google drive does? Google drive gives you 15gb but until you deposit files inside the folder you don’t actually have a space reserved for you, the space is reserved only when you deposit files.

If you use a file system like ZFS or a volume manager like LVM, you can create multiple datasets or volumes on a pool of disks or on a single disk. But even with that you cannot do what you asked for in your initial post. If your pool or disk has a a physical size of 10TB and you create multiple datasets or volumes on that disk, then each dataset has indeed a size of 10TB. But a single dataset cannot have more storage space than what is physically available on the underlying disks. What you want to do is only possible with some dirty hacks, if at all.

If you want to do similiar things like the big hyperscalers do and be able to scale out as needed, you should start looking in distributed filesystems like Gluster or Ceph. You can do similiar things with ZFS, Btrfs or LVM to some extent. But with a standard file system like ext4 (without LVM) in a single server with a bunch of disks you are somewahat limited, when it comes to expand storage or even scale it out to multiple servers. Sure even a standard RAID 5 or 6 can be expanded if there is enough room and interfaces for additional disks in the server. But something like this is not near as flexible as a distributed object storage like Ceph. And no offenese, but to me it sounds more like you have an Intel NUC or similiar with a 500GB SSD and want to add a 10TB USB disk at some point. :wink:

You can use something like that.

How to create virtual block device (loop device/filesystem) in Linux – The Geek Diary

Yes, but you can’t create a file with DD that is bigger than the physical disk you want to create it on. This is what happens when you try to create a 1TB file with DD on a 32GB disk…

dd if=/dev/zero of=loopbackfile.img bs=1000M count=1000
dd: Error writing 'loopbackfile.img': There is no more space available on the device.

why do you think i have a intel nuc? i have nextcloud installed on ubuntu server, ubuntu server is a virtual machine installed in proxmox , proxmox is installed on a server Dell poweredge R710. I have only panel with nextcloud in the server , data of my customers are linked to nextcloud with some nas Qnap. I have this configuration for now, when i will have more customers i will improve all… could you recommend me a better configuration for the moment? I accept advice …
PS. thanks for intel huc :frowning:
WhatsApp Image 2021-10-09 at 10.46.42

i have 3 nas , 2 HDD SAS on my dell r710

The saying about the NUC was just a quip to make a point, because otherwise I see no reason to try what you are trying to do.

Then you should imho give your customer the space you sold. Btw. these NAS boxes are nice for a homelab, or for the internal needs of a small business, but probably not what you should use if you sell hosting services and want to be able to scale out… And certainly not what big hyperscalers like Google are using :wink:

Anyways I tried to explain to you how the principle of “overprovisioning” of storage space could work in theory. (Disclaimer: I’m not a professional when it comes to enterprise storage.) And unfortunately it doesn’t work the way you imagined it and no professional hosting provider would try to do something like what you asked for in your initial post. That much I can say for sure.

Good luck.

and what should i use instead of nas for more professional management?

Such a project does not start with a specific device, but with a plan and a catalogue of requirements. After that, you can evaluate what kind of device(s) and which software you need to acomplish your goals.

You could certainly do some things with your existing equipement…

If you give your server enough storage to host a few Netxloud instances, you could use the QNAP boxes for backups. But you could also use them as a storage backend via iSCSI or NFS. Whether the existing HW is sufficient depends to how many customers you want to offer services and what you promise your customers regarding uptime, data security etc… If you show them the pic you posted here and they are still ok, you’ll probably be fine… :wink:

But If you promise them a professional service with high uptime, you need redundancy, preferably everywhere (servers, storage boxes, power supplies, network equipement, internet connection etc). What do you do when a power supply or a disk dies? How quickly do you have a replacement? How quickly is the RAID rebuilt or the backups restored? Can you afford a few hours of downtime? Do you have a fireproof room? …or maybe even two independent locations? Do you have redundant internet connectivity? Do you have a UPS?

If you promise them data security, you need a reliable infrastructure for backups, preferably also offsite. Can you guarantee the safety of the customer data, and restore it within a reasonable period of time if a catastrophic event happens? What do you do if your house burns down?

Further if you want to expand, you need already include that in your current planing. Sure, you can just add more and more servers and NAS boxes. But at some point the whole thing becomes unmanageable.

And either way you need backups of your installation, databases, etc. Read up on 3:2:1 backup strategy.

As I already stated in my PM, I cannot give you detailed recommendations, since I have zero expirience in building out a hosting infrastructure. What I told you in this and my previous posts are the absolute basics for any larger productive IT Environment, especially if you host data for customers. Try to read up on the multiple buzzwords I gave you and come to your own conclusions. I cannot and I won’t give a recommendation for a specific device or software and tell you: “Set this thing up, start hosting Nextcloud instances for customers with it and you’ll be fine!”

1 Like