Support > General Help & Advice

Mounting hard-drives from external sources. [Solved]

(1/16) > >>

BkS:
I'm currently trying to permanently mount my NAS's 3 hard-drives to a single directory. It won't matter if the drives have different names as they'll just be for storing files anyway. I need to create symlinks, but I don't know how to do that.

Output from commands:


--- Code: ---
mount
--- End code ---

(click to show/hide)bks@bally-server:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdb1 on /media/Storage type ext3 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdc1 on /media/Storage 2 type ext3 (rw,nosuid,nodev,uhelper=udisks)


--- Code: ---
sudo nano /etc/fstab
--- End code ---

(click to show/hide)# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=ff0a5255-09f5-4b23-a2d2-8db9cebc726d /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=652469de-ef92-47ea-8e42-25deb43687fe none            swap    sw              0       0



--- Code: ---
sudo fdisk -l
--- End code ---

(click to show/hide)bks@bally-server:~$ sudo fdisk -l

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000097c9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4661    37431296   83  Linux
/dev/sda2            4661        4866     1648641    5  Extended
/dev/sda5            4661        4866     1648640   82  Linux swap / Solaris

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00073313

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       24321   195358401   83  Linux

Disk /dev/sdc: 20.5 GB, 20490559488 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004827c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        2491    20008926   83  Linux

Mark Greaves (PCNetSpec):
Bearing in mind one of the drives is only 20GB .. what do you want the mountpoints, and therefore the visible folders on the NAS to be called ?

Sommat like

Docs = 20GB
and
Main_Share = 200GB

?

BkS:
Wallpapers = 20GB
Main Share = 200GB

Mark Greaves (PCNetSpec):
OK, lets create the mountpoints, and the NAS-Shares directory -


--- Code: ---
mkdir ~/NAS-Shares
sudo mkdir /mnt/NAS-20GB
sudo mkdir /mnt/NAS-200GB
--- End code ---

OK, now for the symlinks (I'll use the suggested names above, so adjust if you wish) -


--- Code: ---
ln -s /mnt/NAS-20GB ~/NAS-Shares/Wallpapers
ln -s /mnt/NAS-200GB ~/NAS-Shares/Main_Share
--- End code ---

Now lets make sure the ~/NAS-Shares directory ISN'T writeable ..


--- Code: ---
chmod 555 ~/NAS-Shares
--- End code ---

Now backup your /etc/fstab (just in case)


--- Code: ---
sudo cp -v /etc/fstab /etc/fstab.backup
--- End code ---

Open fstab for editing:


--- Code: ---
sudo nano /etc/fstab
--- End code ---

and add the two lines at the bottom so it reads:-


--- Code: ---
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=ff0a5255-09f5-4b23-a2d2-8db9cebc726d /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=652469de-ef92-47ea-8e42-25deb43687fe none            swap    sw              0       0
/dev/sdb1 /mnt/NAS-200GB       ext3       rw,errors=remount-ro       0       0
/dev/sdc1 /mnt/NAS-20GB       ext3       rw,errors=remount-ro       0       0
--- End code ---

SAVE fstab ..

Now run:

--- Code: ---
sudo mount -a
--- End code ---

and post any output.

If nothing is returned .. post the output from:

--- Code: ---
mount
--- End code ---


Is there anything currently on those drives ?

IF YES .. can you confirm you can see the contents with:

--- Code: ---
ls ~/NAS-Shares/Wallpapers
--- End code ---
and

--- Code: ---
ls ~/NAS-Shares/Main_Share
--- End code ---

BkS:

--- Quote from: Mark Greaves (PCNetSpec) on April 15, 2012, 02:27:30 pm ---
If nothing is returned .. post the output from:

--- Code: ---
mount
--- End code ---

--- End quote ---

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdb1 on /media/Storage type ext3 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdc1 on /media/Storage 2 type ext3 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdb1 on /mnt/NAS-200GB type ext3 (rw,errors=remount-ro)
/dev/sdc1 on /mnt/NAS-20GB type ext3 (rw,errors=remount-ro)



--- Quote ---Is there anything currently on those drives ?

--- End quote ---

Nope.

Navigation

[0] Message Index

[#] Next page

Go to full version