add volume2 shortcut in volume1

Share your awesome tips and tricks here.
GHAZALO
Posts: 18
youtube meble na wymiar Warszawa
Joined: Sat Nov 05, 2022 2:16 pm

Re: add volume2 shortcut in volume1

Post by GHAZALO »

Nazar78 wrote:
GHAZALO wrote:I tried also using the direct command as you said similar to Dos (windows) yet no result
After issuing the `ln` command it works but when you issue `cd` you're currently not in the correct `pwd ` (print working directory). Try giving the full path: `cd /volume2/V2/V2-ShortCut` (note unlike Windows, Linux is case-sensitive, foobar and FooBar are two different filenames or paths).

No worries it's common for beginners, just play around you'll get better with CLI (command line interface). Be careful though with certain commands like `rm -rf` (force remove files and folders recursively), always confirm again before issuing it or using it in a script especially startup scripts.
I think something created or taken there but in the device not showing
see photo show that already existed but in the device nothing there
Attachments
2.JPG
2.JPG (41.65 KiB) Viewed 2001 times
1.JPG
1.JPG (59 KiB) Viewed 2001 times
Image
User avatar
Nazar78
Posts: 2084
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: add volume2 shortcut in volume1

Post by Nazar78 »

GHAZALO wrote:
Nazar78 wrote:
GHAZALO wrote:I tried also using the direct command as you said similar to Dos (windows) yet no result
After issuing the `ln` command it works but when you issue `cd` you're currently not in the correct `pwd ` (print working directory). Try giving the full path: `cd /volume2/V2/V2-ShortCut` (note unlike Windows, Linux is case-sensitive, foobar and FooBar are two different filenames or paths).

No worries it's common for beginners, just play around you'll get better with CLI (command line interface). Be careful though with certain commands like `rm -rf` (force remove files and folders recursively), always confirm again before issuing it or using it in a script especially startup scripts.
I think something created or taken there but in the device not showing
see photo show that already existed but in the device nothing there
The commands that you issued means you're creating the link in /volume2/V2/V2-ShortCut that points to /volume1/Download.

Look in the V2 folder, you should see a link V2-ShortCut that points to /volume1/Download.

Edited: Sorry I don't use the Asustor File Manager, which it doesn't support symlinks now that I'm aware of. But if you do a mount bind it will show in the Asustor File Manager or look in the shell terminal, you can see the link.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2084
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: add volume2 shortcut in volume1

Post by Nazar78 »

Edited my last post!
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
GHAZALO
Posts: 18
Joined: Sat Nov 05, 2022 2:16 pm

Re: add volume2 shortcut in volume1

Post by GHAZALO »

Nazar78 wrote:You could try to change to the user root using:

Code: Select all

sudo su -
Screenshot 2022-11-06 030822.png
Go to the Access Control panel to determine this user is in the admin group, you can also change the default admin password and use it to login. IIRC when I first got my NAS, the default it admin, not sure about now but if you can control the NAS using this user then probably it's already admin? Not sure you'll need to check.
I suggesst to continue in (ln) method as it is easier unless it won't work, as far this method access then root then command then repeat the command every start...etc looks scary lol

if the ln command create shortcut for volume2/V2 in folder volume1/Download as the windows making and the device and apps reads it there, then all my problem will be solved. and many many thanks
Image
GHAZALO
Posts: 18
Joined: Sat Nov 05, 2022 2:16 pm

Re: add volume2 shortcut in volume1

Post by GHAZALO »

lol never mind me the ln is not the solution lol as it is easy i catch it hahahaha

the shortcut not available in any folder of the device , as of the explorer of the device
Image
GHAZALO
Posts: 18
Joined: Sat Nov 05, 2022 2:16 pm

Re: add volume2 shortcut in volume1

Post by GHAZALO »

now i will review all the earlier to see how to be admin first i thought i am already
Attachments
Capture.JPG
Capture.JPG (54.09 KiB) Viewed 2001 times
Image
User avatar
Nazar78
Posts: 2084
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: add volume2 shortcut in volume1

Post by Nazar78 »

It works and it's there if you see in the terminal using `ls -l /volume2/V2/V2-ShortCut/` but this depends on how the apps handles the links. Some apps won't do it, some don't allow cross-linked file system and some do allow but you need to set it in the app (follow symlink like Samba, Nginx etc.).

This is also the same for Windows, it depends on the apps. Some Windows apps doesn't recognize mapped drives, shares or NTFS mounts.

If you find it is scary, I understood it's not what normal users will do, but if you really need such features, then I would suggest play around first in a VM or Windows WSL. Bash, CMD, PowerShell etc. is almost similar tailored to its architecture which first you'll need to comprehend its fundamentals. Only then you could unleash the power of your NAS, more fun things to learn and do.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2084
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: add volume2 shortcut in volume1

Post by Nazar78 »

I've edited the script slightly to work properly as init scripts, not just a simple shell script.

Edited: Note it will run as root at startup hence no need for sudo but you'll need to do one time command(s) to set the mounted target directory's ownership (using chown) and permission (chmod) depending on the apps and users accessing, else normal users can't access it, those depends how you manage your system and data.
Last edited by Nazar78 on Sun Nov 06, 2022 4:15 am, edited 1 time in total.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
GHAZALO
Posts: 18
Joined: Sat Nov 05, 2022 2:16 pm

Re: add volume2 shortcut in volume1

Post by GHAZALO »

thanks man yea it seems a deep sea and want some one to dive in

but i may dive shallow to catch the fish i want but not to keep diving to me using the panel is comfort not the command

so here we are in the (bind) way
what the command will be to place inside volume1/Downloadshortcut for volume2/V2

Code: Select all

sudo mkdir -p /share/V2-Download/folder2-V2;

sudo mount --bind /share/V2-ShortCut /share/folder1-volume1/folder2-volume2;
i am considering ill bring the admin and other stuff lol so we reach this point:)

thanks

Adding: I think

Code: Select all

sudo mkdir -p /share/ShortCut-volume1/V2-volume2;
Image
User avatar
Nazar78
Posts: 2084
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: add volume2 shortcut in volume1

Post by Nazar78 »

Use the shares points created, don't use volume points you will not see it in shares only volume paths as the shares are mounted on the /share path.

Code: Select all

sudo mkdir -p /share/Download/V2-Download;

sudo mount --bind /share/V2 /share/Download/V2-Download;
If that works, copy to the script but remove the sudo as the init scripts will run as root. Read that post again as I've edited.
Last edited by Nazar78 on Sun Nov 06, 2022 4:37 am, edited 2 times in total.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “Tips & Tricks”