3

Another (hobbiest) sys admin on they same system as me, pointed out that there is 30Gb of unallocated space on the system. I have need of that space to create a new partition. (I'm going to make a fast scratch for HPC) Unfortunatly he never told me which of the many many devices on the system it was on. I think it might be on a pair of raided disks.

How can I find what unpartioned space exists on a system, accross all of its disks? I can do it one dist at a time with parted. (by cycling though each device using select /dev/sda , then print free) but that will take a while with the many disks and is a inelegant solution.

2

How about something like:

for disk in /dev/sd[a-z]; do
  parted $disk print free |
  grep -q "Free Space" && echo "unallocated space on $disk"
done

You might need to adjust the path /dev/sd[a-z] to fit your needs.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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