Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i installed os on second hardisk also mounted in /mnt
Disk /dev/sda: 500.1 GB, 500107862016 bytes // this is second hdd
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 60801 488279610 8e Linux LVM
Disk /dev/sdb: 160.0 GB, 160041885696 bytes // currently boot with this drive
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 19457 156183930 8e Linux LVM
i need to clone /dev/sdb to /dev/sda .
160 gb hdd (sdb)has mailserver and webserver(portal) installed in it.if i run dd if=/dev/sdb of=/dev/sda will mailserver and portal also run perfactly as running in sdb.
You have lost the two partitions you had in /dev/sda, wich I assume you didn't care about, and now you have an exact image of /dev/sdb in /dev/sda. Just take sda to the machine where you want the backup to be and start it. You will have a clone of the first one.
If you are happy with it you can resize your partition and then your file system to take advantage of that space you have unused in your drive (you only used 160GB from the 500GB you had).
@rodrifa
dd command work to make exactly clone of file system and also get boot hdd ...that's what i needed.
but it copied 160 gb hdd data.rest space are unallocated.so how should i use these unalocated data.shall i do with fdisk or some other command is their...?
Either you create a new partition with fdisk using the free space or you resize your last partition to collect the rest of the disk's space, if you do that (beware that the last partition could be the swap partition and you may need to move it to the end of the disk to resize the partition you want), you will later have to resize the filesystem, there are plenty of guides to do that task on the net so google for those guides and you will have the answers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.