LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-03-2018, 12:48 PM   #1
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Ubuntu 18.04LTS
Posts: 143

Rep: Reputation: 16
Can I Use My new LVM Data FOlder for Nextcloud Data Folder & Storage?


While installing Nextcloud onto my Ubuntu 18.04LTS Server, after opening my browser and going to http://my-ip-address/nextcloud , where it asks for the location of the data folder, is it safe to point it to a data folder I created on my LVM ?
 
Old 08-03-2018, 08:23 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I have no personal experience, but I don't see why not. I suspect that many cloud servers running on CentOS and RHEL use LVM file systems.

This article certainly implies that you can: http://www.techspacekh.com/installin...entos-7rhel-7/
 
Old 08-03-2018, 08:55 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
And if this has the potential to grow, one day you will really appreciate you used LVM.
Just do it.
 
1 members found this post helpful.
Old 08-06-2018, 08:31 PM   #4
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Ubuntu 18.04LTS
Posts: 143

Original Poster
Rep: Reputation: 16
Thanks, frankbell & syg00
I already have 2.7TB Data to put on it within 2 years will definitely be needing to add more, that's why I really wanted to build the foundation so to speak correctly. I wasn't sure if I had to chmod the drive, what else needed to be done to allow the drive to work correctly with nextcloud or how the big boys do it, after checking out and studying the link above, I believe I have everything setup. I will try this tomorrow, just recovered from a bad fstab entry for my LVM, ended up having to boot from the live media and fixing it, now it is booting up and working again.
 
Old 08-07-2018, 11:32 AM   #5
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Ubuntu 18.04LTS
Posts: 143

Original Poster
Rep: Reputation: 16
Now getting Error: Can't create or write into the data directory /mnt/nextcloud/data, what is the best way to fix this ? the data folder is where the 4TB LVM is mounted to, looks like I have a permission problem, seems Like I only have root access, when I check the properties for the data folder it shows it has 4TB, so it's mounted correctly to the LVM, but what is the best workaround for the permissions issue ?
 
Old 08-07-2018, 09:40 PM   #6
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Ubuntu 18.04LTS
Posts: 143

Original Poster
Rep: Reputation: 16
I noticed one of the prerequisites of installing nextcloud was to Update the ownership of files inside the NextCloud root directory so that web server can write data into it.

sudo chown -R www-data:www-data /var/www/html/nextcloud/

Do I need to simply : sudo chown -R www-data:www-data /mnt/nextcloud/data ?

If so, do I need to unmount the LVM drive the data folder is mounted to, before using that command ?
 
Old 08-17-2018, 08:54 PM   #7
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Ubuntu 18.04LTS
Posts: 143

Original Poster
Rep: Reputation: 16
After doing some homework on this and using Master Ubuntu Server 2nd edition PDF Book, I chose to do it this way.

1. sudo umount /mnt/NextCloud/data
2. cd /mnt/NextCloud
3. ls , then sudo rm -r data
4. ls , to make sure data file is gone.
5. change fstab mount to: /mnt/NextCloud
6. sudo mount /mnt/NextCloud , or sudo mount -a , make sure it mounted.
7. cd /mnt/NextCloud
8. ls -l only lost+found should be in there
9. sudo mkdir /mnt/NextCloud/data
10. ls -l check it out
11. copy anything from original /var/www/html/nextcloud/data to /mnt/NextCloud/data , for testing purposes.

12. sudo chown www-data:www-data /mnt/NextCloud/data
13. ls -l check it out, notice permissions changed.
14. Restart.
15. Check mount point, cd /mnt/NextCloud , ls -l check out permissions on data folder. If permissions are good, install Next Cloud. and tell it the data folder is located at /mnt/NextCloud/data

it just worked...
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloads folder is seen as hidden data andrew262 Linux - Newbie 9 05-23-2017 09:13 AM
Getting at folder data behind an I/O error pi3.14 Linux - Software 1 02-23-2016 12:37 AM
changing mysql data folder Red Squirrel Linux - Software 3 02-09-2006 05:58 PM
how to determine the folder contain data or not izza_azhar Programming 2 05-24-2005 07:38 PM
Where is the data folder for webserver? helpme0904 Linux - General 1 11-03-2004 08:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration