Koozali.org: home of the SME Server

[Announce] usbdisks manager

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #15 on: April 09, 2007, 01:13:03 AM »
As far as I remember I had more difficulty formatting the disk than hooking it up with quota's.

Current situation :

once mounted using the USB manager
once mounted by adding a different mountpath in /etc/fstab with parameters : usrquota,grpquota

As mentioned earlier; this was enough to make it come back "quotad" after a reboot. Might be that a re-mount could do the trick aswell. Didn't try that 1.

I had trouble to find out how your mounting scheme works for tampering with the options.

Harro

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #16 on: April 09, 2007, 02:07:33 AM »
Wanted to make sure that I gave the right information... failed...

but went on...

Took quota files from the disk, restarted server... resulting in an error during boot. No recreated quota files.

successfull steps:

touch /dev/sda1/aquota.user
touch /dev/sda1/aquota.group

chmod 600 /dev/sda1/aquota.user
chmod 600 /dev/sda1/aquota.group

mount -o remount /dev/sda1

quotacheck -vgum /dev/sda1

Took a while to round it up because of : quotacheck: Checked 3074 directories and 45373 files ... but after that it was back to normal again.

Didn't see the information in the server-manager tho... went on..

quotaoff /dev/sda1
quotacheck /dev/sda1
quotaon /dev/sda1

And back on track, as if nothing ever was demolished...

Hope this might be more usefull...

Another hint: SME can be installed with the option "noquota" when I remember right (too lazy to verify spelling) so your module should also comply with this maybe. When that option has been used it shouldn't ask if the "manager" wants to have quota's on the disk(s). I guess this can be verified by checking for the existence of quota files on the main disk.

Harro

Online Jean-Philippe Pialasse

  • *
  • 2,745
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #17 on: April 09, 2007, 11:28:34 PM »
And "Voila" ,

smeserver-usbdisksmanager 0.2 is released.

-added support for auto mount of drives inside media directory to the folder auto created

- added how to format my hard drive

- added mount options for the mount to (this will help for some applications).

wget http://mirror.contribs.org/smeserver/contribs/jppialasse/SME7/usbdisksmanager/smeserver-usbdisksmanager-0.2-0.1.noarch.rpm
or alternate
wget http://www.pialasse.com/RPMS/smeserver-usbdisksmanager-0.2-0.1.noarch.rpm

yum localinstall smeserver-usbdisksmanager-0.2-0.1.noarch.rpm

it can help to initialize quota, but i have not enought time to test it

JPP

PS: thanks Confucius for theses informations

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #18 on: April 10, 2007, 02:16:05 PM »
Ehmmmmm JPP..

I think there are a few minor issues that need more inspection:

WARNING in /etc/e-smith/templates//etc/crontab/usbdisks: Use of uninitialized value in string eq at /etc/e-smith/templates//etc/crontab/usbdisks line 19.
WARNING: Template processing succeeded for //etc/crontab: 1 fragment generated warnings
 at /sbin/e-smith/expand-template line 45

Harro

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #19 on: April 10, 2007, 02:31:11 PM »
Looks like you also forgot to put the status on enabled in the configuration or do I make a silly statement now because I never noticed this before ?

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #20 on: April 10, 2007, 03:38:10 PM »
JP,

I would like to think along but you have a lot on french. Would be nice when you put most on english so I can understand it better. Translation does help a little but still some things stay blurry to me.

When you have time, please consider this because I think there is enough potential in this module.

Harro

Online Jean-Philippe Pialasse

  • *
  • 2,745
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #21 on: April 10, 2007, 04:50:18 PM »
Yes I must advise that the module disable everytime you update this.

I know this is irritating but it is a safe way i thing to avoid bad mounting.

(I irritated the same way when I update the awstats contrib and i need to activate it again)


Sorry for the french in the source code.
And even for a french it might not be of a great utility as it is like a code :)
For the next version i will translate the comments.

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #22 on: April 10, 2007, 04:54:22 PM »
JP,

Another addition. It works pretty perfect this way... BUT.. to get quota's active it's needed (after each mount or reboot) to make clear that quota's should be ON for that specific disk. Maybe you see an option to add the command "quotaon /dev/sdX" when the actual mounting is done (and ofcourse either grpquota or usrquota (or both) is in the options) ?

Now I do that manually and seems to work good. Without that command the quota's show as zero's...

Harro

Online Jean-Philippe Pialasse

  • *
  • 2,745
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #23 on: April 10, 2007, 05:40:30 PM »
yes it could be transparent to add in the bash script and in teh perl script to execute thsi commande if the mount options contain grpquota or usrquota (or both) .

it is just a regular expression to do.

need to add this next week end.

Offline progitto

  • ****
  • 217
  • +0/-0
    • http://umbertomassari.dyndns.org
[Announce] usbdisks manager
« Reply #24 on: May 17, 2007, 08:48:49 AM »
Thank for this nice contribs!!
I have one question: I want save in a .txt file the list of the files of the removable disk on mount or auto-mount. I suppose that I have to add something like
Code: [Select]
ls [my_mount_position] -lRsh > /home/e-smith/files/ibays/primary/list.txt
in usr/sbin/usbdisks.sh.
The problem is that I can't understand where I have to do this ...  :oops:
Some tips for me?
Thanks

Online Jean-Philippe Pialasse

  • *
  • 2,745
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #25 on: August 01, 2007, 01:56:18 AM »
sorry for the long time before the answer, i guess you have found alone :

I would install it in the usr/sbin/usbdisks.sh.
for every disk that are not known:
after the mount $repertoire  in line 128

if you want this for the mount_to defined disk
after the mount commande line 51

if you want for known disk auto mount iin media:
after the mount line 86

that make me think about a pre / post custom command  for each drives.... to add in the contrib