Disk Manager

From SME Server
Jump to: navigation, search

Disk Manager for SME Server

PythonIcon.png Skill level: medium
The instructions on this page require a basic knowledge of linux.

Contrib 9:
smeserver-usbdisksmanager
The latest version of smeserver-usbdisksmanager is available in the SME repository, click on the version number(s) for more information.


Maintainer

Unnilennium aka Jean-Philippe PIALASSE (Contrib)

Description

Disk Manager usage adds a panel to the server-manager showing attached USB drives.

It can also handle firewire ieee1394 disks. All you have to do is to add kernel module thanks to atrpms or to centosplus.

Installation

yum install smeserver-usbdisksmanager --enablerepo=smecontribs

Update

yum update smeserver-usbdisksmanager --enablerepo=smecontribs

Uninstall

rpm -e smeserver-usbdisksmanager

Usage

Firewire is not fully implemented in centos (so SME) kernel. If you want to use a firewire disk you need to use your own compiled kernel or the one from centosplus or adding kernel module thanks to atrpms . Be carefull you will need to compil appletalk, ppp an slip kmod for the kernel you choose (centosplus one or you own).

Configuration

Frequency : in minutes between two disk check (CRON job)

Status : enable or disable the automatic job completly

Status /media/ known : enable or disable auto mount in /media/ of known drives

Status /media/ unknown : enable or disable auto mount in /media/ of unknown drives

To allow to auto mount you need to enable in the configuration "Status", then add your drive and set a mount point that really exists and finally set this drive to enable


the use of the command mount is to mount to the folder created thanks to HAL in /media.

the use of the command mount to is to mount to your customized folder.

Add , Modify a drive

UUID : drive identification MountTo : directerory where you whant to mount this drive Options Mount : mount options for this drive (see man mount) Status : enable or disable auto mount to the defined directory for this drive (need to have the contrib set to enabled into configuration) Status media : enable or disable auto mount into /media directory (need to have the option enabled into the configuration)

your drive ext2 or ext3 has no UUID

connect to command line and execute as it seems to be impossible to do through the cgi interface:

UUID=`/usr/bin/uuidgen`
/sbin/tune2fs -U $UUID /sys/block/device

("device" should be sda1 if it is the partition you wants to point to)

your drive ext2 or ext3 has no LABEL

connect to command line and execute as it seems to be impossible to do through the cgi interface:

UUID=genuuid
tune2fs -L MyLabel /sys/block/device

("device" should be sda1 if it is the partition you wants to point to, and "MyLabel" to whatever you wants)

Format your drive

Before anything else:

You must be aware that a removable device SHOULD have name like /dev/sd[a-z]1 (sda, sdb , sdc ....) under linux. If you have only IDE (ATA) drives on your server there is no problem as they will be named: /dev/hd[a-z]1 (hda, hdb, hdc...). But if you have some SATA or SCSI drives thay will have same kind of name that can have a removable drive : sda ...

Drive named /dev/md[1-0]+ are some kind of software image of the real drives due to the LVM/ software RAID of SME.

Be carrefull when you choose your drive not to choose one of your system drive !. *If you are not 100% certain of what you do just format your drive on another computer UNDER linux.

Never format your drive under windows with a software like partition magic TM, you will fail using this drive because of some error resulting oon the format: impossible to create a UUID and other kind of things that are needed.


1- connect to you SME consol, and connect the drive (USB/firewire)

2- search for connected drive with this command:

   * sfdisk -l

3- create a new partition (change X for the letter that correspond to your drive):

   * fdisk /dev/sdX
   * p ( to check if there is already a partition on this drive)
   * if there is one, you should probably exit to see what is on this partition, and avoid to delete something wrong, just do: q
   * n (to add a new partition)
   * p (to make a primary partion)
   * 1 (that's the number one, the number you want to assign to the partition)
   * (accept the suggested first & last cylinder values)
   * w (write and exit)

4- format your new partition ( change X with what is needed for you, and same thing for the 1 if you have done more than one partition on your new drive)

   * mkfs -t ext2 /dev/sdX1

5- convert from ext2 to ext3

   * tune2fs -j /dev/sdX1

6- enable quotas (optionel)

   * quotacheck -vugc /dev/hdc1

7- add a Label (change X to what is needed for you, same thing for the 1 if needed) (MyLAbel must have no space and short)

   * tune2fs -L MyLabel /dev/sdX1

8- check everything is OK: UUID, Label (change X to what is needed for you, same thing for the 1 if needed) :

   * blkid /dev/sdX1

if it is not correct for UUID see the section above concerning how to add a UUID (you need a UUID to use this contrib)

9- Your drive is ready

Your drive can't be mounted thanks to usb disk manager

There is a known limit to this contrib : it can't handle drives that have only one partition that is called without a number : i mean : /dev/sda as partition instead of /dev/sda1. Please consider this before putting information on your drive to format it correctly.

Mounting FAT32 drives

Off-the-shelf pre-formated FAT32 disks can be mounted. These will mount through the vfat driver. This is convenient as it allows portability between the SME Server and a Windows machine. Because FAT32 does not support the UTF-8 character set, the following option must be added to the mount options:

   iocharset=iso8859-1

This option allows filenames with international characters to be written and read by both Windows XP and the SME server.

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-usbdiskmanager component or use this link .


IDProductVersionStatusSummary (5 tasks)
10294SME Contribs9.2CONFIRMEDtidy mount option
10293SME Contribs9.2CONFIRMEDshould not create disk entry if mount to is invalid or empty
10180SME Contribs9.0CONFIRMEDmount to media useless as is
10178SME Contribs9.0CONFIRMEDNFR: auto mount on plug.
3341SME Contribs7.2CONFIRMEDunknown dev : /dev/sda

Changelog

Only released version in smecontrib are listed here.

smeserver-usbdisksmanager Changelog: SME 9 (smecontribs)

2017/03/25 Jean-Philipe Pialasse 1.2-5.sme
- fix mount does not work [SME: 8597]

- new default for mounting options
2017/03/24 Jean-Philipe Pialasse 1.2-4.sme
- fix multiple issues for SME9 [SME: 8597]
2016/03/09 JP Pialasse 1.2-3.sme
- apply locale 2016-03-09 patch
2015/09/25 stephane de Labrusse 1.2-2.sme
- Initial release to contribs9
2013/07/14 JP Pialasse 1.0-3.sme
- apply locale 2013-07-14 patch