Resizing file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Resizing file
# 1  
Old 01-20-2004
Resizing file

is there anything such as "resizing file for optimal disk usage"

if so, whats it about?
# 2  
Old 01-20-2004
Hi,

I'm going to try to explain with an example...
If you have a file of 2049 bytes and if each block has a size of 2048 bytes, that file will occupy 2 blocks, wasting 4096-2049 bytes... got it ? With this in mind, if you have thousands of small files with a little more of 2048 bytes, you can try to reduce them and get some free disk space...
# 3  
Old 01-20-2004
good example Jsilva.


This is really about determining what type of data you have on a particular filesystem... On systems with large amounts of data you will see the real impact of proper sizing of blocks.

However, In HPUX we dont use block size, we use extent-based sizing. All of our extents are divisible by 4mb... 4/8/12/16 etc... upto 256mb extents...

Many Filesystems in HPUX with mounted databases, use 64/128 for the extent size. My DBAs had me make my stripesize to 128mb b/c of the characteristics of their data.

The other thing about choosing the correct extent or block size is so that your number of writes are fewer...

If you have chunks of data... a small block size can be equally detrimental... causing you to have many more writes to those smaller blocks.

Choosing the right size is very important... Many vendors have recommendations that you can use to help determine what is right for your system.
# 4  
Old 01-21-2004
Quote:
Originally posted by jsilva
Hi,

I'm going to try to explain with an example...
If you have a file of 2049 bytes and if each block has a size of 2048 bytes, that file will occupy 2 blocks, wasting 4096-2049 bytes... got it ? With this in mind, if you have thousands of small files with a little more of 2048 bytes, you can try to reduce them and get some free disk space...

thank you

but how do you go about reducing them. what command?

does this involve editign the file with vi or cutting it with wc???
# 5  
Old 01-21-2004
Quote:
Originally posted by TRUEST
but how do you go about reducing them. what command?
Compress them with zcat, gzip, compress, zip...

Quote:
does this involve editign the file with vi or cutting it with wc???
If you have text files, you can edit them, just delete the lines you don't want... but it's a tedious job ! Compressing the files will be easier, cleaner and faster !
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Some doubts about resizing fs's in HP-UX

Hello, I'm new to HP-UX and I'm not sure about some concepts related to resizing fs's under this OS. First of all I'm only asking about resizing ONLINE, it means, without having to umount the fs nor rebooting, etc. Q1. I've read that in order to resize a fs online there are 2 requirements:... (3 Replies)
Discussion started by: asanchez
3 Replies

2. Solaris

Resizing a disk

I'm used to using AIX but a new box running Solaris I need a little help with. The disk are presented from a SAN, the disk needing to change is presented as 148GBs drive which was allocated to a file system as the same. I need to change that without losing any data. I know I can change the disk... (7 Replies)
Discussion started by: ltlawnman
7 Replies

3. Solaris

vxfs online resizing

Hi, I have two filesystems called /u009 and /u008. I need to release 60gb from /u009 and add it to /u008 fs through fsadm command.. these are vxfs filesystem..its urgent.. thanx in advance (5 Replies)
Discussion started by: bpsunadm
5 Replies

4. Solaris

Parition Resizing

Is there a way to take space from the /opt slice (/dev/dsk/c1t0d0s5) and then put it in the /var (/dev/dsk/c1t0d0s1)? In theory, I should be able to ufsdump /opt and /var to another drive. Use disk label to resize those two slices (ex. take 10G from opt and add to /var) and then newfs and dump back... (1 Reply)
Discussion started by: adelsin
1 Replies

5. SuSE

lvextend on ext3 resizing

Hi all IM very curious about one thing Im currently playing with a test server SLES x64 SP2, and I got to a serious issue which is really sorry for the word pissing me off. :mad: I created an pv, then vg and finaly some lv's which is fine. I mounted then and everything worked fine... (0 Replies)
Discussion started by: kl1ngac1k
0 Replies

6. Filesystems, Disks and Memory

Help with resizing partitions

Hi First post :o I have recently used Acronis (Backup software for data backup and disaster recovery in Windows and Linux - Acronis) to create identical systems that I need to build. Everything works OK, but one of the machine has a bigger harddisk (250G) than the one I used to create the... (2 Replies)
Discussion started by: forte712
2 Replies

7. AIX

Resizing VG with mirror

Dear Friends, I would like to know if there is any chance to expand a Volume Group, If this VG have a mirror. If there is any chance to do this what would be the safer way to avoid lost any data. Sorry about my English.:D Thanks a lot. (1 Reply)
Discussion started by: chrispaz
1 Replies

8. UNIX for Dummies Questions & Answers

Resizing File-Systems

can someone tell me the basic steps needed to resize and existing filesystem that already has data on it? thanks I dont need to be pointed to a website so any real time real life advice or help will be wholly appreciated (4 Replies)
Discussion started by: TRUEST
4 Replies

9. UNIX for Dummies Questions & Answers

resizing slices

I downloaded the Solaris recommended patched for x86 and tried to install it, but I got the message that I dont have enough disk space. I don't want to install the patches without the option to back out. Anyway I did a df -k and found that my root mount point is in 948MB whereas my /export/home is... (5 Replies)
Discussion started by: dangral
5 Replies

10. UNIX for Advanced & Expert Users

filesystems resizing

I want to resize my filesystem partitions. Reason is that I have 11GB of disk space unused by Unix which divvy reveals. Is there a way I could resize my filesystems without doing a reinstallation. The secondary problem is that the boot image is too large for a diskette (5MB). I'm running SCO... (10 Replies)
Discussion started by: sshokunbi
10 Replies
Login or Register to Ask a Question