mount new HDD on /var
Good day guyd,
SLES 9.0 2x SCSI 146GB ( Raid 0 ) I will be planing to add a 2 HDD drive to my ibm server. What I would to do is that I would like to mount all my free space of my new HDD to my /var folder. I don't know if this is possible. Can you help me ? |
You can connect your drive, partition it, make filesystem (for example ext3), and mount it to /var. Make sure you use /etc/fstab for mounting.
As your /var folder most likely is not empty you can rename /var to /var.old, make folder /var, mount the new drive into /var, and copy the files from /var.old to /var, and delete /var.old . You may want to do this in single user mode. Hope this was of some help. |
Quote:
|
Before you do anythin else, copy the contents of your var folder to the new drive using cp -vax *. Make sure to do this from a livecd/dvd. Then mv your /var to /var_bak (or whatever you prefer to name it) and create a line for var in your fstab.
|
just take the easy way and use
/mnt/( name for drive) and add /mnt/??? to fstab why dose it have to be /var also mounting a drive or partition to / is not a good idea ,for it must have the same permissions as / .And if selinux is installed it will through a fit until you mount it someplace else |
Quote:
Quote:
After that, change fstab, so your new disk is mounted on /var. After that, reboot, and you should have your new drive mounted without any pain. As said, make sure you use -a or equivalent options when copying. If you mess up the permissions you are going into serious trouble. The livecd step is needed because it's not a good idea to manipulate live partitions that might change at any time. You might end with uselss broken backups and you will have trouble to umount and mount it. |
All times are GMT -5. The time now is 12:30 AM. |