|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
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 |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
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 |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
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. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Allocating space to ufs /usr by using ZFS in solaris | navjotmannan | Solaris | 6 | 02-18-2011 08:46 AM |
| Allocating available space to file system | mackman | Linux | 1 | 09-07-2010 05:34 PM |
| Need help on Linux script to monitor hard drive space | wgreg23 | Shell Programming and Scripting | 3 | 02-11-2010 01:57 AM |
| Hard Disk drive space gone missing... | Ecclesiastes | UNIX for Dummies Questions & Answers | 8 | 05-11-2006 03:00 PM |
| The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive | sirbijan | Filesystems, Disks and Memory | 0 | 04-05-2006 02:19 PM |
|
|