Koozali.org: home of the SME Server

[Announce] usbdisks manager

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« on: January 29, 2007, 06:31:48 PM »
Here is a new contrib to manage your usb disks thanks to the server manager.

your disk must already have been partitioned and formated, with a UUID.

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

you will be able to add a mount point for each partition and the contrib will do the mount every time it is plugged. and to auto mount drives when pluged in your media directory.

/!\ firewire can be supported if you have a kernel that allow it (the one from centos is not fully compliant)

JPP

waiting for your informations

/edit/
new release 0.2-0.1
using yum to install

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: [BETA] usbdisks manager
« Reply #1 on: January 29, 2007, 10:53:28 PM »
Quote from: "unnilennium"
rpm -Uvh http://www.pialasse.com/RPMS/smeserver-usbdisksmanager-0.1-0.3.noarch.rpm
Please do not use rpm to install as SME Server uses yum by default.[list=1]
  • Download the rpm using wget for instance
    Code: [Select]
    wget http://www.pialasse.com/RPMS/smeserver-usbdisksmanager-0.1-0.3.noarch.rpm
  • Do a yum localinstall
    Code: [Select]
    yum localinstall smeserver-usbdisksmanager-0.1-0.3.noarch.rpm[/list:o]Advantages of yum is that all necessary dependencies can be resolved and downloaded from enabled repositories.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #2 on: January 31, 2007, 11:14:49 PM »
new release :

wget http://www.pialasse.com/RPMS/smeserver-usbdisksmanager-0.1-0.5.noarch.rpm
yum localinstall smeserver-usbdisksmanager-0.1-0.5.noarch.rpm

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[Announce] usbdisks manager
« Reply #3 on: February 01, 2007, 04:50:22 AM »
Could I use this same contrib to manage firewire disks?  :?

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #4 on: February 01, 2007, 01:16:20 PM »
As i have no fire wire disk for the moment i have not tested; but you should test.

Tell me if it works, if yes it's perfect, if no i 'll ask you some information to add the support :

what is the result of :
Code: [Select]
/usr/bin/udevinfo -a -p /sys/block/sda
(if the partition you want to manage is /dev/sda1)

I need the first lines like this:

Quote
follow the class device's "device"
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0':
    BUS="scsi"
    ID="2:0:0:0"

this example is from a usb disk

Offline Mjohnson

  • *
  • 172
  • +0/-0
[Announce] usbdisks manager
« Reply #5 on: February 03, 2007, 04:53:18 PM »
Works great.  Thanks for the contribution.
......

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #6 on: February 04, 2007, 04:29:56 PM »
release 0.5

added FireWire support
some littles things corrected
added help page


There's a known issue to add UUID to a disk which has no UUID: it seems impossible through the manager nothing happen. so it is assumed that usb drive are well formatted with you label and UUID set and unique .


wget http://www.pialasse.com/RPMS/smeserver-usbdisksmanager-0.1-0.5.noarch.rpm

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

nitrouze

[Announce] usbdisks manager
« Reply #7 on: March 03, 2007, 12:18:44 PM »
Hi,

First, merci for the contrib  :wink:

Can I suggest to add mounting options to the db and panel as some specific options might be needed by other contribs (ie suid for apache ...) ?

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #8 on: March 03, 2007, 01:14:51 PM »
yes this a great idea.
I was planning on making a new release with auto mount for the /media folder as it is often asked. It another good thing you suggest.


Can you explain exactly what option would be needed to you.

JPP

nitrouze

[Announce] usbdisks manager
« Reply #9 on: March 03, 2007, 02:04:22 PM »
As more and more contribs, especially backups ones, are depending on "external drives", what about adding a "mount option" to the panel to set the -o options of mount ...

- The default (no user input) could be "defaults" which should be ok for most of us (even if it's very permissive !)

- Specific needs for mounting could be set there according to mount -o syntax.

Quick exemple:
I'm using backuppc contrib via an usb drive mounted to /opt/backuppc, it needs "suid" option for web interface to work properly, so I add to manually modify your perl script to replace ...

#my $mount=`/bin/mount $dev -t auto $dest -o pamconsole,exec,noauto,managed`;

with ...

my $mount=`/bin/mount $dev -t auto $dest -o defaults`;

but it could preferably be ...

my $mount=`/bin/mount $dev -t auto $dest -o $DEFINED_MOUNT_OPTIONS`;

Another idea could be to use the label of the partition to try to guess its role (identified contrib ?) and its mount options need.

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #10 on: March 03, 2007, 02:18:15 PM »
what do you think about to guess it by searching the guid and uid of the destination folder and giving to the mount the same uid option ?

+ some personal option thanks to the panel.


JP

nitrouze

[Announce] usbdisks manager
« Reply #11 on: March 03, 2007, 05:38:55 PM »
It seems quite difficult to guess who's owning the share as the uid/guid 's mount point aren't representative enough.

/opt/backuppc being the mount point ...
ls -ld /opt/backuppc/
drwxr-xr-x  9 root root 4096 Mar  2 18:59 /opt/backuppc/
but once drive is mounted ...
ls -ld /opt/backuppc/*
drwxr-xr-x  10 backuppc backuppc  4096 Feb 26 16:00 /opt/backuppc/files

In that case, you won't be able to guess the correct owner. :?

Additionaly, several users might share the same "usb volume" and this is why the suid is so helpfull.

Same problem with fstab, as it has no clue of what params/ownership to give to the partition.

The easiest way is probably the "personal options" within panel/db.

Offline okepc

  • ***
  • 118
  • +0/-0
    • http://www.okepc.nl
[Announce] usbdisks manager
« Reply #12 on: March 05, 2007, 09:39:18 AM »
What about a panel addon that you give the option to mount cifs,samba etc. shares over the network?

Would be a nice addon

And call it Smeserver-Mountmanager  8)

Dirk

Offline Confucius

  • ****
  • 235
  • +0/-0
[Announce] usbdisks manager
« Reply #13 on: March 23, 2007, 01:17:09 AM »
Is it maybe usefull to have a "prop" in confusbdisks that is considering quota's? Something like :

QuotaOn|yes

During boot the quota files will be build when they don't exist so that's not a real concern to worry about (AFAIK). Main problem is that it needs to be added to the mount options and now it seems not possible to do this.

I managed to deal with this to manually make a mount in fstab to another location and get quota's active but this is ofcourse not the most dynamic way. And dynamics is what we are looking for I think.

Harro

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
[Announce] usbdisks manager
« Reply #14 on: April 08, 2007, 11:41:40 PM »
to Nitrouze:

next release will try to support such setting : uid and gid for auto "mount_to"



to okepc:


Yes it would be nice,but at the moment i would like to perfect this tool for removable drive.

to Confucius:

everytime i try to manage quota on a removable drive i just fail can you make me a short but complete how to ?


in a few days a new release ...


JP