Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a new computer at the university and almost set up everything for myself on it when I've noticed that the previous user of the machine used a huge 1TB ext3 partition only.

I usually keep /home on a separate partition and I also prefer to use LVM, so I decided to shrink the partition using resize2fs and then create my usual LVM stuff in the space I freed up. (There is only about 30G of data on the whole hard drive, so it shouldn't be a problem).

I rebooted using a live CD and I asked resize2fs to shrink the partition to a more reasonable size (50G), and it seemed to move data around pretty intensively in the first quarter of an hour or so (judging from the noise of the hard drive).

Now it's been running for over three hours and practically no noise is heard from the HD, although the CPU usage is at 100%.

  1. Is this normal?
  2. Is resize2fs doing some intensive number crunching in the background for some reason and that's why I hear no noise from the HD?
  3. How much time should it take to resize the entire partition?
share|improve this question
    
Update: the whole process finished in a bit more than four hours, and yes, the HD was totally silent apart from the first 15 minutes or so. So, in a nutshell, this is totally normal. –  Tamás Dec 19 '10 at 17:08

2 Answers 2

up vote 2 down vote accepted

The times can be variable depending on loads of different things.

If you think there is a problem, open a new window or create a new PuTTY session and run dmesg (I/O errors or some such) and/or df -h (whether available space is increasing).

I suspect it will take quite a while in any case. No idea how long, personally. You might be faster to copy it to another network drive and reinstall.

share|improve this answer

Online resizing an ext4fs from 1 TB to 2 TB, on an RAID1 lvm2 took about 1h40min on a pair of seagate barracuta 2TB SATA drives. This was the root partition.

During this time, the CPU never went over 10% (cumulating md2_raid1 and md2_resize). The load was about 3.

If your resize2fs processes is eating 100% of your CPU and your HDD does not work, it really seems that it is stuck. Try to see if they are any (error) messages in the syslog.

Your setup is simpler (no RAID1 LVM), so it should have taken way less time, and during the process, your hard disk will work a lot, not your CPU.

Also, resize2fs has a -p flag (percentage), to display progression, but it is only in offline mode.

share|improve this answer
1  
I'm growing a partition in online mode right now and it seemed to have very low IO and CPU activity so I found this thread. megar's answer is useful to me since I now know not to panic that it's been going 20 minutes or more, but I also found that if I check the output of df a few times, the size of the partition is growing each time. Reassuring. I'm not sure if the same trick would show you progress in the same way while shrinking a partition, but worth a try. –  tremby May 26 '13 at 23:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.