[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] [RaQ4] Adding 2nd drive



I was using this doc to setup a second drive, but the /home1 partition
does not show up when adding virtual sites:

http://list.cobalt.com/pipermail/cobalt-users/2002-February/064655.html

My setup a little different because my drive is hdb, not hdc, and for
some reason I find a swap partition on /dev/hdb1, so I made everything
/dev/hdb2 where the space is.

If not marked 'home', it seems the Cobalt GUI is looking something in
the '/vol' directory, which is empty, and a .cobaltsig file? Is there
something I need to generate?

    my %mounts = Cobalt::DiskUtils::disk_getmounts($Vol_sitepattern);
    my (%maxfree, %list);
    my ($key, $text);
                                                                                
    foreach $key (keys %mounts) {
        # special case $Vol_home
        if ($mounts{$key}{MountPoint} =~ /^\/$Vol_home/) {
            $list{$Vol_home} = $mounts{$key}{Free};
            if ($list{$Vol_home} > $maxfree{Value}) {
                $maxfree{Disk} = $Vol_home;
                $maxfree{Value} = $list{$Vol_home};
            }
            next;
        }
                                                                                
        # everything else
        $mounts{$key}{MountPoint} =~ /^$Vol_rootdir\/(\S+)$/o;
        next unless (-e "$mounts{$key}{MountPoint}/.cobaltsig");
        $list{$1} = $mounts{$key}{"Free"};
        if ($list{$1} > $maxfree{Value}) {
            $maxfree{Disk} = $1;
            $maxfree{Value} = $list{$1};
        }
    }
-- 
Robert