LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 02-27-2017, 05:34 PM   #16
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451

Quote:
Originally Posted by michaelk View Post
You can use chmod and chown to change permissions/owner without the need to recreate existing directories or reboot.

https://www.linux.com/learn/how-mana...missions-linux
... 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 07:49 PM.
 
Old 02-27-2017, 08:01 PM   #17
oguruma
LQ Newbie
 
Registered: Feb 2017
Posts: 23

Original Poster
Rep: Reputation: Disabled
Well I changed the /etc/fstab to the entry you provided, and now I reboot into emergency mode....
 
Old 02-27-2017, 08:27 PM   #18
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,528

Rep: Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137
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.
 
Old 02-27-2017, 08:30 PM   #19
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by oguruma View Post
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 08:33 PM.
 
Old 02-27-2017, 10:19 PM   #20
oguruma
LQ Newbie
 
Registered: Feb 2017
Posts: 23

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-28-2017, 04:39 AM   #21
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,528

Rep: Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137
Quote:
drwxr-xr-x 3 root root
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
 
Old 02-28-2017, 08:27 AM   #22
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by michaelk View Post
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 !
 
Old 02-28-2017, 08:51 AM   #23
oguruma
LQ Newbie
 
Registered: Feb 2017
Posts: 23

Original Poster
Rep: Reputation: Disabled
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 09:21 AM.
 
Old 02-28-2017, 09:29 AM   #24
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
... Please confirm that you are logged in as "vboxadmin" when executing these commands (ls -l and using Virtualbox) ...
 
Old 02-28-2017, 09:34 AM   #25
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by oguruma View Post
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 ?
 
Old 02-28-2017, 10:26 AM   #26
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
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 10:29 AM.
 
Old 02-28-2017, 12:23 PM   #27
oguruma
LQ Newbie
 
Registered: Feb 2017
Posts: 23

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-28-2017, 12:33 PM   #28
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
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.)
 
Old 02-28-2017, 01:06 PM   #29
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,528

Rep: Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137
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 01:09 PM.
 
Old 02-28-2017, 01:19 PM   #30
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by oguruma View Post
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 01:21 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to add new drives to a VirtualBox virtual machine LXer Syndicated Linux News 0 10-27-2016 02:01 PM
How do I expand a partition less virtual drive while preserving the data? MissingPixels Linux - Hardware 1 11-19-2013 01:56 PM
[HOWTO] add a sata drive to virtualbox aus9 Linux - Software 1 03-17-2010 08:52 PM
[SOLVED] How to add another drive image to an existing VM using VirtualBox? colucix Linux - Software 2 08-31-2009 05:38 AM
how to add new drive to existing software RAID 0 without losing the data? superbo Linux - Hardware 2 06-12-2007 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration