I wrote this for_my_own_use long ago, maybe it helps:
HOWTO add more diskspace to a e-smith server
Reason: because I have loads of small drives, and I wanted to see if it could be done. I wanted to add extra storage for ibays and users, because that’s where the storage is needed.
Part of the e-smith directory structure is as follows:
/home/e-smith/files/ibays ( samba shares)
/home/e-smith/files/users
The main operating system lives on a 2 G harddisk. (Install e-smith on this disk
first before doing anything else. Do not make users or ibays yet.
To add disks I borrowed info from: (
www.linuxnewbie.org/nhf/intel/hardware/hd_add.html) in short:
Connect the disk(s) to you motherboard and look at dmesg |more
to see what the new disks are called. Mine were:
/dev/hdc and /dev/hdd (/dev/hda would be the primary disk on the 1st ide connector. (IDE0))
Next you need to partition them. I choose a single partition per disk.
fdisk /dev/hdc ( have a look at the above link for more details)
fdisk /dev/hdd
And create the partition with 'n'. Don't forget to write it to the disk!
Next make the filesystem:
mkfs /dev/hdc1
mkfs /dev/hdd1
This bit is likely unnecessary, but it’s how I did it..
Then make some directories under the / ( on the original disk of course). These steps are probably not the cleverest, but this is how I worked it out. Any suggestions for improvements are welcome. I made 'ibays' and 'users'
mkdir users
mkdir ibays
copy the contents (should not be much) from /home/e-smith/files/ibays/
to /ibays/
same for users.. ( you end up with /home/e-smith/files/ibays/ibays, but
you have to keep the stuff in the original ibays somewhere, you can't (want)
keep the stuff in root.. think about it for a while..)
now use pico to edit /etc/fstab
my fstab now looked like this after editing:
LABEL=/ / ext2 defaults 1 1
LABEL=/boot /boot ext2 defaults 1 2
/dev/hdc1 /home/e-smith/files/ibays ext2 defaults 1 1
/dev/hdd1 /home/e-smith/files/users ext2 defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hda5 swap swap defaults 0 0
Do a mount -a
And bingo.. all is well. Do a df to verify.
Manually copy the files in /ibays and /users to the right place.
rm the /ibays and /users directories
From the normal e-smith manager, create your users and ibays.
Do this only if you sort of understand the process. If this is all magic, don't try until you understand! On the other hand, there is no better way of learning than messing up things.
good luck.