NSLU2-Linux
view · edit · print · history

DS101.MultipleFoldersUSB History

Hide minor edits - Show changes to markup

April 18, 2008, at 08:04 AM by pem -- Describe umount
Changed lines 29-30 from:
to:
  1. To revert to the original situation, remove the binding with the umount command: umount /volume1/movies
Changed lines 43-44 from:
  1. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local /etc/rc.local).
to:
  1. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local /etc/rc.local).
  2. To revert to the original situation, remove the binding with the umount command: umount /volume1/music
September 21, 2006, at 09:56 AM by loys --
Changed lines 28-30 from:
  1. To make sure that the movies folder on your USB/eSATA disk gets mounted automatically to the movies folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/movies ] && mount -o bind /volumeUSB1/movies /volume1/movies. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local etc/rc.local).
to:
  1. To make sure that the movies folder on your USB/eSATA disk gets mounted automatically to the movies folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/movies ] && mount -o bind /volumeUSB1/movies /volume1/movies. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local /etc/rc.local).
September 21, 2006, at 09:48 AM by loys --
Changed line 43 from:
  1. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local etc/rc.local).
to:
  1. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local /etc/rc.local).
August 13, 2006, at 04:12 PM by Morten Nielsen --
Changed lines 14-15 from:

You need to have a USB/eSATA disk attached to your DiskStation? and you need to have shell access to the DiskStation? (telnet/ssh access).

to:

You need to have a USB/eSATA disk attached to your DiskStation and you need to have shell access to the DiskStation(telnet/ssh access).

Changed lines 21-23 from:
  1. Create an empty folder on your main disk named "movies" using the standard administrative web interface (port 5000) running on your DiskStation?. This will, as you might know, create a folder on you DiskStation? in "/volume1/movies".
  2. Access your DiskStation? shell using either telnet or ssh.
  3. Figure out where your USB/eSATA disk has been mounted. Do this by typing ls /. This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
to:
  1. Create an empty folder on your main disk named "movies" using the standard administrative web interface (port 5000) running on your DiskStation. This will, as you might know, create a folder on you DiskStation in "/volume1/movies".
  2. Access your DiskStation shell using either telnet or ssh.
  3. Figure out where your USB/eSATA disk has been mounted. Do this by typing ls /. This will present a list of folders in the root of your DiskStation. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
Changed lines 36-37 from:
  1. Access your DiskStation? shell using either telnet or ssh.
  2. Figure out where your USB/eSATA disk has been mounted. Do this by typing ls /. This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
to:
  1. Access your DiskStation shell using either telnet or ssh.
  2. Figure out where your USB/eSATA disk has been mounted. Do this by typing ls /. This will present a list of folders in the root of your DiskStation. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
August 13, 2006, at 03:45 PM by Morten Nielsen --
Changed lines 4-5 from:

Well, the usual – I take no responsibility for any data that you might loose due to following the guide, etc., etc., etc. My advice would be that you start by reading the guide all the way through and then decide if you are able to do what it says.

to:

Well, the usual – I take no responsibility for any data that you might loose due to following the guide, etc., etc., etc. My advice would be that you start by reading the guide all the way through and then decide if you are able to do what it says. The guide has only been tested on

  • ds101g+.
August 13, 2006, at 02:51 PM by Morten Nielsen --
Changed lines 7-8 from:

By default when you attach a USB or eSATA disk you will get access to a new folder named something similar to "usbshare1". This only allows you to set "global" user/group permissions for the entire USB/eSATA disk, since you can only create subfolders of "usbshare1" on the disk. If this is not a problem for you, then this guide doesn’t apply to you.

to:

By default when you attach a USB or eSATA disk you will get access to a new folder named something similar to "usbshare1". This only allows you to set "global" user/group permissions for the entire USB/eSATA disk, since you can only create subfolders of "usbshare1" on the disk.

Changed lines 10-11 from:

If you would like to create folders on your new USB/eSATA disk similarly to the way you do on your main disk (allowing different permissions for different folders on the disk) you should read on.

to:

The setup described below will allow you create folders on your USB/eSATA disk similarly to the way you do on your main disk – allowing different permissions for different folders on the disk

August 13, 2006, at 02:49 PM by Morten Nielsen --
Changed lines 10-11 from:

However, if you would like to create folders on your new USB/eSATA disk similarly to the way you do on your main disk (allowing different permissions for different folders on the disk) you should read on.

to:

If you would like to create folders on your new USB/eSATA disk similarly to the way you do on your main disk (allowing different permissions for different folders on the disk) you should read on.

August 13, 2006, at 12:02 PM by Morten Nielsen --
Changed line 41 from:
  1. If you could see the "test" folder simply remove it again by typing rmdir /volumeUSB1/music/test. If you cannot see it, then you either didn’t perform all steps above or the guide is broken :).
to:
  1. If you could see the "test" folder simply remove it again by typing rmdir /volumeUSB1/music/test. If you cannot see it, then you either didn’t perform all the steps above or the guide is broken :).
August 13, 2006, at 12:01 PM by Morten Nielsen --
Changed line 3 from:

Disclaimer

to:

Disclaimer

Changed line 40 from:
  1. Test that the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing mkdir /volumeUSB1/music/test. Now access the shared "music" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the music folder (You should also be able to see all of the old folders – if not you should start crying and read the Disclaimer again).
to:
  1. Test that the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing mkdir /volumeUSB1/music/test. Now access the shared "music" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the music folder (You should also be able to see all of the old folders – if not you should start crying and read the Disclaimer again).
August 13, 2006, at 11:58 AM by Morten Nielsen --
Changed lines 22-29 from:
  1. Figure out where your USB/eSATA disk has been mounted. Do this by typing "ls /". This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
  2. Create a folder named "movies" on your USB/eSATA disk by typing "mkdir /volumeUSB1/movies".
  3. Mount the movies folder created on your USB/eSATA disk to the movies folder created on your main disk. Do this by typing "mount -o bind /volumeUSB1/movies /volume1/movies".
  4. Test the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing "mkdir /volumeUSB1/movies/test". Now access the shared "movies" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the movies folder.
  5. If you could see the "test" folder simply remove it again by typing "rmdir /volumeUSB1/movies/test". If you cannot see it, then you either didn’t perform all the steps above or the guide is broken :).
  6. To make sure that the movies folder on your USB/eSATA disk gets mounted automatically to the movies folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: "[ -e /volumeUSB1/movies ] && mount -o bind /volumeUSB1/movies /volume1/movies". You can do this directly from the command line using the VI editor (i.e. "vi /etc/rc.local"). Alternatively you could copy the rc.local to one of the shared folders (i.e. "cp /etc/rc.local /volume1/public"), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. "cp /volume1/public/rc.local etc/rc.local").
to:
  1. Figure out where your USB/eSATA disk has been mounted. Do this by typing ls /. This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
  2. Create a folder named "movies" on your USB/eSATA disk by typing mkdir /volumeUSB1/movies.
  3. Mount the movies folder created on your USB/eSATA disk to the movies folder created on your main disk. Do this by typing mount -o bind /volumeUSB1/movies /volume1/movies.
  4. Test the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing mkdir /volumeUSB1/movies/test. Now access the shared "movies" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the movies folder.
  5. If you could see the "test" folder simply remove it again by typing rmdir /volumeUSB1/movies/test. If you cannot see it, then you either didn’t perform all the steps above or the guide is broken :).
  6. To make sure that the movies folder on your USB/eSATA disk gets mounted automatically to the movies folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/movies ] && mount -o bind /volumeUSB1/movies /volume1/movies. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local etc/rc.local).
Changed lines 36-42 from:
  1. Figure out where your USB/eSATA disk has been mounted. Do this by typing "ls /". This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
  2. Create a folder named "music" on your USB/eSATA disk by typing "mkdir /volumeUSB1/music".
  3. Move the contents of the music folder on you main disk to the music folder on your USB/eSATA disk. Do this by typing "mv /volume1/music/* volumeUSB1/music".
  4. Mount the music folder created on your USB/eSATA disk to the (now empty) music folder on your main disk. Do this by typing "mount -o bind /volumeUSB1/music /volume1/music".
  5. Test that the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing "mkdir /volumeUSB1/music/test". Now access the shared "music" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the music folder (You should also be able to see all of the old folders – if not you should start crying and read the Disclaimer again).
  6. If you could see the "test" folder simply remove it again by typing "rmdir /volumeUSB1/music/test". If you cannot see it, then you either didn’t perform all steps above or the guide is broken :).
  7. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: "[ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music". You can do this directly from the command line using the VI editor (i.e. "vi /etc/rc.local"). Alternatively you could copy the rc.local to one of the shared folders (i.e. "cp /etc/rc.local /volume1/public"), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. "cp /volume1/public/rc.local etc/rc.local").
to:
  1. Figure out where your USB/eSATA disk has been mounted. Do this by typing ls /. This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
  2. Create a folder named "music" on your USB/eSATA disk by typing mkdir /volumeUSB1/music.
  3. Move the contents of the music folder on you main disk to the music folder on your USB/eSATA disk. Do this by typing mv /volume1/music/* volumeUSB1/music.
  4. Mount the music folder created on your USB/eSATA disk to the (now empty) music folder on your main disk. Do this by typing mount -o bind /volumeUSB1/music /volume1/music.
  5. Test that the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing mkdir /volumeUSB1/music/test. Now access the shared "music" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the music folder (You should also be able to see all of the old folders – if not you should start crying and read the Disclaimer again).
  6. If you could see the "test" folder simply remove it again by typing rmdir /volumeUSB1/music/test. If you cannot see it, then you either didn’t perform all steps above or the guide is broken :).
  7. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: [ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music. You can do this directly from the command line using the VI editor (i.e. vi /etc/rc.local). Alternatively you could copy the rc.local to one of the shared folders (i.e. cp /etc/rc.local /volume1/public), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. cp /volume1/public/rc.local etc/rc.local).
August 13, 2006, at 11:54 AM by Morten Nielsen --
Changed line 26 from:
  1. If you could see the "test" folder simply remove it again by typing "rmdir /volumeUSB1/movies/test". If you cannot see it, then you either didn’t perform all steps above or the guide is broken :).
to:
  1. If you could see the "test" folder simply remove it again by typing "rmdir /volumeUSB1/movies/test". If you cannot see it, then you either didn’t perform all the steps above or the guide is broken :).
August 13, 2006, at 11:51 AM by Morten Nielsen --
Changed lines 13-14 from:

You need to have a USB/eSATA disk attached to your DiskStation? and you need to have shell access to the DiskStation? (telnet/ssh access).

to:

You need to have a USB/eSATA disk attached to your DiskStation? and you need to have shell access to the DiskStation? (telnet/ssh access).

August 13, 2006, at 11:50 AM by Morten Nielsen --
Changed lines 10-11 from:

However, if you would like to create folders on your new USB/eSATA disk similarly to the way you can on your main disk, setting different permissions for different folders on the disk, you should read on.

to:

However, if you would like to create folders on your new USB/eSATA disk similarly to the way you do on your main disk (allowing different permissions for different folders on the disk) you should read on.

August 13, 2006, at 11:49 AM by Morten Nielsen --
Changed lines 7-8 from:

By default when you attach a USB or eSATA disk you will get access to a new folder named something similar to "usbshare1". This only allows you to set "global" user/group permissions for the entire USB/eSATA disk, since you can only create subfolders of "usbshare1" on the disk. If this is not a problem for you, then this article doesn’t apply to you.

to:

By default when you attach a USB or eSATA disk you will get access to a new folder named something similar to "usbshare1". This only allows you to set "global" user/group permissions for the entire USB/eSATA disk, since you can only create subfolders of "usbshare1" on the disk. If this is not a problem for you, then this guide doesn’t apply to you.

August 13, 2006, at 11:48 AM by Morten Nielsen -- Initial page
Added lines 1-42:

(:title Sharing multiple folders from USB/eSATA disk:)

Disclaimer

Well, the usual – I take no responsibility for any data that you might loose due to following the guide, etc., etc., etc. My advice would be that you start by reading the guide all the way through and then decide if you are able to do what it says.

The default setup

By default when you attach a USB or eSATA disk you will get access to a new folder named something similar to "usbshare1". This only allows you to set "global" user/group permissions for the entire USB/eSATA disk, since you can only create subfolders of "usbshare1" on the disk. If this is not a problem for you, then this article doesn’t apply to you.

The modified setup

However, if you would like to create folders on your new USB/eSATA disk similarly to the way you can on your main disk, setting different permissions for different folders on the disk, you should read on.

Requirements

You need to have a USB/eSATA disk attached to your DiskStation? and you need to have shell access to the DiskStation? (telnet/ssh access).

Creating a new folder on your USB/eSATA disk

For the sake of this example we will create a new folder named "movies" on your USB/eSATA disk.

If you want to move a folder that already exists on your main disk, to your new USB/eSATA disk you should refer to the section "Moving a folder to you USB/eSATA disk".

  1. Create an empty folder on your main disk named "movies" using the standard administrative web interface (port 5000) running on your DiskStation?. This will, as you might know, create a folder on you DiskStation? in "/volume1/movies".
  2. Access your DiskStation? shell using either telnet or ssh.
  3. Figure out where your USB/eSATA disk has been mounted. Do this by typing "ls /". This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
  4. Create a folder named "movies" on your USB/eSATA disk by typing "mkdir /volumeUSB1/movies".
  5. Mount the movies folder created on your USB/eSATA disk to the movies folder created on your main disk. Do this by typing "mount -o bind /volumeUSB1/movies /volume1/movies".
  6. Test the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing "mkdir /volumeUSB1/movies/test". Now access the shared "movies" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the movies folder.
  7. If you could see the "test" folder simply remove it again by typing "rmdir /volumeUSB1/movies/test". If you cannot see it, then you either didn’t perform all steps above or the guide is broken :).
  8. To make sure that the movies folder on your USB/eSATA disk gets mounted automatically to the movies folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: "[ -e /volumeUSB1/movies ] && mount -o bind /volumeUSB1/movies /volume1/movies". You can do this directly from the command line using the VI editor (i.e. "vi /etc/rc.local"). Alternatively you could copy the rc.local to one of the shared folders (i.e. "cp /etc/rc.local /volume1/public"), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. "cp /volume1/public/rc.local etc/rc.local").

Moving a folder to you USB/eSATA disk

For the sake of this example we will move an existing folder named "music" from your main disk to your USB/eSATA disk.

If this is the first time you try this part of the guide I would strongly advice that you do not start by trying to move a folder with all of you most important files.

  1. Access your DiskStation? shell using either telnet or ssh.
  2. Figure out where your USB/eSATA disk has been mounted. Do this by typing "ls /". This will present a list of folders in the root of your DiskStation?. Your main disk is mounted in "volume1". Your USB/eSATA disk will be mounted in a folder named something like "volumeUSB1" – it should be obvious which it is. The rest of this example will assume "volumeUSB1".
  3. Create a folder named "music" on your USB/eSATA disk by typing "mkdir /volumeUSB1/music".
  4. Move the contents of the music folder on you main disk to the music folder on your USB/eSATA disk. Do this by typing "mv /volume1/music/* volumeUSB1/music".
  5. Mount the music folder created on your USB/eSATA disk to the (now empty) music folder on your main disk. Do this by typing "mount -o bind /volumeUSB1/music /volume1/music".
  6. Test that the setup by manually creating a folder directly on USB/eSATA disk. Do this by typing "mkdir /volumeUSB1/music/test". Now access the shared "music" folder using your preferred method (e.g. Windows shared folder, ftp, etc) and verify that you can see the "test" folder inside the music folder (You should also be able to see all of the old folders – if not you should start crying and read the Disclaimer again).
  7. If you could see the "test" folder simply remove it again by typing "rmdir /volumeUSB1/music/test". If you cannot see it, then you either didn’t perform all steps above or the guide is broken :).
  8. To make sure that the music folder on your USB/eSATA disk gets mounted automatically to the music folder on your main disk during bootup you should add the following line to you "/etc/rc.local" file: "[ -e /volumeUSB1/music ] && mount -o bind /volumeUSB1/music /volume1/music". You can do this directly from the command line using the VI editor (i.e. "vi /etc/rc.local"). Alternatively you could copy the rc.local to one of the shared folders (i.e. "cp /etc/rc.local /volume1/public"), edit the "rc.local" file using your favorite text editor and copy the file back from the shared folder (e.g. "cp /volume1/public/rc.local etc/rc.local").
view · edit · print · history · Last edited by pem.
Based on work by loys and Morten Nielsen.
Originally by Morten Nielsen.
Page last modified on April 18, 2008, at 08:04 AM