Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-27-2017, 04:34 PM
|
#16
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by michaelk
|
... absolutely - good point. Thanks michaelk.
oguruma: For mounting: Is the 2 TB disk permanently attached to the computer, as opposed to something like a USB disk ? If it is, all the more reason to manage mounting through fstab, in my opinion. I suggest this entry :
UUID=youruuidvalue /data ext4 rw,relatime,data=ordered 0 0
... assuming your file system is indeed ext4 - please let us know if otherwise.
... If you don't want to manage through fstab, you would have to use the appropriate options when mounting each time, but again, fstab would be a more intuitive and simpler option for a permanently attached disk.
Last edited by Rickkkk; 02-27-2017 at 06:49 PM.
|
|
|
02-27-2017, 07:01 PM
|
#17
|
LQ Newbie
Registered: Feb 2017
Posts: 23
Original Poster
Rep: 
|
Well I changed the /etc/fstab to the entry you provided, and now I reboot into emergency mode....
|
|
|
02-27-2017, 07:27 PM
|
#18
|
Moderator
Registered: Aug 2002
Posts: 26,751
|
Did you use the real UUID of the filesystem? Look at the output of the lsblk command.
Make sure you use the actual filesystem type if not ext4.
As far as I know data=ordered is the default value so it is not explicitly required as an option.
|
|
|
02-27-2017, 07:30 PM
|
#19
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by oguruma
Well I changed the /etc/fstab to the entry you provided, and now I reboot into emergency mode....
|
Hi oguruma - the entry I gave you was to *add* to your fstab file with, as michaelk specifies, the actual UUID of your disk ... Am I to understand that you replaced some other line already there with the one I suggested ?
I am feeling that I should have been more specific here ... Please let us know so that we may help you recover if this is indeed what happened ...
Last edited by Rickkkk; 02-27-2017 at 07:33 PM.
|
|
|
02-27-2017, 09:19 PM
|
#20
|
LQ Newbie
Registered: Feb 2017
Posts: 23
Original Poster
Rep: 
|
Okay, I typo'd entry (realtime vs relatime); should have copied/pasted. So, that is sorted out, but I still get the same error when I try to add the vdi in virtualbox.
|
|
|
02-28-2017, 03:39 AM
|
#21
|
Moderator
Registered: Aug 2002
Posts: 26,751
|
In a nutshell root is the only one that can write to the directory. As root you can change owner to your user by using the chown command.
chown username:username /data
|
|
|
02-28-2017, 07:27 AM
|
#22
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by michaelk
In a nutshell root is the only one that can write to the directory. As root you can change owner to your user by using the chown command.
chown username:username /data
|
Hi oguruma - glad to hear the fstab situation wasn't as serious as I feared. The combination of that now functional entry to mount your drive plus michaelk's above explanation of how to retake ownership of the /data directory, should enable you to write to it. Best practice is to create directories that users will need to write to with your own user code and not root (nor by using sudo).
Let us know how it goes !
|
|
|
02-28-2017, 07:51 AM
|
#23
|
LQ Newbie
Registered: Feb 2017
Posts: 23
Original Poster
Rep: 
|
After using chown to vboxadmin:
$ ls -l /data
ls: cannot access /data/data: Permission denied
ls: cannot access /data/lost+found: Permission denied
ls: cannot access /data/nextclouddata: Permission denied
total 0
d????????? ? ? ? ? ? data
d????????? ? ? ? ? ? lost+found
d????????? ? ? ? ? ? rangelclouddata
and
$ sudo ls -l /data
total 24
drwxrwxrwx 3 vboxadmin vboxadmin 4096 Feb 27 11:49 data
drwxrw-rw- 2 vboxadmin vboxadmin 16384 Feb 27 11:41 lost+found
drwxrwxrwx 2 vboxadmin vboxadmin 4096 Feb 27 12:46 nextclouddata
still same error message when I try to create a disk in that directory.
Last edited by oguruma; 02-28-2017 at 08:21 AM.
|
|
|
02-28-2017, 08:29 AM
|
#24
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
... Please confirm that you are logged in as "vboxadmin" when executing these commands (ls -l and using Virtualbox) ...
|
|
|
02-28-2017, 08:34 AM
|
#25
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by oguruma
After using chown to vboxadmin:
$ ls -l /data
ls: cannot access /data/data: Permission denied
ls: cannot access /data/lost+found: Permission denied
ls: cannot access /data/nextclouddata: Permission denied
total 0
d????????? ? ? ? ? ? data
d????????? ? ? ? ? ? lost+found
d????????? ? ? ? ? ? rangelclouddata
and
$ sudo ls -l /data
total 24
drwxrwxrwx 3 vboxadmin vboxadmin 4096 Feb 27 11:49 data
drwxrw-rw- 2 vboxadmin vboxadmin 16384 Feb 27 11:41 lost+found
drwxrwxrwx 2 vboxadmin vboxadmin 4096 Feb 27 12:46 nextclouddata
still same error message when I try to create a disk in that directory.
|
... I am also curious concerning the subdirectories ... The first command partly references one of the subdirectories as "rangelclouddata" ... Does this mean anything to you ?
|
|
|
02-28-2017, 09:26 AM
|
#26
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
Quote:
Originally Posted by Rickkkk
If this is true (please correct me if not), then you just need to do the following:
- Create a directory on your 2 TB disk drive that will hold your Virtual machines ("VBoxVMs", for example ... your choice ...)
|
+1
OMG: it hurts to read this thread.
I'd get /mnt/data straightened out and move my ~/"Virtualbox VMs" there and update Virtualbox >Preferences
Then...
I'd grow the existing .vdi out by using something like
https://www.virtualbox.org/manual/ch...nage-modifyvdi
Code:
VBoxManage modifyhd /path/to/nextcloud.vdi --resize <newsize>
Just sayin'.
I have Dokuwiki installed in a headless Vbox guest.
I update it daily (work.log). I reboot my host at will and I never lose any data.
I installed eight OSs this weekend on my local machine and Monday morning, all my VMs work
and have Friday's data.
rsync is pointless, IMO if you have the vdi.
CIFS for what? Exporting back the host environment, me guesses by the looks of it.
Last edited by Habitual; 02-28-2017 at 09:29 AM.
|
|
|
02-28-2017, 11:23 AM
|
#27
|
LQ Newbie
Registered: Feb 2017
Posts: 23
Original Poster
Rep: 
|
So via chmod I got access to the /data. I moved the default machine folder to /data. The issue I forsee now is that everything will still be written to the original vdi, which is limited to the original 8GB, no?
|
|
|
02-28-2017, 11:33 AM
|
#28
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,201
|
I hope that you had the foresight to install the machine with LVM = Logical Volume Management support.
If you did, then your logical volumes can span any number of physical volumes.
("Physical" as perceived by the virtual machine, which cannot directly perceive the host.)
|
|
|
02-28-2017, 12:06 PM
|
#29
|
Moderator
Registered: Aug 2002
Posts: 26,751
|
You can increase the size of the VDI and then the underlying filesystems whether they are LVM or regular partitions. You can create a new VDI and if using LVM add it to an existing volume volume group or as separate partitions and move the data/mount it as an existing directory like /home.
Post the output of the lsblk command.
https://forums.virtualbox.org/viewto...p?f=35&t=50661
Last edited by michaelk; 02-28-2017 at 12:09 PM.
|
|
|
02-28-2017, 12:19 PM
|
#30
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by oguruma
So via chmod I got access to the /data. I moved the default machine folder to /data. The issue I forsee now is that everything will still be written to the original vdi, which is limited to the original 8GB, no?
|
Hi again oguruma - I had missed somewhere that you had already created a .vdi .... My understanding was that you were in the process of trying to create one and were blocked by the permissions issue (amongst other issues, earlier on ..). If that is the case, you may be able to grow it - see habitual's and michaelk's posts above - or else you can always recreate it, specifying the appropriate size.
Again, if I am misunderstanding your issue, apologies in advance and feel free to clarify.
Last edited by Rickkkk; 02-28-2017 at 12:21 PM.
|
|
|
All times are GMT -5. The time now is 01:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|