migrating from 18GB HD to a 72GB HD w/RH3.0
Hi,
My main drive (18GB) is /dev/sda and I want to transfer everything over to a new 72GB drive /dev/sdc. The current partitions are: [root@dell root]# df -H Filesystem Size Used Avail Use% Mounted on /dev/sda2 16GB 9.3GB 5.7GB 63% / /dev/sda1 105MB 25MB 80MB 24% /boot/efi none 11GB 0 11GB 0% /dev/shm /dev/sdb1 18GB 13GB 4.7GB 73% /mnt/disk2 I want /dev/sdc to have the identical /boot/efi partition and a 22GB swap partition. By the way, this is on a Dell PE 7150 Itanium machine, running RH Enterprise 3.0. It was easy for me to do something similar on a Sun machine by formatting the new HD with the format command followed by mkfile on each partition. All the steps were logical. But, when I tried to set up partitions using fdisk, I became confused. Nothing on the Internet helped. Once /dev/sdc is partitioned and file systems installed, I need to copy everything from /dev/sda to /dev/sdc. How should that be done? One big question: How come the 11GB swap area on /dev/sda does not show up as /dev/sd3? Phahn |
Quote:
fdisk -l Note: the df -H list doesn't actually show the filesystem type either. Quote:
Unlike the Sun systems you are used to, fdisk does it all by itself. Get to know the device. fdisk -l (note which one is the target drive - I'll call it sdc for now) Unmount all partitions. umount /dev/sdc1 (repeat for sdc2 sdc3 etc) Now to start: fdisk /dev/sdc Get rid of existing partitions (accounts for mistakes etc) p (show table) d (delete table) p (check all partitions gone) d (repeat until all partitions gone) Create /boot/efi partition: n (new partition) 1 (make it the first one) <enter> (accept default first cylinder) +105M (set partition size) a (make active) 1 (select partition) t (change filesystem note: consistent with -t, the mount option to specify fs) # (number of the filesystem you want, fat16 is number 6, I forget the others) Create swap partition: n > 2 > enter > +20480M > 1 > t > # for swap. (you could specify that this is partition 3 and set the first cylinder to the end and the size as -20480M, if you want.) Create root partition n > 3 > enter > enter > a > 1 > t > # for fs you want. Make these changes permanent: w (the write command) OR - leave off the create file-system steps if this confuses you. Instead use mkfs.ext3 for ext3 partitions and mkswap for the swap partition. Claro? |
I tried the advice from Guru, can't mount new HD
Hi,
I followed instructions to the best of my ability. Here is the result: [root@dell root]# fdisk -l Disk /dev/sda: 18.2 GB, 18210036736 bytes 255 heads, 63 sectors/track, 2213 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 2214 17783238+ ee EFI GPT Disk /dev/sdb: 18.2 GB, 18210036736 bytes 255 heads, 63 sectors/track, 2213 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 2214 17783238+ ee EFI GPT Disk /dev/sdc: 73.4 GB, 73407820800 bytes 255 heads, 63 sectors/track, 8924 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 * 1 14 112423+ ee EFI GPT /dev/sdc2 15 2505 20008957+ 82 Linux swap /dev/sdc3 2506 8924 51560617+ ee EFI GPT Disk /dev/sdd: 18.2 GB, 18210036736 bytes 255 heads, 63 sectors/track, 2213 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 1 2214 17783238+ ee EFI GPT Did I do something wrong? Recall that /dev/sda is the current main drive. /dev/sdc is the drive I just partitioned. I tried to mount /dev/sdc and was not able to. Here is one of the attempts: [root@dell root]# mount /dev/sdc1 /mnt/disk3 mount: you must specify the filesystem type [root@dell root]# mount -t EFI /dev/sdc1 /mnt/disk3 mount: fs type EFI not supported by kernel |
Disk /dev/sdc: 73.4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 * 1 14 112423+ ee EFI GPT /dev/sdc2 15 2505 20008957+ 82 Linux swap /dev/sdc3 2506 8924 51560617+ ee EFI GPT This looks right - [root@dell root]# mount /dev/sdc1 /mnt/disk3 mount: you must specify the filesystem type [root@dell root]# mount -t EFI /dev/sdc1 /mnt/disk3 mount: fs type EFI not supported by kernel The mount command is wrong - EFI is a variation on fat32, try: mount -t vfat /dev/sdc1 /mnt/disk3 Is this an intel/mac setup? |
Hi Simon,
I forgot to thank you for your help. I learned a lot and am very appreciative. I tried your suggestion: [root@dell root]# mount -t vfat /dev/sdc1 /mnt/disk3 mount: wrong fs type, bad option, bad superblock on /dev/sdc1, or too many mounted file systems It can't be too many mounted file systems. Bigger question. How come /dev/sda appears to have only one partition (see prev message), when a df -k gives: [root@dell root]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 15387444 9067568 5538236 63% / /dev/sda1 102182 24338 77844 24% /boot/efi none 10399184 0 10399184 0% /dev/shm ?? Peter |
OOOPS! I forgot to answer Guru's question. This is a six year old Dell PE 7150 Itanium server. It is a personal machine and no longer has any technical support.
|
Supported filesystems (from manpage):
Code:
The file system types which are currently supported Why use GPT anyway? None of your fs are going to be bigger that 2TB. Quote:
|
I can explain why I was confused.
Hi Simon,
Take a look at: http://kbase.redhat.com/faq/FAQ_80_3531.shtm It seems that fdisk -l gives me misleading information, because my machine is an Itanium-64. I was trying to make the new /dev/sdc have the same type file systems as I observed from fdisk -l. Regarding your questions: Quote:
Quote:
[root@dell root]# more /etc/fstab LABEL=/ / ext3 defaults 1 1 /dev/sda1 /boot/efi vfat defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/hda /mnt/ls120.0 auto noauto,owner,kudzu 0 0 Furthermore, I never have to specify type of file system when I mount any of the extra HDs. Quote:
Thanks Peter |
Situation improving considerably
Hi,
Using GNU's parted command gave me the details I needed from /dev/sda: Quote:
I followed this up with the following commands: mkfs.ext3 /dev/sdc1 (When I tried mkfs -t fat16, I got an error message.) mkfs.ext3 /dev/sdc2 mkswap /dev//sdc3 Then parted gave me the following encouraging result: Quote:
Does it matter that /boot is and ext3 filesystem? Can I go ahead an copy /dev/sda info to /dev/sdc? Peter |
I hope you don't mind me butting in but just before you go any further I think I should point out that swap space should probably be at most about twice the size of memory up to about 512 Meg not Gigabytes.
Otherwise you are just wasting disc space. If you are leaving all the discs in then you can just have one small swap space. Also just copying the files over will not be enough. You will need to edit some files. If you delete what is on sda then it will not boot unless you do other things. Why do you want to transfer everything over? If you are leaving all discs there then you can simply create a new Data/Home etc partition on the new drive, copy the needed files across, edit /etc/fstab and you will have much more space with a lot less hastle. |
Why I need 22GB of swap
Hi,
Thanks for asking. Quote:
Quote:
Peter |
Quote:
If your calculations are that complex bear in mind that Ram is, I believe. about 100 times as fast as virtual Ram ( i.e your swap ) so you would do better to add extra Ram Quote:
I can't remember the exact code off the top of my head but don't forget you would need to use dd to copy the first sector of what is at present sda to the first sector of what is presently sdc BEFORE you swap them over otherwise it would not boot. best wishes, Norman |
Still keeping fingers crossed that this will work
Hi Norman:
Quote:
Quote:
How does this sequence of commands look? # shutdown now (go to single user)(sda is mounted, sdc is not) # dd if=/dev/sda1 of=/dev/sdc1 bs=128k # fsck /dev/sdc1 # dd if=/dev/sda2 of=/dev/sdc2 bs=128k # fsck /dev/sdc2 # shutdown -h now switch drives and boot. Or, is it possible to use dump (which worked for me on Sun): # shutdown now (go to single user) # mount /dev/sdc1 /mnt # ufsdump 0uf - /dev/sda1 | (cd /mnt;ufsrestore rvf -) # umount /mnt # fsck /dev/sdc1 # mount /dev/sdc2 /mnt # ufsdump 0uf - /dev/sda2 | (cd /mnt;ufsrestore rvf -) # umount /mnt # fsck /dev/sdc2 # shutdown -h now Will either of these take care of the master boot record? Or, will I have to do something in addition? Best wishes, Peter |
Quote:
Quote:
Quote:
Quote:
Your main issue copying the files will be that ext3 has permission-based access control, and fat32 dosn't. You may want to specify the uid and gid for the copied files, explicitly. Note: you could have just added the drive to the existing one... you can also add extra partitions to your overall swap space or use swap files instead. You may want to consider this post-migration - repartition the old drive for swap, and leave it in place. You get faster performance for processes that access swap and root a great deal (i.e. maths) as the heads don't have as far to move. I've been in your position before, and I found it worked well to put /boot and swap on the small drive and use the big one for root. Of course, for me, that was 4gig and 8gig with RH9. Quote:
|
Quote:
You need to do a test run and keep a log of the useage statistics to be sure - find out how much the RAM and swap actually get used. Adjust accordingly. At the moment, your risc assessment/response seems reasonable for the equipment you have. But, if you double your RAM, you will be surprised at the performance boost. BTW: you are planning to copy the MBR over directly? Why not just install the bootloader to the MBR? (dd is the usual method) |
All times are GMT -5. The time now is 02:04 PM. |