Re: [aclug-L] Adding Harddrive
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
David Carmichael wrote:
>
> One I hope quick and easy to answer question:
>
> If I install a second {slave} harddrive, what do I need to do to move the
> Linux Swap File to the new harddrive and recover the space on the master for
> the '\' or '\root'
>
> --David
If I recall (I did this a bit over two years ago) you'll need to do the
following:
fdisk second drive making one partition no larger than 128 MB, I
believe, and set it to Linux swap ID 82.
next you need to run mkswap(8) /dev/hdbX where X is the partition number
Then you should be able to run swapon(2) /dev/hdbX
run free to see if your swap size actually increased by the new amount.
Then run swapoff /dev/hdaX <- old swap partition
run free again to check that the swap size equals the new partition
edit /etc/fstab to point mount to the new swap partition for the next
time you boot. Don't edit /etc/mtab as it is created each time the
automounter runs.
Now you can recover the old swap space by running fdisk and resetting
the ID to 83
Then run mke2fs to build the file system on the old swap partition
mount the new partition at a convenient mount point and edit fstab to
automount that partition at your selected mount point each time Linux
starts.
Sit back and enjoy a cool one.
How close did I get?
- Nate >>
--
Packet | N0NB @ WF0A.#SCKS.KS.USA.NOAM | "None can love freedom
Internet | ka0rny@xxxxxxxxxx | heartily, but good
Location | Valley Center, Kansas USA EM17hs | men; the rest love not
Visit my Linux + Ham Radio pages | freedom, but license."
http://homepage.netspaceonline.com/~ka0rny/ | -- John Milton
|
|