Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Ubuntu: Cannot write to new disk

  • 17-06-2013 10:38am
    #1
    Closed Accounts Posts: 4,791 ✭✭✭


    I've added a new 2TB drive to my ubuntu PC at home for some VMs and am having issues at times where I cannot start the VM's I have on the system, I cannot create new folders on the new disk either, results when I run :

    sudo lshw -C disk

    *-disk
    description: ATA Disk
    product: WDC WD2002FAEX-0
    vendor: Western Digital
    physical id: 0.0.0
    bus info: scsi@0:0.0.0
    logical name: /dev/sda
    version: 05.0
    serial: WD-WCAY01125305
    size: 1863GiB (2TB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=0000979e
    *-disk
    description: ATA Disk
    product: M4-CT128M4SSD2
    physical id: 0.0.0
    bus info: scsi@1:0.0.0
    logical name: /dev/sdb
    version: 0009
    serial: 00000000114808FF7500
    size: 119GiB (128GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=000d2976


Comments

  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    What does ls -l /media/drive return where drive is the one you're having trouble with.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    brw-rw---- 1 root disk 8, 0 Jun 17 11:27 /dev/sda

    When I run nautilus -q it seems to be ok after about 20 mins.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    heres a screenshot of my permissions only root has access how do I give my user access to this disk.


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    It doesnt look like the drive is mounted.

    Open a shell and get root, then type
    mkdir /media/vm_storage
    mount /dev/sda1 /media/vm_storage
    

    Then point nautilus at /media/vm_storage and you should be able to see your files.

    You can change vm_storage to another word of your choosing.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    root is disabled, tried to login but just got cannot possibly work without effective root.


  • Advertisement
  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    root is disabled, tried to login but just got cannot possibly work without effective root.

    What do you mean root is disabled?

    OPen a terminal and type
    su -
    

    then enter the root password.

    If you have 'sudo' configured you can try:
    sudo su -
    

    Then enter the password for your regular user.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    Tried logging in as root and running the above mkdir and mount commands but still nothing working, can't lauch my VM's at all, keep getting the same error regarding access.

    Error starting domain: Unable to allow access for disk path /media/89200fb2-fd50-4518-bacf-2c8587219927/SERVER20.img: No such file or directory


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    Tried logging in as root and running the above mkdir and mount commands but still nothing working, can't lauch my VM's at all, keep getting the same error regarding access.

    Error starting domain: Unable to allow access for disk path /media/89200fb2-fd50-4518-bacf-2c8587219927/SERVER20.img: No such file or directory

    So when you try sudo su - or su - what happens? Do you get an error message?


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    yeh the SU command works and then type the password, bringing me to the home folder.

    vmdesktop:~$ su
    Password:
    Added user root.


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    yeh the SU command works and then type the password, bringing me to the home folder.

    vmdesktop:~$ su
    Password:
    Added user root.

    Just to confirm you are now root, run
    whoami
    


  • Advertisement
  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    vmdesktop:~# whoami
    root


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    vmdesktop:~# whoami
    root

    Great. Now run:
    mkdir /media/vm_storage
    mount /dev/sda1 /media/vm_storage
    

    And paste up any output.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    vmdesktop:~# mount /dev/sda1 /media/vm_storage
    mount: /dev/sda1 already mounted or /media/vm_storage busy
    mount: according to mtab, /dev/sda1 is already mounted on /media/vm_storage


    vmdesktop:~# mkdir /media/vm_storage
    mkdir: cannot create directory `/media/vm_storage': File exists


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    vmdesktop:~# mount /dev/sda1 /media/vm_storage
    mount: /dev/sda1 already mounted or /media/vm_storage busy
    mount: according to mtab, /dev/sda1 is already mounted on /media/vm_storage


    vmdesktop:~# mkdir /media/vm_storage
    mkdir: cannot create directory `/media/vm_storage': File exists

    Well it looks like its mounted, but please try to run the commands in the order I type them.

    Now do:
    cd /media/vm_storage
    ls -l
    

    And paste up the output.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    vmdesktop:/media/vm_storage# ls -l
    total 22266824
    drwxr-xr-x 2 root root 4096 May 22 22:26 Data
    drwx
    2 root root 16384 May 22 18:48 lost+found
    -rw
    1 root root 26214400000 Jun 17 23:11 Server10.img
    -rw
    1 root root 26214400000 Jun 17 23:12 SERVER20.img
    -rw
    1 root root 26214400000 Jun 17 23:11 SERVER30.img


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    vmdesktop:/media/vm_storage# ls -l
    total 22266824
    drwxr-xr-x 2 root root 4096 May 22 22:26 Data
    drwx
    2 root root 16384 May 22 18:48 lost+found
    -rw
    1 root root 26214400000 Jun 17 23:11 Server10.img
    -rw
    1 root root 26214400000 Jun 17 23:12 SERVER20.img
    -rw
    1 root root 26214400000 Jun 17 23:11 SERVER30.img

    Great. Now in QEMU, point it to /media/vm_storage


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    Add it as a storage pool ?


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    Add it as a storage pool ?

    Yes.


  • Closed Accounts Posts: 4,791 ✭✭✭JJJJNR


    Brilliant, all working now :) thanks for the help, that should be ok now even after a reboot.. ?


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    JJJJNR wrote: »
    Brilliant, all working now :) thanks for the help, that should be ok now even after a reboot.. ?

    If you want the disk to come up automatically after a reboot you will need to add it to your fstab.

    man fstab should give you what you need.


  • Advertisement
Advertisement