Koozali.org: home of the SME Server

ibays, old hdd acces over network (NAS)

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: ibays, old hdd acces over network (NAS)
« Reply #15 on: April 07, 2015, 05:51:17 PM »
@gdh: you haven't told us exactly what's not working as you expect, but, from a quick look at your fstab, you've mounted your two additional drives in the root of the ibay (/dev/sda1 => /home/e-smith/files/ibays/privat and /dev/sdc => /home/e-smith/files/ibays/gemeinsam), my guess is that your drives do not have the expected top level "files" directory, but all your data is directly at the root of your drive. If that's the case, just mount your drive in the "files" directory of the ibay

Code: [Select]
/dev/sda1 /home/e-smith/files/ibays/privat/files ext4 usrquota,grpquota 1 1
/dev/sdc1 /home/e-smith/files/ibays/gemeinsam/files ext4 usrquota,grpquota 1 1

Then run

Code: [Select]
signal-event ibay-modify privat
signal-event ibay-modify gemeinsam

(This last command will update the permissions to those set on this ibays through the server-manager)
C'est la fin du monde !!! :lol:

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #16 on: April 07, 2015, 10:38:40 PM »
thank you all very much, i will try it, but at the moment i am 3 weeks in paris...

i have more plans with the sme than only local file access. i think sme fits perfect.


Offline idp_qbn

  • *****
  • 347
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #17 on: April 08, 2015, 10:28:14 AM »
Daniel B. :
An excellent summary! Thank you.
Now gdh should know he has a choice of (at least two) well established solutions and does not have to develop his own. Both SME and FreeNAS have large user-bases and excellent forums to offer assistance.

So, read the manual, do some planning, follow the guidelines and .... voila! Job done!

gdh : enjoy Paris, lucky sod!

Cheers
Ian
___________________
Sydney, NSW, Australia

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #18 on: April 16, 2015, 10:22:59 PM »
hey guys, back from my paris trip i tried something. and for the moment it seems to work.

i did:
Code: [Select]
/dev/sda1 /home/e-smith/files/ibays/privat/files ext4 usrquota,grpquota 0 0
/dev/sdc1 /home/e-smith/files/ibays/gemeinsam/files ext4 usrquota,grpquota 0 0

in etc/fstab

then:
Code: [Select]
signal-event ibay-modify privat
signal-event ibay-modify gemeinsam

then:
Code: [Select]
yum --enablerepo=smecontribs install smeserver-shared-folders
Code: [Select]
signal-event post-upgrade; signal-event reboot
created a folder,
reboot server
deleted the created folder

have access to my HDD

thank you all

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #19 on: April 17, 2015, 01:49:48 AM »
gdb

....but do you understand why ?

Each ibay has 3 folders created by the system when a new ibay is created ie
../ibayname/files
../ibayname/cgi-bin
../ibayname/html

These are hidden from view using samba when the ibay is not configured for Internet access, but any files you save or create are actually saved in ../ibayname/files folder.

When you enable Internet access for an ibay, in samba these three folders are visible & you need to select the required location (folder name) in which to save your data.
Normal data for local network file sharing would be saved to the ../files folder, data for web pages would be saved to the ../html folder & cgi code for web pages is saved to ../cgi-bin

You can see all this if you login at the command prompt as root & view the folder structure of ibays that have different Internet settings.

So when you originally mounted the drive to .../ibayname you did not have the three system folders on that drive, so SME server could not work as designed, thus the error you received.



Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #20 on: April 17, 2015, 08:05:40 AM »
actually i really dont understand why its now working...

but i guess it has something to do with that shared folders thing.

i did the first steps until signal-event, reboot
-> same error appears

with shared folders it works.

@ janet ahhh ok thank you



another few questions:
is there a possibility to put on a downloader. something like jdownloader, pyLoad.... for one click hoster on SME?

what is the propper way to install trusted software? via webinterface (https:server/server-manager) or via terminal and yum.
i would like to browse some software, maybe i find someone who already created something, which fits to my needs (then there is no need to start from scratch)

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #21 on: April 19, 2015, 04:05:43 AM »
hey,
it seems, my work isnt working properly :(

if i put files on the server, its placed on the wrong disk.

example:
from a windows machine i go to network -> sme server -> gemeinsam (ibay name) -> found the files on the 4tb disk.
now i add some files (was over 40gb) and i got an error, not enough disk space. (there should be more than 1tb).

i checked the 40gb system ssd and it was absolutely full. so the copied files wasnt copied to the 4tb. there were copied to the system ssd. (i dont want this)




so i bought another 4tb hdd to have a clean one for backups. (external, not in the server)
i reinstalled SME server 9.
i did
Code: [Select]
mkdir /mnt/4tb; mkdir /mnt/1tb
in fstab i add
Code: [Select]
/dev/sda1 /mnt/1tb usrquota,groquota 1 2
/dev/sdc1 /mnt/4tb usrquota,groquota 1 2

i rebooted and before it starts properly i got an error message during restart:
checking datasystems
/dev/sdc1 is in use.
e2fsck: continue not possible

/dev/sda1 is in use.
e2fsck: continue not possible.

during checking of datasystem occours an error. you will redirected to a shell.
give root password for maintenance



(maybe its not 100% word by word. my display is in german, tried to translate in english)

any ideas?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #22 on: April 19, 2015, 06:39:10 PM »
gdh

You said
/dev/sda1 /mnt/1tb usrquota,groquota 1 2
/dev/sdc1 /mnt/4tb usrquota,groquota 1 2

Is that a genuine mispelling or typo(s), it should be
grpquota

Edit:
Also it is a better approach to keep troubleshooting your existing setup, rather than reinstalling & changing your setup & then start to troubleshoot that new setup.

The goal posts keep changing, which makes it harder for others to help you.
« Last Edit: April 19, 2015, 06:48:51 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #23 on: April 19, 2015, 08:35:34 PM »
oh sry i typed wrong into the forum. it is correct on the fstab.

the setup is still the same. 1tb HDD for private shared data; 4tb HDD for local public data; 40gb SDD for system
the difference now is, i can format everything (external HDD, which i bought, is for backup purpose)

the goal is the same.
i want to mount the 2 HDD (1tb;4tb)
i want to have access via LAN from other machines to the 2 HDD
i want to be able to put new data on the 2 HDD
i want to set permissions to the 2 HDD (1tb, private only from special users, 4tb for everyone in local network)


so for the moment i re installed SME9 again. no changes...

Code: [Select]
df -T
[root@tape ~]# df -T
Filesystem           Type  1K-blocks    Used Available Use% Mounted on
/dev/mapper/main-root
                     ext4   30406684 1557132  27304952   6% /
tmpfs                tmpfs   3945352       0   3945352   0% /dev/shm
/dev/md0             ext4     247855   28550    206509  13% /boot

Code: [Select]
[root@tape ~]# mount -l
/dev/mapper/main-root on / type ext4 (rw,usrquota,grpquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/md0 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

Code: [Select]
# /etc/fstab
# Created by anaconda on Sun Apr 19 19:45:45 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/main-root   /                       ext4    usrquota,grpquota      $
UUID=990223be-580d-48d4-9dc3-b78eb23b3818 /boot                   ext4    defau$
/dev/mapper/main-swap   swap                    swap    defaults 0 0
tmpfs                   /dev/shm                tmpfs   defaults 0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults 0 0
proc                    /proc                   proc    defaults 0 0


i tried to fullow this guideline http://wiki.contribs.org/AddExtraHardDisk
but i got the error in the post before....

while the installation of SME9, the 2 HDD were not formatted. now we can format it. but i am very unsure about the 4tb HDD. some other linux dist. have huge problems with the 4tb.










« Last Edit: April 19, 2015, 08:41:16 PM by gdh »

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #24 on: April 19, 2015, 08:58:20 PM »
gdh

I suggest you try using only one drive first, ie the 1Tb drive.

After installing sme to the SSD, you would then connect the HDD & format it ext4
then you would follow the howto, there is no reason it should not work.

Rather than say verbally what you did, please post exact steps & commands you entered, & it is better to copy (& paste) them from the history rather than retyping them, that way we can see the actual comands you really did issue. In Putty you can copy the commands issued.

Re 4Tb drive (or drives equal or greater than 2Tb), sme9 wil handle those OK, but you need to partition/format using GPT, there is a procedure to follow (search forums on GPT), but I suggest you leave that till later when you sort out using the 1Tb drive.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #25 on: April 19, 2015, 09:06:02 PM »
ok

the HDDs are already connected to the system and formatted to ext4.

re format anyway?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #26 on: April 19, 2015, 09:20:43 PM »
gdh

No need to format again.
Just show us output of
fdisk -l

After that please remove the 4Tb drive & set up your mapping just using the 1Tb drive, to prove your procedures are correct.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #27 on: April 19, 2015, 09:34:21 PM »
Code: [Select]
[root@tape /]# fdisk -l

Platte /dev/sda: 1000.2 GByte, 1000204886016 Byte
255 K��pfe, 63 Sektoren/Spur, 121601 Zylinder
Einheiten = Zylinder von 16065 �� 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cade4

   Ger��t  boot.     Anfang        Ende     Bl��cke   Id  System
/dev/sda1   *           1          32      256000   fd  Linux raid autodetect
Partition 1 endet nicht an einer Zylindergrenze.
/dev/sda2              32      121602   976504832   fd  Linux raid autodetect

Platte /dev/sdb: 40.0 GByte, 40020664320 Byte
255 K��pfe, 63 Sektoren/Spur, 4865 Zylinder
Einheiten = Zylinder von 16065 �� 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aec50

   Ger��t  boot.     Anfang        Ende     Bl��cke   Id  System
/dev/sdb1   *           1          32      256000   fd  Linux raid autodetect
Partition 1 endet nicht an einer Zylindergrenze.
/dev/sdb2              32        4866    38824960   fd  Linux raid autodetect

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Platte /dev/sdc: 4000.8 GByte, 4000787030016 Byte
255 K��pfe, 63 Sektoren/Spur, 486401 Zylinder
Einheiten = Zylinder von 16065 �� 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Ger��t  boot.     Anfang        Ende     Bl��cke   Id  System
/dev/sdc1               1      267350  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Platte /dev/md1: 39.7 GByte, 39723073536 Byte
2 K��pfe, 4 Sektoren/Spur, 9698016 Zylinder
Einheiten = Zylinder von 8 �� 512 = 4096 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Platte /dev/mapper/main-root: 31.6 GByte, 31633440768 Byte
255 K��pfe, 63 Sektoren/Spur, 3845 Zylinder
Einheiten = Zylinder von 16065 �� 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Platte /dev/mapper/main-swap: 8086 MByte, 8086618112 Byte
255 K��pfe, 63 Sektoren/Spur, 983 Zylinder
Einheiten = Zylinder von 16065 �� 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Platte /dev/md0: 262 MByte, 262078464 Byte
2 K��pfe, 4 Sektoren/Spur, 63984 Zylinder
Einheiten = Zylinder von 8 �� 512 = 4096 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #28 on: April 19, 2015, 09:42:54 PM »
gdh

Show output of
cat /proc/mdstat
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gdh

  • *
  • 18
  • +0/-0
Re: ibays, old hdd acces over network (NAS)
« Reply #29 on: April 19, 2015, 09:46:47 PM »
Code: [Select]
[root@tape /]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc1[2] sdb1[1] sda1[0]
      255936 blocks super 1.0 [3/3] [UUU]
     
md1 : active raid1 sda2[0] sdc2[2] sdb2[1]
      38792064 blocks super 1.1 [3/3] [UUU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

unused devices: <none>