Basic question regarding root file system copy to another disk
Hello,
I am creating a new disk using the following command:
after creating the disk, i tool a ufsdump of a solaris 10 filesytem (disk size 512MB)
and then restored the dump files onto the newly created 2GB disk (after creating a newfs and mounting that disk to /mnt/sol_2gb):
after that, i installed the boot block on the 2gb disk:
where, c0t0d0s3 is the newly created 2gb disk.
then I try to use the 2 gb disk to boot the system just by using the boot command.
This is when the SMF services start to load and after everything is loaded, I get the errors. (see attached image)
I am using Legion which is a T-2000 simulator (T-1 processor, sun4v arch). I have attached the config. file for the simulator.
When i boot from the original 512Mb image, there is no issue at all.
Could someone help me with why just copying the file system to a bigger disk maybe causing so much trouble.
Let me say straight away that the question you ask is not "basic".
What you are trying to do is fundamentally a DR routine and setting up the root (boot) on a new disk in a different slot to the original boot drive.
I am not familiar with the T-2000 simulator you are using but, disregarding that, the check list for such an operation on standard Sun hardware for a UFS boot partition is:
label the disk
set the vtoc
restore the root filesystem
edit (if necessary) the system file (/etc/system)
create any new required device nodes (/dev/<node>)
edit (if necessary) the vfstab file (/etc/vfstab)
write out the bootblk appropriate to the hardware platform
Once that is all done, you will definitely have seriously changed the boot filesystem so you must do an orderly shutdown and then tell Solaris to reconfigure on booting with:
Code:
ok> boot -r
the first time that you boot. If the O/S is pre-10u3 you then need to update the boot archive. Boot archive architecture was not used after 10u3.
You don't indicate your level of expertise and some of the above might need to be expanded for you. If so, just post back. Some of the above would normally be done whilst booted from CD and the new root filesystem mounted under /a.
Thanks hicksd8.
I didn't have the idea that it needs all those steps to be done.
I am surely not expert, but have some idea of the stuff. If possible, could you give me some steps for creating this virtual disk with extra space from the existing one.
For starter, when I run "format" command on the simulator, on just the original one, I get errors:
Code:
bash-3.00# format
Searching for disks...WARNING: hsimd_ioctl: cmd 410 not implemented
Error: Device c0t0d0: controller name (SUNW,sun4v-virtual)
is invalid. Device will not be displayed.
done
No disks found!
Also, if i just use the following command to clone the original disk, it works just fine:
So 'format' doesn't find the original disk that boots okay?
Perhaps that is not an error in this virtualised environment. I repeat, I do not know your 'simulator' environment.
However, in your post#1, you say that the newly created (virtual) disk is device c0t0d0s3. If it doesn't show in 'format', how did you know that?
It is likely that this platform has its own boot block(s) for booting so I would be careful writing boot blocks out. (Boot blocks reside in sectors 0 and 1 of the physical drive and, after execution, pass control to the partition it's booting from.
Also, if you are changing from booting from c0t0d0s0 to booting from c0t0d0s3 then the device nodes /dev/dsk/c0t0d0s3 and /dev/rdsk/c0t0d0s3 must exist on that filesystem before it can be booted from. ALSO, if /usr is a separate filesystem, the /etc/vfstab must tell Solaris where to find that. The nodes for that device must exist too. So (if /usr is not included on the root filesystem) it must be an available device for Solaris to boot. Other filesystems may fail to mount but the system will still boot.
Hello hicksd8,
I created the (virtual) disk (using dd, ufsdump, ufsrestore) in a physical machine. Then in the Legion simulator config file, there is an option to add that disk to slice 3 of c0t0d0s# which I did. Thus I was calling the disk to be at c0t0d0s3.
Code:
// disk ... must use virtual_disk directive
device "memory" 0x1f40000000 +513M {
virtual_disk;
load s0 rom "disk.s10hw2";
load s3 shared "sol_2gb";
}
When I am trying to boot with just the newly created disk (sol_2gb), I replace the "disk.s10hw2" in s0 with the new disk name and comment out the s3 line.
Here is my /etc/vfstab in the simulator with just the original disk (disk.s10hw2)"
Code:
bash-3.00# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /export ufs 1 no -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
---------- Post updated at 11:16 AM ---------- Previous update was at 11:12 AM ----------
Quote:
Originally Posted by gull04
Hi Zam,
Can you post the output of
Code:
echo | format
And assuming that this is an LDOM, the config using the
Code:
ldm list-bindings
Sorry this should be executed in the control domain
Regards
Dave
Dave,
here is the output from the simulator:
Code:
bash-3.00# echo | format
Searching for disks...WARNING: hsimd_ioctl: cmd 410 not implemented
Error: Device c0t0d0: controller name (SUNW,sun4v-virtual)
is invalid. Device will not be displayed.
done
No disks found!
bash-3.00# ldm list-bindings
bash: ldm: command not found
I have had a look around on the web for things related to this, I see you have posted this in a couple of places looking for help.
So lets start at the begining, you say you created the virtual disk in aphysical machine, what physical machine first?
I can see from the vfstab that you have what looks like a standard set of mounted file systems with slice 3 mounted on /export.
What I'm strugling with is this other slice 3 that you have created presumably in the host machine which is presumably passed to the virtual as s3, and you can't see it from the virtual.
If you boot from the original disk and in the virtual environment you run
Hi All
After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
I was hoping to edit the command below to copy a file "start.bin" from the install cd to /root on the installation machine.
d-i preseed/late_command string \
wget -O /target/root/start.bin 'http://abc.start.bin' \
&& in-target chmod 755 /root/start.bin \
My best guess is it would... (0 Replies)
No doubt these questions have been answered many times, but I struggled to find them - sorry. 2 questions:
1. I wish to read in a file one line at a time and do 'stuff' with it, such as:
file="tst2"
while IFS= read -r line
do
echo `wget -qO -... (3 Replies)
Hi All
Hope it's okay to post on this sub-forum, couldn't find a better place
I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
*This is not homework I am new to UNIX and want to try this Monitoring a file demo*
*If this is the wrong forum please move it - im new to the forums*
$1 = the file to be monitored
$2 = the time for the file to sleep
If the file gets changed (using -nt) it will send my username mail saying... (2 Replies)
I have a csv file with 3 columns. Column 1 is a date "mm/dd/yyyy", column 2 is a dollar amount (e.g. "100.00") & column 3 in a description of where the transaction took place (e.g. "CHECK CRD PURCHASE 10/07 ACME INC USA")
so...
"10/01/2009","100.00", "CHECK CRD PURCHASE 10/07 ACME INC USA"
I... (1 Reply)
Hi,
We have an FTP server (vsftpd) running on Linux, that I've kinda built a "Data Management" system around. I could use some ideas as to the best way to handle/create "triggers" for file notifications.
Internal users drag 'n drop files from their Windows boxes to the server via Samba... (2 Replies)
i am novice in unix. in me office my boss hav given me a system with Unix OS. i know about windows and Dos. in dos we access cd or floppy through writing following commands a: or d: copy filename.ext to a:
i dont even now how to access CD Rom or floppy drive in unix. please tell... (1 Reply)
how to i find out the disk usage on a server.
say in windows examples its like C:/ D:/ and checking out the disk space.
how can i find in Unix.
can i just use df -k (3 Replies)
I'm using AIX 3 on IBM PowerStation 520's in a couple of flight simulators where I work. I recently upgraded our disk systems from three 355Mb disks to single 2GB flashdisks. The disk backup utility provided by the manufacturer will only copy 355Mb disks.
I need a basic disk copy routine... (0 Replies)