Will this disk maintenance plan work? - BSD

This is a discussion on Will this disk maintenance plan work? - BSD ; I've been running FreeBSD 7 for awhile now, but in retrospect, I realize I had created a sub-optimal partitioning scheme during the install, specifically by creating a /home partition. Having a /home partition might make sense in some cases, but ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Will this disk maintenance plan work?

  1. Will this disk maintenance plan work?

    I've been running FreeBSD 7 for awhile now, but in retrospect, I
    realize I had created a sub-optimal partitioning scheme during the
    install, specifically by creating a /home partition. Having a /home
    partition might make sense in some cases, but I would prefer it and /
    usr to use up the remainder of my disk.

    Here's my current filesystem:

    # df
    Filesystem 1K-blocks Used Avail Capacity Mounted on
    /dev/ad0s1a 1063150 284022 694076 29% /
    devfs 1 1 0 100% /dev
    /dev/ad0s1f 10645326 904646 8889054 9% /home
    /dev/ad0s1e 507630 8626 458394 2% /tmp
    /dev/ad0s1g 689581684 3051346 631363804 0% /usr
    /dev/ad0s1d 3026574 59598 2724852 2% /var

    So, my thought to fix this was to:

    - copy /home's contents over to /usr/home
    - unmount /home
    - deleting /home from /etc/fstab
    - deleting /dev/ad0s1e (partition mounted to /home) in fdisk
    - symlinking /home to /usr/home
    - unmounting /usr
    - running growfs on /usr to reclain the lost 10GB

    Does this process look doable or is there anything I'm forgetting?

  2. Re: Will this disk maintenance plan work?

    On May 5, 1:36 pm, "Bruce C. Miller" wrote:
    > I've been running FreeBSD 7 for awhile now, but in retrospect, I
    > realize I had created a sub-optimal partitioning scheme during the
    > install, specifically by creating a /home partition. Having a /home
    > partition might make sense in some cases, but I would prefer it and /
    > usr to use up the remainder of my disk.
    >
    > Here's my current filesystem:
    >
    > # df
    > Filesystem 1K-blocks Used Avail Capacity Mounted on
    > /dev/ad0s1a 1063150 284022 694076 29% /
    > devfs 1 1 0 100% /dev
    > /dev/ad0s1f 10645326 904646 8889054 9% /home
    > /dev/ad0s1e 507630 8626 458394 2% /tmp
    > /dev/ad0s1g 689581684 3051346 631363804 0% /usr
    > /dev/ad0s1d 3026574 59598 2724852 2% /var
    >
    > So, my thought to fix this was to:
    >
    > - copy /home's contents over to /usr/home
    > - unmount /home
    > - deleting /home from /etc/fstab
    > - deleting /dev/ad0s1e (partition mounted to /home) in fdisk
    > - symlinking /home to /usr/home
    > - unmounting /usr
    > - running growfs on /usr to reclain the lost 10GB
    >
    > Does this process look doable or is there anything I'm forgetting?


    I have never tried this, but I'm throwing in my 2 cents.

    If it's not too late, I would check out growfs(8) one more time. Since
    all your partitions are on the same DOS slice, you will need to use
    bsdlabel to "delete" your parition instead of fdisk. Furthermore,
    since /usr comes after /home on the disk, I personally would use a
    livefs and...
    - backup system
    - move /home's contents to /home/home
    - copy /usr's contents to /home
    - unmount /usr and /home
    - symlink /home to /usr/home
    - modify /etc/fstab to mount /dev/ad0s1f as /usr
    - use bsdlabel to adjust ad0s1f's size from sizeof(ad0s1f) to
    sizeof(ad0s1f) + sizeof(ad0s1g)
    - growfs /dev/ad0s1f

    I have no way of testing this right now, but like I said, it's just my
    2 cents. growfs(8) indicates that it extends the partition, but I
    doubt it will add space to the beginning of the partition.

+ Reply to Thread