Author Topic: Mounting hard-drives from external sources. [Solved]  (Read 14336 times)

0 Members and 1 Guest are viewing this topic.

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Mounting hard-drives from external sources. [Solved]
« on: April 15, 2012, 01:34:34 pm »
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: [Select]
mount

(click to show/hide)

Code: [Select]
sudo nano /etc/fstab

(click to show/hide)


Code: [Select]
sudo fdisk -l

(click to show/hide)
« Last Edit: January 28, 2013, 04:09:25 pm by BkS »
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #1 on: April 15, 2012, 01:46:14 pm »
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

?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #2 on: April 15, 2012, 02:08:31 pm »
Wallpapers = 20GB
Main Share = 200GB
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #3 on: April 15, 2012, 02:27:30 pm »
OK, lets create the mountpoints, and the NAS-Shares directory -

Code: [Select]
mkdir ~/NAS-Shares
sudo mkdir /mnt/NAS-20GB
sudo mkdir /mnt/NAS-200GB

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

Code: [Select]
ln -s /mnt/NAS-20GB ~/NAS-Shares/Wallpapers
ln -s /mnt/NAS-200GB ~/NAS-Shares/Main_Share

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

Code: [Select]
chmod 555 ~/NAS-Shares

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

Code: [Select]
sudo cp -v /etc/fstab /etc/fstab.backup

Open fstab for editing:

Code: [Select]
sudo nano /etc/fstab

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

Code: [Select]
# /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

SAVE fstab ..

Now run:
Code: [Select]
sudo mount -a

and post any output.

If nothing is returned .. post the output from:
Code: [Select]
mount



Is there anything currently on those drives ?

IF YES .. can you confirm you can see the contents with:
Code: [Select]
ls ~/NAS-Shares/Wallpapers
and
Code: [Select]
ls ~/NAS-Shares/Main_Share
« Last Edit: April 15, 2012, 02:36:27 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #4 on: April 15, 2012, 03:00:28 pm »

If nothing is returned .. post the output from:
Code: [Select]
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)
/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 ?

Nope.
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #5 on: April 15, 2012, 03:07:19 pm »
I'm a bit baffled as to why they are being mounted twice .. unless you're manually mounting them.

Can you reboot the server .. then send the output from:
Code: [Select]
mount

and DID you format them as ext3 or ext4 ?
« Last Edit: April 15, 2012, 03:09:13 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #6 on: April 15, 2012, 03:24:00 pm »
Can you reboot the server .. then send the output from:
Code: [Select]
mount

(click to show/hide)

Quote
and DID you format them as ext3 or ext4 ?

i formatted them as EXT3.
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #7 on: April 15, 2012, 03:34:37 pm »
OK .. is samba installed ?

What are the contents of:
Code: [Select]
nano /etc/samba/smb.conf
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #8 on: April 15, 2012, 04:00:26 pm »
Yes, samba is installed and working correctly, although Samba on my lappy doesn't. It won't find any other devices on the network. :o
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #9 on: April 15, 2012, 04:05:10 pm »
And what are the contents of /etc/samba/smb.conf on the server ?

We'll worry about your laptop later
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #10 on: April 15, 2012, 04:43:50 pm »
Contents of smb.conf for the NAS:

(click to show/hide)
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #11 on: April 15, 2012, 05:05:40 pm »
Add a new section at the bottom that reads:-

Quote
# NAS shares - added by BkS
[NAS Shares]
   path = /home/bks/NAS-Shares
;   available = yes
;   browseable = yes
   guest ok = yes
   writeable = yes

Save the file.

Restart samba:
Code: [Select]
sudo service smbd restart



Now go to your laptop .. open the pcmanfm file manager .. in the address bar, enter:
Code: [Select]
smb://192.168.0.8
and hit enter.

What is visible ?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #12 on: April 15, 2012, 05:16:54 pm »
I got errors.

Quote
Failed to retrieve share list from server

Quote
The specified location is not mounted
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18236
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #13 on: April 15, 2012, 05:20:40 pm »
When did you get that ?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Mounting hard-drives from external sources.
« Reply #14 on: April 15, 2012, 05:21:39 pm »
When I put smb://192.168.0.8 into the address bar in pcmanfm
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal