Moving shared folder contents with MC after relocating shared folders to another drive.

  • Hello all,


    The title says mostly all.


    I have upgraded a disk in my OMV installation from 500GB to 1TB. I am trying to move the shared folders and their contents from the 500GB to the new 1TB drive, by using the 'Access Rights Management>Shared Folders' section in the Web GUI. Its fine, but it does warn that only the folder will be moved and that I will need to move the contents myself. For this I am trying to use Midnight Commander through SSH.


    After relocating the share in the web GUI, I have the share in both panels of Midnight Commander (the original on the left and a new one on the right). When I open the original one, there are no contents to copy to the new one. Can anyone tell me what I am doing wrong here?


    Thanks,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    Einmal editiert, zuletzt von Nick0 ()

  • difficult... to diagnose from here
    might be rights problems
    what if you run mc as root?


    I would have done it differently:
    - rsync -ar the contents from the old drive to the new
    - unshare the old directories
    - share the new directories
    - disconnect the old drive

    • Offizieller Beitrag

    Either move the data as root: sudo mc. Could be dangerous...


    Or login over SSH as a user that is a member of the group users. And move the data using mc.


    Or, better still, using rsync -ar.


    Shared folders, and files in shared folders, are by default owned by root:users. Typically you would use a user that is member of ssh, sudo and users for managing the files using SSH rsync and/or mc.


    Possibly reset permissions first using the plugin resetperm if owner, for some reason, is not root:users.

  • difficult... to diagnose from here
    might be rights problems
    what if you run mc as root?

    Well, I don't think that its permissions as I can see the contents of the original directory in mc before I move the shared folder using the web GUI. I think I am already running mc as root as I start the SSH session as root, the run the mc command, so I guess this means I am in mc as root? Also I have run mc as sudo.


    Zitat

    I would have done it differently:
    - rsync -ar the contents from the old drive to the new
    - unshare the old directories
    - share the new directories
    - disconnect the old drive

    Yes, I could do it that way but i am quite enjoying mc and learning a bit more about the command line. I must say that I'm very impressed with the speed you can move large directories around - its blisteringly fast. So, maybe I'll take another look when I get home later on.


    Thanks,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • OK, thank you, I will have another look when I get home.


    Much appreciated,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Sorry, I skipped through this a bit qiuickly at work today - when I saw r-sync, I was thinking that it was being suggested that I set up a job through the web GUI, but it seems you are both suggesting that I do it via the cl. Sorry about that - off now to see what I can do.


    Ta,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • OK, so I ended up just taking the old disk out, recreating the shares and I am now r-syncing the stuff across with the web GUI.


    Hopefully this will work and i have enjoyed using MC and learning some new things.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Hello again,


    OK, so many months have passed and I am back trying to use the CL again. These will be very basic questions, on how to navigate the directory structure. I have had a dig around on the web but I'm not getting anywhere.


    So, I have opened Terminal on my mac and logged in using:


    ssh root@192.168.1.98


    Then I enter the password for root.


    I list the contents of the current directory


    root@openmediavault:/# ls

    [admin@]192.168.0.99:Photos lib sharedfolders

    bin lib64 srv

    boot lost+found sys

    dev media tmp

    etc mnt usr

    export opt var

    ftpuser@192.168.1.99 proc vmlinuz

    home root vmlinuz.old

    initrd.img run

    initrd.img.old sbin


    Then open the shared folders directory and list its contents:


    root@openmediavault:/# cd /sharedfolders

    root@openmediavault:/sharedfolders# ls

    documents eppc kit music photos web

    dolly jack media nick plexmusic


    Wow! this is working!


    I want to look at the files in 'dolly', so, that's cd /dolly?


    Seems not, as I get this -bash: cd: /dolly: No such file or directory


    So, I'm missing something here. I know that 'dolly' is a directory, and can confirm that with:


    root@openmediavault:/sharedfolders# ls -F

    documents/ eppc/ kit/ music/ photos/ web/

    dolly/ jack/ media/ nick/ plexmusic/


    Can somebody please help the noob?


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Nick0

    Hat das Label gelöst entfernt.
    • Offizieller Beitrag

    cd dolly

    will change into directory dolly in the current directory

    cd /dolly

    will change into directory dolly on the root (which does not exist in your case)


    on OMV5 /sharedfolders is not populated an more, so could be the directory is empty


    in any case you find your data in

    /srv/dev-disk-by-label-xxxxx

    or

    /srv/dev-disk-by-uuid-xxxxx

  • Ah, I see!


    So, basically, / means 'look in root for', in this case, dolly?


    I 'm currently poking about in a OMV4 installation, so my sharedfolders directory is populated, which makes sense. I'll go and look around in the OMV5 installation and see how I go.


    Thanks for the tips!

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • OK, so here is where I am.


    As you say, sharedfolders in OMV5 is empty, so I looked in /srv and I have 3 entries:


    root@omvpeR210up:/srv# ls

    dev-disk-by-uuid-4ca5a313-a7f8-46fc-9434-d29c6e83fbc7 ftp

    dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df2 pillar

    f86f37f0-c4cf-4576-a93b-a6be71977269 salt


    It might help now to tell you what I'm trying to do as I'm not sure which of the above I need to refer to.


    I'd like to transfer some stuff from one server to another (yes, we're back here again).


    Source server is 192.168.1.98, shared directory is: dolly

    Destination server is: 192.168.1.14, shared directory is: dolly


    Looking online, I think I need to do something like:


    SSH into source server as root, and enter:


    rsync -a /sharedfolders/dolly/ remote_nick@192.168.1.14:/srv/dev-disk-by-uuid-4ca5a313-a7f8-46fc-9434-d29c6e83fbc7...


    But surely I need to add /dolly to the end of that? Can i look 'inside' one of those uuid's to find the directory?


    Hope that makes sense!

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    • Offizieller Beitrag

    so I looked in /srv and I have 3 entries:


    root@omvpeR210up:/srv# ls

    dev-disk-by-uuid-4ca5a313-a7f8-46fc-9434-d29c6e83fbc7 ftp

    dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df2 pillar

    f86f37f0-c4cf-4576-a93b-a6be71977269 salt

    That is six entries. ls -al is a little better at showing that.

    • Offizieller Beitrag

    Can i look 'inside' one of those uuid's to find the directory?

    Yes you can "cd" into them.


    For this tab completion is usefull. Just type the first letters and the press the tab key and it will autocomplete

  • That is six entries. ls -al is a little better at showing that.

    Ah, I thought the ftp, pillar and salt were part of the uuid's - seemed odd at the time so this explains it. Thanks.

    Yes you can "cd" into them.


    For this tab completion is usefull. Just type the first letters and the press the tab key and it will autocomplete

    Great tip - thank you. Beats copying and pasting!

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • EDIT: Hang on, I think I've messed something else up here first. Ignore all this for now.


    OK, so I am now here, I know this is painful for you but please bear with me.


    rsync -amv /sharedfolders/dolly/ root@192.168.1.14:/srv/dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df/dolly


    I get this output:


    building file list ... done

    created directory /srv/dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df/dolly

    ./

    .DS_Store

    ._.DS_Store

    ._RA 20_10_2020.docx

    ._The Fairy.docx

    ._Wings Hannah-Mae.mp4

    ._invoice.pdf

    ._invoice.xlsx

    ._notes.jpg

    ._quiz.jpg

    ._smile.png

    ._thumbsup.png

    RA 20_10_2020.docx

    The Best of 2019.mp4


    I see it says 'created directory', and I don't want it to do this, I want it to copy the files from /sharedfolders/dolly/ to /srv/dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df/dolly I though that the trailing slash in /sharedfolders/dolly/ would do this.


    Other than that, I'm enjoying this! (a bit).


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    Einmal editiert, zuletzt von Nick0 ()

    • Offizieller Beitrag

    I see it says 'created directory', and I don't want it to do this, I want it to copy the files from /sharedfolders/dolly/ to /srv/dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df/dolly I

    but if the directory dolly is not available at the target, it has to be created

  • Yes, I think I was copying to above the directory I wanted. No worries, it will give me a bit more experience now I have to go and delete stuff!

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • OK, I have defo messed things up here.


    I have been trying things out with rsync, not sure that the commands were working or not, but now I think they were. When I enter the rsync command, it asks for the password and then just stays blank - I thought it had hung up but maybe it was running.


    Further up thread /srv ls was giving me this:


    dev-disk-by-uuid-4ca5a313-a7f8-46fc-9434-d29c6e83fbc7 ftp

    dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df2 pillar

    f86f37f0-c4cf-4576-a93b-a6be71977269 salt


    Now /srv ls is giving me this:


    dev-disk-by-uuid-4ca5a313-a7f8-46fc-9434-d29c6e83fbc7 ftp

    dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df pillar

    dev-disk-by-uuid-81765f11-ef08-48ae-a597-e891180b2df2 salt

    f86f37f0-c4cf-4576-a93b-a6be71977269


    It looks like I have created a directory called f86f37f0-c4cf-4576-a93b-a6be71977269 and filled it up with:


    root@omvpeR210up:/srv/f86f37f0-c4cf-4576-a93b-a6be71977269# ls

    15_-13th_December_2010.pdf

    20141015_182658.jpg

    20150121_175555.jpg

    '3106-1010-1044-VH - Service Technician.docx'

    '6853 - bgt.htm'

    765E2DA6.tmp

    'Anatomy and Physiology.docx'

    aquota.group

    aquota.user

    Assignments

    'Audition Form 2011.doc'

    Autonomy.docx

    'backed up'

    'Backed up kits old desktop'

    'But That Is My Book.docx'

    Carolyn

    'Charlie And Lol1.doc'

    'Charlie and Lola.doc'

    'CHC Training evaluation.docx'

    'Copy of Downloads'

    'CYSTIC FIBROSIS.docx'

    D68FCEDE.tmp

    'desktop backup'

    documents

    Documents

    dolly

    'Dolly Revision'

    Downloads

    'Ebay Pics of Cupboard'

    eppc

    'FiFi and the Flowertots Singalong Song - YouTube_files'

    'IP Cam Software Jack'

    'Job Applications'

    kit

    "kit's phone"

    'Kits S3 Mini SD Backup'

    kwikfit

    'Laptop Backup April 2014'

    'Log sheets'

    lost+found

    'My Music'

    'My Pictures'

    'My Safes'

    nick

    'Old Stuff'

    passes

    Phone

    'Phone Backup September 2017'

    'Phone pics Dec 20_one_2'

    photos

    'pics from phone'

    pst

    QMUL

    'RA 20_10_2020.docx'

    @Recycle

    Sage

    'Sage Backups'

    scans

    'School Nurse PDFs'

    Software

    'Space Mountain POV Walt Disney World - YouTube_files'

    'Swimming 31 Dec 2012'

    Training-Course-Evaluation-Form

    'TTDN Accounts'

    Work


    Where on earth has 86f37f0-c4cf-4576-a93b-a6be71977269 come from? ?(


    What on earth have I done? I guess I just run rm /srv/f86f37f0-c4cf-4576-a93b-a6be71977269

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!