LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Moving /var to new partition (https://www.linuxquestions.org/questions/slackware-14/moving-var-to-new-partition-124618/)

burnpile 12-10-2003 12:21 PM

Moving /var to new partition
 
I've searched for this already but didn't get the specific answer I'm looking for, so here goes a new post.
My daughter used to dual boot XP/Slack 9 on her laptop. She decided to do away with the dual boot and run slack 9.1 alone (she likes kopete better than trillian was her reason heh). At the end of her hard disk, I made a 1 gig partition to hold some data from XP she wanted to keep. Slack is up and running, and the win partition is now reiserfs. What I'd like to do is move /var to this partition. Is this possible to do on the /var folder? I'm asking because it's so dynamic, she has an ATI video chip and it spits out messages to the x log pretty frequently.

Here's my partition scheme
Code:

                        cfdisk 2.12
                                                                   
                    Disk Drive: /dev/hda
              Size: 30005821440 bytes, 30.0 GB
    Heads: 255  Sectors per Track: 63  Cylinders: 3648
                                                                   
  Name    Flags  Part Typ        FS Type      [Label]    Size (MB
)-----------------------------------------------------------
  hda1              Primary          Linux swap                  509.97
  hda3    Boot  Primary          Linux ext2                  98.7
  hda4              Primary          Linux ReiserFS            6999.7
  hda5              Logical            Linux ReiserFS            10001.9
  hda6              Logical            Linux ReiserFS            11342.6
  hda7              Logical            Linux ReiserFS            1052.8

hda1 = swap
hda3 = /boot
hda4 = /
hda5 = /usr/local
hda6 = /home
hda7 = unmounted <future /var>

any ideas/suggestions/help is appreciated

Technoslave 12-10-2003 12:24 PM

You can give it a try.

What I'd do is load the boot CD and then chroot the main partitions ( not really needed, but it's easier than typing /mnt/sysimage all the time ).

From there, I'd do a cp -R from /var to /newvar, then mv /var /oldvar;mv /newvar /var, then change the fstab entry to point to the partition of the new /var. Reboot.

Hopefully that's a good enough outline for you on how to do it.

burnpile 12-10-2003 12:33 PM

Good idea. I never thought of using a boot cd. I'm trying it now :eek:


All times are GMT -5. The time now is 12:56 AM.