Pages: << 1 2 3 4 5 6 7 8 9 10 >>
This is so easy, the second time 7|
You will need somewhere to mount the ISO. If you are expecting to do this more than once then create a specific ISO directory.
Now you can mount the iso,
To access the iso image simply cd or access /media/iso which is now the root of your image.
When you are all done you can umount the image with
So you need to make some changes to the partitions on a hard disk whether it is adding new partitions, deleting partitions, resizing them or simply making a clone of a disk. You can use parted. fdisk and sfdisk both state that:
For this reason I use parted in place of fdisk. It is very straight forward to use but does need some thought before diving in. Changes are put into place immediately and there is no undo option. When using parted or any other tool that manipulates the partition tables of your hard disk, make sure you have a backup of your data and that it can be restored! Better still play around with a virtual machine first, while you are learning.
Pages: 1 · 2
These are a bunch of things I have picked up over the years and now do routinely. they have each saved me from losing real data or stopped me trashing my system and making it non functional.
1. Take regular backups and better still automate it so you don't have to remember to do it or find the time to do it. I use BackupPC for this task
Having made the effort to take regular backups make sure that you can restore from your backups. Yes and I do mean actually restore the data.
Many years ago I saw this happen. The company concerned took regular nightly backups on their Wang system to tape. Taking the tapes off site for long term storage. One day they had a hard disk crash. The old style head crash when the head literally crashed into the platter, Scoring and removing the recording medium.
They didn't panic they thought they had good backups from last night that they could just restore to a new hard disk platter. Any way the new hard disk platter arrived and was formatted. The first tape of five was inserted into the drive and the restore began, when the tape got to the end they did not see a message that said "Insert second tape" they got a fatal error saying "End of tape reached before end of file". On contacting Wang support they were told "Oh this is a known bug. It a file spans over two tapes you cannot restore the backup past that tape!" They lost most of their data as it could not be restored. They went bust shortly after as they were an Accountancy firm who had lost their clients financial records!
Pages: 1 · 2
You have two devices of approximately same size and want to mirror the data on one of them to the other to make your system more secure.
Use the p command to see the current partitions on the drive or just to make sure you have the right one ![]()
Add a new partition making sure the same size will fit on both disks if they are not exactly the same.
Lastly set the dick ID type to Linux RAID. This is what it would be set to if you have created the RAID 1 array while installing Ubuntu. I'm not going to argue with the guys that produce this great Linux distribution. ![]()
Just one more check that all is as expected before writing the new values to the disk.
This looks good to me so write away!
Do the same again for he second disk and we will be ready to create the new mirrored disk array.
Note: I used md1 as the device name as I already used md0 for the raid 5 array. You can now watch the array sync itself over the two disks.
You will of course need to format it, I use reiserfs so this is done with the following command. I like to label my disks as I think its make life a little simpler.
You can now mount the drive from the command line using
or from within the fstab file with any ONE of the following. The UUID can be found by looking at the message given out from the command above when you put reiserfs on the array.
The same method can be used to create RAID5 or RAID0 arrays. take a look at he RAID Setup pages here.
Finally you will need to update mdadm.conf with the new drive adding it to the existing list. Too find out all the UUIDs on the system you can use
Edit /etc/mdadm/mdadm.conf and add the new drive to the ARRAY that of disk you have added the new drive to. Do not just copy my UUIDs they will not be the same as yours
D
Now you need to rebuild the RAM disk image initrd.
Take a look at the man pages for mdadm.conf and update-initramfs.
You can increase the size of your RAID 5 disk array by swapping out each disk in turn with a larger disk. This takes time, a lot of time if you have many disks in your array.
It is also very important to note that during the process your data is at risk until the resync process has finished. You did complete a full backup didn't you!The following will need to be repeated for each drive you have in your disk array. The steps can all be done on a running and mounted system if you use reiserfs.
Select the drive you are going to replace and run the following commands. These will firstly mark the drive as faulty so it is no longer used. The second will remove it from the array. You have to do this as you cannot simply remove a good disk from a RAID array.
I like to run the following in a separate window. The command displays and re-displays the contents of /proc/mdstat every 7 seconds and shows you the status.
You can now turn off your machine and swap out the old hard drive, adding the new larger one in its place. This drive needs to be partitioned before being added to the array. You must make the partition the full size of the disk or the size you want to use in the new RAID array. For example if the old drive was 250Mb and you are swapping in 1Gb drives you make the partition 1Gb not 250Mb.
You also need to set the partition type or ID to 0xDA - Non-fs data or 0xFD, Linux raid autodetect. I use 0xFD as that is what Ubuntu Linux uses if you install from scratch using RAID.
To get a list of commands that fdisk accepts type 'm', just like the prompt says ![]()
First check it is the right disk with 'p' print the partition table. There should be nothing displayed under the headings , if this was a brand new disk.
n add a new partition to add create the new partition I use a primary partition and set it to number 1. Then accept the defaults for the beginning and ending cylinder, to use the whole disk.
t change a partition's system id to set the id to '0xFD' you type just fd
and finally one last check all is well I print out what will be written with 'p' again.
Now we can add the new disk to the array with the following:
You will see that after a few seconds your hard disks burst into life and stay active. The RAID array is being resynced and can take a few minutes to many hours. Time for a coffee
Running the cat /proc/mdstat with watch at this point you will see the process run through until it is finished. Do not interrupt the process or it will start all over again. You can use your system while this is happening.
Repeat the above steps for all drives in your array before going on to the steps below.So you have now replaced all your disks with larger drives. You can now grow the RAID array
The array now represents one disk using all of the new available space. If you check the disk usage with the 'df' command nothings has changed! What's up with this?
One last step you must resize the file system on the partition. I use reiserfs so this can be done on the fly while the system is still mounted.
Now when you check the disk usage you will see the correct size of the RAID array.
All done!
Pages: 1 · 2