Re-allocating hard drive space


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Re-allocating hard drive space
# 1  
Old 01-05-2006
Re-allocating hard drive space

Hi,

Is their an easy way to realloate hard drive space on Solaris 10.
For example :

/c20td0 10G
/space 90 G

I would like to move some of the hard-drive space from "/space" and add it to "/c20td0". In Windows this can be easily done using Partition magic, anything similar for UNIX?
# 2  
Old 01-05-2006
If both of those partitions are on one physical disk drive, yes. You just have to be careful that you don't remove/move space from another partition. You would use the format command, pick the appropriate disk drive, pick the partiton option, print option (to see what you have now on that disk), then see if the two partitions are next to each other (or are the only ones there). Slice 2 is always left alone and not used.

Note - you will mess up your system if you don't know what you are doing!!!

Post the output of the following

df -kl
# 3  
Old 01-06-2006
df -kl
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 14453787 14171725 137525 100% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 2791728 1032 2790696 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
fd 0 0 0 0% /dev/fd
swap 2791032 336 2790696 1% /tmp
swap 2790744 48 2790696 1% /var/run
/dev/dsk/c0t0d0s3 98869370 65553 97815124 1% /space
/vol/dev/dsk/c0t2d0/051215_1301
65382 65382 0 100% /cdrom/051215_1301

As you can see I have tons of space on "/space" I would like to allocate some of that space to /. Well, I'm not really a unix person, so I don't know what I am doing and I'm not sure that I want to risk messing up my system and it not booting up again. Maybe I'll just try to uninstall the apps I have on / and re-install them on /space
# 4  
Old 01-06-2006
Sorry the above post of df -kl did not come out formatted properly
Code:
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    14453787 14171725  137525   100%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 2791728    1032 2790696     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
fd                         0       0       0     0%    /dev/fd
swap                 2791032     336 2790696     1%    /tmp
swap                 2790744      48 2790696     1%    /var/run
/dev/dsk/c0t0d0s3    98869370   65553 97815124     1%    /space
/vol/dev/dsk/c0t2d0/051215_1301
                       65382   65382       0   100%    /cdrom/051215_1301

# 5  
Old 01-06-2006
Code:
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    14453787 14171725  137525   100%    /
/dev/dsk/c0t0d0s3    98869370   65553 97815124     1%    /space

It seems that the only two partitions you have on c0t0d0 are / and /space.
You would have to double check this in the format utility. There are times when database software can use a partition (raw) and it won't show up on a df command output.

If these are the only two partitions being used, then you can do a couple of things:
1. Move complete directories from / to /space and link
Example: Move /opt/application to /space/application - do this while application is shut down (single user mode is best)
# cd /opt
# tar cf /space/application.tar ./application
# cd /space
# tar xpf /space/application.tar
Check that permissions, ownership, group is all correct
# cd /opt
# rm -r ./application
# ln -s /space/application ./application
Bring up application - have client check that it works - then delete /space/application.tar (if the move messes up the application, then you need this file to put it back into /opt)

2. Remove applications and reinstall in /space

3. Rebuild server with better partiton sizes

4. Look for the directories under / that are using up the space - could be applications, could be home directories, etc. Cut up /space partition into new partitons (again, I stress that other partitons need to be checked that they are not being used via the format command) such as /export/home (if that is where the home directories are located and are so huge that they should be moved)
Use format command to remove 10GB from /space and put it into an un-used partiton (let's say slice 4). newfs /dev/dsk/c0t0d0s4. Mount /dev/dsk/c0t0d0s4 to temporary directory (such as /mnt). Tar /export/home to file and extract to /mnt (see steps above). Rename /export/home to /export/oldhome. Unmount /mnt (umount /mnt), fsck /dev/dsk/c0t0d0s4, and mount as new /export/home (mount /dev/dsk/c0t0d0s4 /export/home). Once you have this working, then you have two more steps. Add new mount of /export/home to /etc/vfstab and remove /export/oldhome.

Look up these types of moves at sunsolve.sun.com or docs.sun.com to verify these steps.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Allocating Unallocated Drive Space from a SAN to a filesystem

Good Morning everyone, I want to know how to allocate unallocated drive space from a SAN to a file system that desperately needs the drive space. Does anyone have any documentation or tips on how to accomplish this? I am running on AIX version 6.1. (2 Replies)
Discussion started by: ryanco
2 Replies

2. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

3. UNIX for Dummies Questions & Answers

allocating space for samba users

I have installed samba by cmd yup install samba -a and configured my samba server.But i want my samba users to lo-gin from windows users and contain allocated amount of space. plz help me............ (1 Reply)
Discussion started by: yashwanthguru
1 Replies

4. Solaris

Allocating space to ufs /usr by using ZFS in solaris

Hi, Im currently having my diskspace allocation of my UFS filesystem in solris as 100% for /usr directory.I have created a zfs pool of 3 gb.I want to allocate space from my zfs pool to /usr so that i can free space in /usr.Please help me it is quiet urgent. (6 Replies)
Discussion started by: navjotmannan
6 Replies

5. Linux

Allocating available space to file system

have a VMWARE machine, I have extended it from 20GB to 30GB for Linux box. The linux box shows this for df -hal: Filesystem Size Used Avail Use% Mounted on -dev-mapper-VolGroup00-LogVol00 19G 5.9G 12G 34% - proc 0 0 0 - -proc sysfs 0 0 0 - -sys devpts 0 0 0 - -dev-pts -dev-sda1 99M 13M... (1 Reply)
Discussion started by: mackman
1 Replies

6. Shell Programming and Scripting

Need help on Linux script to monitor hard drive space

I'm new to Linux and have very limited experience with shell scripts in general. I am taking a class and I have to research online and come up with a shell script that monitors disk space. I also have to be able to explain it line by line. I've researched various sites and came across this shell... (3 Replies)
Discussion started by: wgreg23
3 Replies

7. UNIX for Advanced & Expert Users

allocating swap space on solaris 9

Hi, I have a solaris 9-sparc box, which after bouncing is giving swap space related error messages(that swap space is not enough). could it be possible that there was some command issued or setting made before bouncing, which was lost after bouncing? please let me know how i can add swap space... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

8. UNIX for Dummies Questions & Answers

Hard Disk drive space gone missing...

Sorry if this is totally the wrong place to post this but I have a question or something rather thats bugging me. I got a new Dell Inspiron laptop the other day and I was expecting it to have 80G on it, well atleast 70 or so after installation of OS and such but after looking carefully yesterday, I... (8 Replies)
Discussion started by: Ecclesiastes
8 Replies

9. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

10. UNIX for Dummies Questions & Answers

Trying to copy old hard drive to new hard drive.

:confused: ........I have a new hard drive and I need to copy ALL info from the old to the new. I would like to use the dd command. I know the command is as follows...... dd if=/dev/rdsk/c1t1d0s0 of=/dev/rdsk/???????? Where I have the question marks is the problem. How do I find out what the... (4 Replies)
Discussion started by: shorty
4 Replies
Login or Register to Ask a Question