Auto-Mounting CD-ROM and USB
This is a simple way to have devices such as external USB drives and CD/DVD-ROM's automatically detected and mounted when you insert them.
Ideally you want a system where devices are recognised and mounted to the server whenever they are connected, and can simply be removed when you have finished without having to explicitly 'un-mount'. This is possible with the auto-mount 'autofs' package...
The benefit of this method is the device will only be mounted to the server when it is present and required, after a period of inactivity the device is automatically un-mounted until it is required again (with the --timeout=5 command - see below). This is very important for CD/DVD ROMs as you aren't able to eject the disk while it is mounted, and for 'hot swappable' devices like USB drives and pen sticks, as sometimes files aren't actually written to the device immediately (and the un-mounting forces the write).
Install autofs
First install the auto-mount "app-autofs" package, login as root with PuTTY and enter:
yum install app-autofs
Then set the auto-mount service to automatically start on system boot. This can be done from the ClearOS web interface by navigating to System / Services and set 'File System Detection / Automount' to 'Auto'.
Modify the auto.master file:
Login with WinSCP and double click on the '/etc/auto.master' file to edit and add the following line to the bottom of the file:
/media/Drives /etc/auto.drives --timeout=5 --ghost
Create a new map file:
Create a new file /etc/auto.drives either by navigating to the /etc directory with WinSCP and selecting "File-New-File...", or from PuTTY enter:
touch /etc/auto.drives
With WinSCP, double click on the '/etc/auto.drives' file to edit and add the following lines:
CD -fstype=auto,ro,nosuid,nodev,user :/dev/hdc
USB1 -fstype=auto :/dev/sdb1
USB2 -fstype=auto :/dev/sdc1
USB3 -fstype=auto :/dev/sdd1
USB4 -fstype=auto :/dev/sde1
My CD ROM is attached to the second IDE channel as Master, so has the device location /dev/hdc, adjust this to suit your setup. (See the Adding Extra Hard Drive page for more information).
USB devices are mounted as a SCSI/SATA device so use the /dev/sdx type device locations. (See the Adding Extra Hard Drive page for more information). As I'd already used one SATA hard-drive for my main system drive (which was allocated the /dev/sda location), the first USB device connected will get allocated the next following location (e.g. /dev/sdb). If you have multiple usb ports, add multiple devices to the auto.drives file.
Then for this to take effect restart the autofs service, with PuTTY enter:
service autofs restart
To view the CDROM or USB from a Windows PC
Assuming you have already set up Windows Networking with the instructions here, create a new Flexshare called "drives", then create a symbolic link between the flexshare directory and the drive mount point specified in the auto.master file above; log into PuTTY and enter the following:
ln -s /media/Drives /var/flexshare/shares/drives/
Now all the USB and CD-ROM devices should appear in the 'drives' network share directory from windows.
Microsoft's NTFS file system
By default Linux will support the FAT file system used by most USB keys, but larger USB hard drives tend to use the unsupported NTFS file system.
To install the NTFS drivers, first ensure you have added the RPMforge repo and then log into PuTTY and enter the following:
yum --enablerepo=rpmforge install fuse fuse-ntfs-3g