Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st September 2009
revzalot's Avatar
revzalot revzalot is offline
Shell Scout
Join Date: May 2008
Posts: 123
Default How to swap partitions Help

I made a mistake on my partition layout on my server:

$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a      509M   38.8M    445M     8%    /
/dev/wd0h      182G   34.0K    173G     0%    /home
/dev/wd0d     1008M    2.0K    958M     0%    /tmp
/dev/wd0g      5.9G    2.3G    3.3G    41%    /usr
/dev/wd0f      3.9G    2.9G    911M    76%    /var
/dev/wd0e     98.4G   22.6M   93.5G     0%    /var/mysql
/dev/wd1a      291G    146K    277G     0%    /var/vmail
I need to swap /var and /home so /var can get the 182G slice of /home.
Reply With Quote
  #2   (View Single Post)  
Old 1st September 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
Join Date: May 2008
Location: USofA
Posts: 1,547

just edit fstab. The rest entailed should be self explanatory.
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #3   (View Single Post)  
Old 1st September 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
Join Date: Apr 2008
Posts: 537

Here's something you can try:

1. boot into single-user mode.
2. cd /var ; dump 0af /home | restore xf -
3. cd /home ; dump 0af /var | restore xf -
4. interchange /var and /home mountpoints in fstab.
5. reboot to check if everthing works.
6. If (worked) : congrats! you can now rm -rf the redundant directories in /home and /var.
7. Else : revert the changes to fstab

Last edited by ephemera; 1st September 2009 at 08:48 AM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Operating BSD partitions through XP SunSpyda OpenBSD General 10 16th September 2009 08:22 PM
more than four primary partitions? gosha OpenBSD General 40 13th August 2009 11:43 AM
swap partition lumiwa FreeBSD General 6 11th September 2008 03:57 PM
Do you still use swap? JMJ_coder Off-Topic 22 11th July 2008 01:24 AM
partitions italogf FreeBSD Installation and Upgrading 5 7th July 2008 12:14 PM

All times are GMT. The time now is 04:10 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick