Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Advice needed on larger disk drive for Ultra 5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
joespr
n00b
n00b


Joined: 30 Jun 2004
Posts: 22

PostPosted: Sun May 20, 2007 12:44 am    Post subject: Advice needed on larger disk drive for Ultra 5 Reply with quote

Hi all,

Need some advice. I have an Ultra 5 which I have installed Gentoo successfully a few months back. Unfortunately, it has its original 9GB IDE drive, which is not sufficient.

So I want to move it all to a larger drive. So I went out and bought a 120GB drive. What's the best/easiest way to move everything from the 9GB to the 120GB, and resizing the partitions, without reinstalling from scratch?

I've tried to use g4l (ghost 4 linux) by putting both drives on a Intel box. It works (Click'n'Clone feature is quite nice) to move the partitions, but later on the Ultra5, booted from CD, trying to resize the partitions using parted gives me endless errors-- things like 'warning -- block xxxx shouldn't have been moved' and 'block relocator should have been relocated...' and 'group 3's inode table at xxx conflicts with some other fs block' etc.

So I tried to start from scratch with the larger drive. Booted from a CD, deleted all partitions. Created a sun label (whole drive). Then tried to create partitions. Seems to go OK in fdisk, but get errors 'attempt to read sectors xxxx outside of partition' and when loading parted it cant even read the partition table.

I see when creating the sun label there are some values I can choose, but I dont know what is right for me. With all the defaults, I run into the troubles listed; also when trying a few other variations. My plan with creating all the partitions is hopefully I could also mount the second drive and then move all files from the smaller to the larger drive. But to do this, I need the larger drive is good condition.

Have I bought a disk that the Ultra 5 cannot support, and I need to buy a different drive? Or do I need to vary these settings when greating the sun label?

Also, I read that partition 1, the / partition, must be less than 2GB, is that true? (Can it be 2048MB?).

What is the best way for me to move everything from the 9GB to the 120GB?

Thanks,
joespr
Back to top
View user's profile Send private message
gtbX
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 99

PostPosted: Mon May 21, 2007 1:53 am    Post subject: Reply with quote

I'm not an expert in copying partitions, or Sparc's, but this would be my guess:

Boot from a CD, but with both the 9GB drive and the 120GB attached. fdisk the 120GB with a new Sun disklabel, and partition it as you wish. Remember the main difference from intel disklabels, that partition 3 must be left alone. Then mount both drives under /mnt as if you were doing a new install - ie / on the 9G mounted as /mnt/9G, /home on the 9G as /mnt/9G/home... Then do a cp -av /mnt/9G /mnt/120G. The only thing left to do would be install SILO on the 120G, and reboot with it.

I don't think there is a 2GB limit for / on the U5. I've got a 80GB drive in mine, with 20GB for / and the rest on swap and /home
Back to top
View user's profile Send private message
McTango
n00b
n00b


Joined: 11 Dec 2004
Posts: 66
Location: Formosa - Argentina

PostPosted: Mon May 28, 2007 6:19 pm    Post subject: Advice needed on larger disk drive for Ultra 5 Reply with quote

I have an Ultra5 and i didn't have any problems with a Samsung HD (80 GB).
When i created the Sun Disklabel, i remember that i've selected defaults values and worked ok.
A friend of mine have an Ultra5 with a 120GB HD working ok too.
I don't remember the Sun Disklabel configuration to show you for compare.

This is my "fdisk" information... may be helps you in some way:
Code:
Disk /dev/hda (Sun disk label): 255 heads, 63 sectors, 9731 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/hda1             0      1245  10000462+  83  Linux native
/dev/hda2          1245      1307    498015   82  Linux swap
/dev/hda3             0      9731  78164257+   5  Whole disk
/dev/hda4          1307      3413  16916445   83  Linux native
/dev/hda5          3413      5519  16916445   83  Linux native
/dev/hda6          5519      7625  16916445   83  Linux native
/dev/hda7          7625      9731  16916445   83  Linux native



Now, i'll tell you how i make my system's backup (every two months or after a general system update).
My preference is to make a TARRED BZIPPED (tar.bz2) compressed image of my system's partition.
It's easy to make and fast to recovery (not so fast when making the image).
I can restore it over new partition scheme if i wish, and i can burn the image on CD or DVD for restoring in case of unrecoverable system crashes.

I don't know your filesystem's configuration and partition scheme, but it's easy to apply to any configuration.
First of all, yo must identify the partitions that holds system's files, i mean:

/
/home
/usr
/var

In my case, i use only one partition (/dev/hda1 type ext3) for all system's files (never had problems after 4 years of continue running and a lot of power downs, and my friend with his 120GB is using the same partition scheme for over 4 years with no problems).
Partitions 4 to 7 i use to store data files, so i don't back up them on the same image (i make backups of this partitions on different images each).
It's up to you to decide the best partition scheme, but the most important thing before continue is:
You must have at least one data partition with enough space (at least 1 GB free or more) to store the system's image.

BACKUP THE SYSTEM:

Assuming that you've decided to use the same partition scheme as Handbook says, and had a free partition to use as data storing (eg.: /dev/hda7), this are the steps to create the image:

Boot from InstallCD (or LiveCD) as instructed in Handbook.
For creating the image, it's not necesary to configure the Network.
And, of course, you already have the partition scheme on the disk, so you don´t have to create any partition (unless you didn´t make the data partition).

In case that all your partitions are ext3 type (if not, replace "ext3" with the filesystem type):
Code:
mount -t ext3 /dev/hda1 /mnt/gentoo    (in my case, this is the only mount i must do)

mkdir /mnt/gentoo/usr
mount -t ext3 /dev/hda4 /mnt/gentoo/usr

mkdir /mnt/gentoo/var
mount -t ext3 /dev/hda5 /mnt/gentoo/var

mkdir /mnt/gentoo/home
mount -t ext3 /dev/hda6 /mnt/gentoo/home
Now you must mount the data partition to store the image:
Code:
mkdir /mnt/mydata
mount -t ext3 /dev/hda7 /mnt/mydata
At this point, all system's files are ready to be backed up:
Code:
cd /mnt/gentoo   (<-- don't forget this step before the tar command)
tar -cjpvf /mnt/mydata/image-AAAAMMDD.tar.bz2 *
It takes about one hour to complete the proccess, and the size of the resulting image is about 500 to 700 MB (depending on how much packages are installed).
You can choose how to name the image file.
I use the name of my server followed by the date. (eg.: darwin-20070528.tar.bz2)

When the image is ready, you can umount all partitions and reboot the system.
Code:
cd /
umount /dev/hda1
umount /dev/hda4
umount /dev/hda5
umount /dev/hda6
umount /dev/hda7
reboot
That's all for creating the image.
You have it on /dev/hda7 partition and it can be burned on CD (if avaiable), or can be uploaded (SAMBA, scp, HTTP, FTP) to other servers or PCs over the network.


RESTORING THE SYSTEM:

Restoring the system is faster if you have the image stored in a data partition.
The steps are exactly the same as described for backing up the system, except for the tar command.

The command to restore files is:
Code:
cd /mnt/gentoo   (<-- don't forget this step before the tar command)
tar -xjpvf /mnt/mydata/image-AAAAMMDD.tar.bz2
Uncompressing the image is faster than compressing, and it takes about 30 to 40 minutes.

If you have a new-fresh-unpartitioned disk, then it will be necesary the networking configuration when booting from CDROM.
When the network works, you must prepare the partitions following Handbook's instructions, including the creation of data partition to store the image.
The image (previously created) must be avaiable in a remote server accessible via any network protocol, like HTTP, FTP, SSH.
After mounting all partitions (data partition including), you must download the image from the remote server.
First, change to data directory:
Code:
cd /mnt/mydata
Then, download the image:

HTTP:
Code:
wget http://my.http.remote.server/download_folder/image-AAAAMMDD.tar.bz2
FTP:
Code:
wget ftp://my.ftp.remote.server/download_folder/image-AAAAMMDD.tar.bz2
SSH:
Code:
scp user@my.ssh.remote.server:/path_to_image/image-AAAMMDD.tar.bz2 /mnt/mydata/
Now, you have the image in the data partition, and you can restore it as instructed before.

The last steps in "RESTORING THE SYSTEM" is to instruct SILO how to boot the new restored system:
Code:
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
/sbin/silo -f
If you don't remember the root password, you can set up a new password at this point:
Code:
passwd
Now, you can reboot and enjoy your restored system:
Code:
exit
cd
umount /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo/home /mnt/gentoo/usr /mnt/gentoo/var /mnt/gentoo /mnt/mydata
reboot



I hope this helps.
Bye.
_________________
Charly Tango
Formosa - Argentina
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
To emerge, or not to emerge: that is the question.
_________________
Back to top
View user's profile Send private message
gerrit_hoekstra
n00b
n00b


Joined: 05 Jun 2007
Posts: 9
Location: In a forest in the UK

PostPosted: Mon Jun 11, 2007 10:40 am    Post subject: Reply with quote

joespr,

In answer to your original question: Yes, the root partition may not be larger than 2GB.

I have managed to successfully install a Seagate 160G disk on an Ultra5. When I created the Sun label with fdisk, I selected the defaults offered. I have also built another Ultra5 (a company I know chucked a load of them out) with an IBM 20GB disk - again the defaults did the trick. However, I could not for love or money (neither default values nor manufacturer's specs) get a Maxtor 80G disk to work - it kept on seeing a 2G disk after the Sun label was created.
_________________
Ultra5-360 1GB Ram, Ultra5-333 380MB, Ultra10-440 192MB - all Gentoo Linux. And now loads of Raspberry PIs!
Remember Kids, it's always fun until someone gets hurt. Then it's utterly hilarious!
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Mon Jun 11, 2007 12:08 pm    Post subject: Reply with quote

The 2G root partition limit is for old sparc32 boxes.
Otherwise how could you explain this...

Jun 1 09:26:22 ayanami Probing IDE interface ide0...
Jun 1 09:26:22 ayanami hda: WDC WD1200BB-00DAA3, ATA DISK drive
Jun 1 09:26:22 ayanami ide0 at 0x1fe02c00000-0x1fe02c00007,0x1fe02c0000a on irq 14
Jun 1 09:26:22 ayanami Probing IDE interface ide1...
Jun 1 09:26:22 ayanami hdc: HL-DT-ST DVDRAM GSA-4081B, ATAPI CD/DVD-ROM drive
Jun 1 09:26:22 ayanami ide1 at 0x1fe02c00010-0x1fe02c00017,0x1fe02c0001a on irq 14 (shared with ide0)
Jun 1 09:26:22 ayanami hda: max request size: 512KiB
Jun 1 09:26:22 ayanami hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=16383/255/63, (U)DMA
Jun 1 09:26:22 ayanami hda: cache flushes supported
Jun 1 09:26:22 ayanami hda: hda1 hda2 hda3

Filesystem Size Used Avail Use% Mounted on
/dev/hda1 110G 97G 7.5G 93% /
udev 252M 5.2M 247M 3% /dev
shm 252M 0 252M 0% /dev/shm

Linux ayanami 2.6.21-gentoo-r2 #1 Wed May 30 14:19:00 ART 2007 sparc64 sun4u TI UltraSparc IIi (Sabre) GNU/Linux

(It's a U5, yes).
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Mon Jun 11, 2007 3:04 pm    Post subject: Reply with quote

FYI, I traded a video card for an SATA/USB2/Firewire combo card. It's working great with a 250GB Sata drive on it. I can't boot from it, so /boot is still on the internal IDE with everything else on the 250 GB. I had to mount the second HDD under the floppy drive. I'm thinking about ditching the floppy, and putting in a second 250 for RAID1 since it's my home fileserver.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
gerrit_hoekstra
n00b
n00b


Joined: 05 Jun 2007
Posts: 9
Location: In a forest in the UK

PostPosted: Wed Jun 13, 2007 5:48 pm    Post subject: Reply with quote

I followed joespr's steps above for creating an install image and used the image to clone another Ultra5. A huge time saver! However, my cloned machine would not boot past the 'S' in the SILO prompt until I booted with the install CD and chrooted to /mnt/gentoo and executed:
Code:
/sbin/silo -f -C /boot/silo.conf

How SILO works is not clear to me and I relied on intuition. Is there an explanation for this?
_________________
Ultra5-360 1GB Ram, Ultra5-333 380MB, Ultra10-440 192MB - all Gentoo Linux. And now loads of Raspberry PIs!
Remember Kids, it's always fun until someone gets hurt. Then it's utterly hilarious!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum