[Techtalk] Advice on LVM
poppy at netcorps.org
Tue Jul 5 18:00:11 UTC 2016
It looks like what we have is:
4x2TB drives in a hardware RAID10 - looks to the OS like one big 4TB drive.
According to the purchase paperwork, the box has a small SSD for the boot system - I don't see it, so it's either not present or a very small flash drive that's onboard in a spot I can't see without dismantling the hardware.
All of this in a small little NAS-sized case. No extra SATA ports and no way to attach any other storage to it other than USB2.
There are 4 Mac workstations and 1 PC connecting locally on the LAN. There's also 3 laptops in the field, sharing a cellular hotspot connection, who have access to files via ownCloud's web interface - but who are using something else instead. And office staff have all of the information that they need to sign into the web interface for ownCloud to work from home, if they choose.
Original specs for the project were: (1) off-site access to files and (2) off-site backup.
And yes, the situation is that all space is allocated to a volume, and all of our available space is in the data volume. Since that is located in a folder that's created and used by ownCloud, I was hesitant to just create a new folder in there. Picturing lots of things that could go wrong - from the folder getting deleted upon removal or upgrade of ownCloud, to permissions issues, to having ownCloud break upon finding a folder in its directory that it didn't create. Just seemed easier to pull the data directory out to another portion of the file system to keep it separate.
And on top of that, I'm also having to try and explain our options to colleagues who are mostly PC people, when I just don't grok Linux volumes and mountpoints well enough to translate.
What we've finally proposed doing is to create a folder outside of ownCloud's interface in the data directory - testing suggests that we CAN do this without worries about data loss - and add that into the system as External Storage. This lets us mount the folder via SMB on the workstations and configure a cron script that schedules ownCloud to scan the folder for updates to add to its database.
From: Eeva Järvinen [mailto:eevaj at welho.com]
Sent: Tuesday, July 05, 2016 5:16 AM
To: techtalk at linuxchix.org
Subject: Re: [Techtalk] Advice on LVM
On Tue, Jun 28, 2016 at 11:26:29PM +0000, Poppy Lochridge wrote:
> Previous consultant set up a CentOS system running apache and
> ownCloud. Three logical volumes: one swap, one mounted as the ownCloud
> data folder, one root.
So... root, swap and ownCloud are in the same volume group, and this VG takes up all available physical space, root is mounted at /, ownCloud is at /data (or something else)? You should be able to resize the volumes, BUT they do need to be unmounted, so if you want to shrink root, you need to boot from a livecd/usb stick. This link should be helpful:
Messing about with sizes of volumes isn't quite as dangerous as it used to be, but yes, this can lead to data loss if you mess something up (most likely faux pas would be shrinking the volume before shrinking the filesystem).
I suspect, however, that there is a tried & true method for doing what you want in an ownCloud-specific way, but as I'm not that familiar with ownCloud, I can't really comment more on that.
> Staff are SUPER unhappy with the performance of accessing 1TB of data
> via WebDAV, and we're looking at moving their data out to another
> folder which can be shared SMB with their workstations and added back
> into ownCloud via External Storage for cloud-based access outside of
> the office.
What are they using to access the data? Windows PCs, something else?
On the same network, WAN, something else? For a Windows LAN, SMB would be a good choice, but see also the iSCSI-solutions offered previously in this thread.
> None of the existing logical volumes have enough capacity to move the
> data to - all of the capacity has been assigned to the ownCloud data
> volume, and I don't want to create an External Storage folder there as
> that seems confusing for the users and future admins.
So you do have unused physical space available? Why not build needed new logical volumes there, move the data, change mountpoints to point to new volumes (keep a copy of the old mounting structure), reboot to see if everything's ok, and if so, nuke the old volumes?
> (2) Change the mount point on the ownCloud data volume so that it
> mounts further up the folder tree, enabling us to create the External
> Storage folder in that volume without resizing.
So... you have room on the data volume, but need to have the external storage folder mounted somewhere else in the filesystem? You do realize you can mount a directory somewhere else with
mount -B /olddir /newdir
(a k a bind mount)? This might be the easiest option for now.
Techtalk mailing list
Techtalk at linuxchix.org
More information about the Techtalk