Hy, Situation under Debian Linux, Kernel 2.6.26-2: On a Block-Device (/dev/vdb) is a partition-table specifying one partition (/dev/vdb1) which contains a ext3-filesystem. I want to remove the partition-table and make the partition-data directly available under (/dev/vdb).

The only possibility which came to my mind was to copy the data from the partition to another device, remove the partition-table and directly create the filesystem on /dev/vdb, mount it and copy the data back.

Is there a faster solution which doesnt involve such a long downtime?

Thanks

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

You can backup data directly copying blocks (dd if=/dev/vdb1 of=.../backup), then copy it back overwriting everything (dd if=.../backup of=/dev/vdb) and then resize filesystem to match device size directly with resize2fs or with a tool like parted or gparted.

link|improve this answer
Is it really possible to directly save data on a block device, without using a partition? This would be completely new to me. I mean, with the ability to use it like any other device with partitions. – Bobby Jan 29 '10 at 12:38
There is no difference between a whole block device and partition when it comes to reading or writing. Really. Everything you can do with a partition you can do with a block device too: creating filesystem, mounting, etc... – whitequark Jan 29 '10 at 13:00
Well, didn't know that, thanks for the enlightenment! :) – Bobby Jan 29 '10 at 13:12
feedback

Your Answer

 
or
required, but never shown

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