How do I make use of unused space on my boot drive on FreeBSD
I have an old FreeBSD Server (running 7.3-RELEASE) that desperately needs additional storage. In fact, it has some-- the original 20G SCSI drives have been replaced by 300G SCSI drives, so in theory there is 280G available that could be used.
I'd like to make use of this space. I think the best way to do this is by formatting the unused space as a new slice on the existing drive, but I'm not clear how to do this without destroying the data on the existing slice. Most of the documentation I can find about doing this refers to initial installation. I know how to set up slices and partitions during initial installation, but not how to claim unused space on the drive AFTER initial installation.
(I'd also be happy to expand the slice and add additional partitions to the existing slice, but I've heard that this is riskier).
I thought the easy way to do this might be to use /stand/sysinstall
, but when I go into either Configure -> FDisk or Configure -> Label, I get this message:
No disks found! Please verify that your disk controller is being
properly probed at boot time. See the Hardware Guide on the
Documentation menu for clues on diagnosing this type of problem.
This is obviously untrue, since I'm actually running off of a disk when I get this message, but maybe sysinstall just doesn't like messing with the boot disk?
Output of fdisk da0
:
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 35905212 (17531 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Output of bsdlabel da0s1
# /dev/da0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2097152 0 4.2BSD 2048 16384 89
b: 2097152 2097152 swap
c: 35905212 0 unused 0 0 # "raw" part, don't edit
e: 2097152 4194304 4.2BSD 2048 16384 89
f: 29613756 6291456 4.2BSD 2048 16384 89
Update:
I came a cross the advice to use sade for this purpose. Unfortunately, sade can't see much empty space:
0 63 62 - 12 unused 0
63 35905212 35905274 da0s1 8 freebsd 165
35905275 10501 35915775 - 12 unused 0
This may be a dead end. Do I need to figure out drive geometry somehow? It might be relevant to mention that the drive is a RAID 1 mirror set; originally the mirrored drives were both 20G SCSI drives but they've both been swapped out with 300G drives. I'm willing to temporarily break the mirror if that will help.
partition freebsd fdisk scsi
|
show 8 more comments
I have an old FreeBSD Server (running 7.3-RELEASE) that desperately needs additional storage. In fact, it has some-- the original 20G SCSI drives have been replaced by 300G SCSI drives, so in theory there is 280G available that could be used.
I'd like to make use of this space. I think the best way to do this is by formatting the unused space as a new slice on the existing drive, but I'm not clear how to do this without destroying the data on the existing slice. Most of the documentation I can find about doing this refers to initial installation. I know how to set up slices and partitions during initial installation, but not how to claim unused space on the drive AFTER initial installation.
(I'd also be happy to expand the slice and add additional partitions to the existing slice, but I've heard that this is riskier).
I thought the easy way to do this might be to use /stand/sysinstall
, but when I go into either Configure -> FDisk or Configure -> Label, I get this message:
No disks found! Please verify that your disk controller is being
properly probed at boot time. See the Hardware Guide on the
Documentation menu for clues on diagnosing this type of problem.
This is obviously untrue, since I'm actually running off of a disk when I get this message, but maybe sysinstall just doesn't like messing with the boot disk?
Output of fdisk da0
:
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 35905212 (17531 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Output of bsdlabel da0s1
# /dev/da0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2097152 0 4.2BSD 2048 16384 89
b: 2097152 2097152 swap
c: 35905212 0 unused 0 0 # "raw" part, don't edit
e: 2097152 4194304 4.2BSD 2048 16384 89
f: 29613756 6291456 4.2BSD 2048 16384 89
Update:
I came a cross the advice to use sade for this purpose. Unfortunately, sade can't see much empty space:
0 63 62 - 12 unused 0
63 35905212 35905274 da0s1 8 freebsd 165
35905275 10501 35915775 - 12 unused 0
This may be a dead end. Do I need to figure out drive geometry somehow? It might be relevant to mention that the drive is a RAID 1 mirror set; originally the mirrored drives were both 20G SCSI drives but they've both been swapped out with 300G drives. I'm willing to temporarily break the mirror if that will help.
partition freebsd fdisk scsi
Be careful, there were weird "this partition is really the sum of those others" partition schemes in BSD. I did some disk reorganizing under SunOS (BSD derivative). I vaguely remember that the partition table was in the first sector (or so) of the drive, so when fooling around with partitions I'd (a) print the detailed partition table out, and (b) save the partition table somewhere (typically on a floppy disk, I said the memories have faded, didn't I?) before messing around with the partitions. After repartitioning, I'd print the new partiton table and checked entry by entry against the old.
– vonbrand
Feb 7 '13 at 3:29
Yeah, you can see that in partition c in the bsdlabel output.
– davidcl
Feb 7 '13 at 18:28
But that's bsdlabel partitions within the slice. I don't think that's helpful for creating a new slice. I'm guessing the key is drive geometry... but that could be off base.
– davidcl
Feb 7 '13 at 21:28
1
While not BSD specific, before messing with any drive I'm going to do serious partition surgery on, I'd be doing a full backup of the system anyway. Why not use this as a chance to do a fresh install of your server?
– Stephan
Feb 13 '13 at 22:43
1
That's a fair reply; you know your system better than I do. Take my next comment here with the grain of salt it's worth ;) I subscribe to the philosophy that if I have to manually rebuild a server, any server, I've already lost the war. Having managed several dozen mail servers, I much prefer to let my automation software (chef, cfengine, puppet, etc) do the rebuilds. This ensures that if I'm hit by a bus (or a pink slip) the same day a server fails, that standing a new one up takes minutes, not a day. Best of luck to you.
– Stephan
Feb 14 '13 at 19:42
|
show 8 more comments
I have an old FreeBSD Server (running 7.3-RELEASE) that desperately needs additional storage. In fact, it has some-- the original 20G SCSI drives have been replaced by 300G SCSI drives, so in theory there is 280G available that could be used.
I'd like to make use of this space. I think the best way to do this is by formatting the unused space as a new slice on the existing drive, but I'm not clear how to do this without destroying the data on the existing slice. Most of the documentation I can find about doing this refers to initial installation. I know how to set up slices and partitions during initial installation, but not how to claim unused space on the drive AFTER initial installation.
(I'd also be happy to expand the slice and add additional partitions to the existing slice, but I've heard that this is riskier).
I thought the easy way to do this might be to use /stand/sysinstall
, but when I go into either Configure -> FDisk or Configure -> Label, I get this message:
No disks found! Please verify that your disk controller is being
properly probed at boot time. See the Hardware Guide on the
Documentation menu for clues on diagnosing this type of problem.
This is obviously untrue, since I'm actually running off of a disk when I get this message, but maybe sysinstall just doesn't like messing with the boot disk?
Output of fdisk da0
:
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 35905212 (17531 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Output of bsdlabel da0s1
# /dev/da0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2097152 0 4.2BSD 2048 16384 89
b: 2097152 2097152 swap
c: 35905212 0 unused 0 0 # "raw" part, don't edit
e: 2097152 4194304 4.2BSD 2048 16384 89
f: 29613756 6291456 4.2BSD 2048 16384 89
Update:
I came a cross the advice to use sade for this purpose. Unfortunately, sade can't see much empty space:
0 63 62 - 12 unused 0
63 35905212 35905274 da0s1 8 freebsd 165
35905275 10501 35915775 - 12 unused 0
This may be a dead end. Do I need to figure out drive geometry somehow? It might be relevant to mention that the drive is a RAID 1 mirror set; originally the mirrored drives were both 20G SCSI drives but they've both been swapped out with 300G drives. I'm willing to temporarily break the mirror if that will help.
partition freebsd fdisk scsi
I have an old FreeBSD Server (running 7.3-RELEASE) that desperately needs additional storage. In fact, it has some-- the original 20G SCSI drives have been replaced by 300G SCSI drives, so in theory there is 280G available that could be used.
I'd like to make use of this space. I think the best way to do this is by formatting the unused space as a new slice on the existing drive, but I'm not clear how to do this without destroying the data on the existing slice. Most of the documentation I can find about doing this refers to initial installation. I know how to set up slices and partitions during initial installation, but not how to claim unused space on the drive AFTER initial installation.
(I'd also be happy to expand the slice and add additional partitions to the existing slice, but I've heard that this is riskier).
I thought the easy way to do this might be to use /stand/sysinstall
, but when I go into either Configure -> FDisk or Configure -> Label, I get this message:
No disks found! Please verify that your disk controller is being
properly probed at boot time. See the Hardware Guide on the
Documentation menu for clues on diagnosing this type of problem.
This is obviously untrue, since I'm actually running off of a disk when I get this message, but maybe sysinstall just doesn't like messing with the boot disk?
Output of fdisk da0
:
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2235 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 35905212 (17531 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Output of bsdlabel da0s1
# /dev/da0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2097152 0 4.2BSD 2048 16384 89
b: 2097152 2097152 swap
c: 35905212 0 unused 0 0 # "raw" part, don't edit
e: 2097152 4194304 4.2BSD 2048 16384 89
f: 29613756 6291456 4.2BSD 2048 16384 89
Update:
I came a cross the advice to use sade for this purpose. Unfortunately, sade can't see much empty space:
0 63 62 - 12 unused 0
63 35905212 35905274 da0s1 8 freebsd 165
35905275 10501 35915775 - 12 unused 0
This may be a dead end. Do I need to figure out drive geometry somehow? It might be relevant to mention that the drive is a RAID 1 mirror set; originally the mirrored drives were both 20G SCSI drives but they've both been swapped out with 300G drives. I'm willing to temporarily break the mirror if that will help.
partition freebsd fdisk scsi
partition freebsd fdisk scsi
edited Aug 23 '16 at 2:44
Mongrel
2,08131747
2,08131747
asked Feb 7 '13 at 0:11
davidcldavidcl
768
768
Be careful, there were weird "this partition is really the sum of those others" partition schemes in BSD. I did some disk reorganizing under SunOS (BSD derivative). I vaguely remember that the partition table was in the first sector (or so) of the drive, so when fooling around with partitions I'd (a) print the detailed partition table out, and (b) save the partition table somewhere (typically on a floppy disk, I said the memories have faded, didn't I?) before messing around with the partitions. After repartitioning, I'd print the new partiton table and checked entry by entry against the old.
– vonbrand
Feb 7 '13 at 3:29
Yeah, you can see that in partition c in the bsdlabel output.
– davidcl
Feb 7 '13 at 18:28
But that's bsdlabel partitions within the slice. I don't think that's helpful for creating a new slice. I'm guessing the key is drive geometry... but that could be off base.
– davidcl
Feb 7 '13 at 21:28
1
While not BSD specific, before messing with any drive I'm going to do serious partition surgery on, I'd be doing a full backup of the system anyway. Why not use this as a chance to do a fresh install of your server?
– Stephan
Feb 13 '13 at 22:43
1
That's a fair reply; you know your system better than I do. Take my next comment here with the grain of salt it's worth ;) I subscribe to the philosophy that if I have to manually rebuild a server, any server, I've already lost the war. Having managed several dozen mail servers, I much prefer to let my automation software (chef, cfengine, puppet, etc) do the rebuilds. This ensures that if I'm hit by a bus (or a pink slip) the same day a server fails, that standing a new one up takes minutes, not a day. Best of luck to you.
– Stephan
Feb 14 '13 at 19:42
|
show 8 more comments
Be careful, there were weird "this partition is really the sum of those others" partition schemes in BSD. I did some disk reorganizing under SunOS (BSD derivative). I vaguely remember that the partition table was in the first sector (or so) of the drive, so when fooling around with partitions I'd (a) print the detailed partition table out, and (b) save the partition table somewhere (typically on a floppy disk, I said the memories have faded, didn't I?) before messing around with the partitions. After repartitioning, I'd print the new partiton table and checked entry by entry against the old.
– vonbrand
Feb 7 '13 at 3:29
Yeah, you can see that in partition c in the bsdlabel output.
– davidcl
Feb 7 '13 at 18:28
But that's bsdlabel partitions within the slice. I don't think that's helpful for creating a new slice. I'm guessing the key is drive geometry... but that could be off base.
– davidcl
Feb 7 '13 at 21:28
1
While not BSD specific, before messing with any drive I'm going to do serious partition surgery on, I'd be doing a full backup of the system anyway. Why not use this as a chance to do a fresh install of your server?
– Stephan
Feb 13 '13 at 22:43
1
That's a fair reply; you know your system better than I do. Take my next comment here with the grain of salt it's worth ;) I subscribe to the philosophy that if I have to manually rebuild a server, any server, I've already lost the war. Having managed several dozen mail servers, I much prefer to let my automation software (chef, cfengine, puppet, etc) do the rebuilds. This ensures that if I'm hit by a bus (or a pink slip) the same day a server fails, that standing a new one up takes minutes, not a day. Best of luck to you.
– Stephan
Feb 14 '13 at 19:42
Be careful, there were weird "this partition is really the sum of those others" partition schemes in BSD. I did some disk reorganizing under SunOS (BSD derivative). I vaguely remember that the partition table was in the first sector (or so) of the drive, so when fooling around with partitions I'd (a) print the detailed partition table out, and (b) save the partition table somewhere (typically on a floppy disk, I said the memories have faded, didn't I?) before messing around with the partitions. After repartitioning, I'd print the new partiton table and checked entry by entry against the old.
– vonbrand
Feb 7 '13 at 3:29
Be careful, there were weird "this partition is really the sum of those others" partition schemes in BSD. I did some disk reorganizing under SunOS (BSD derivative). I vaguely remember that the partition table was in the first sector (or so) of the drive, so when fooling around with partitions I'd (a) print the detailed partition table out, and (b) save the partition table somewhere (typically on a floppy disk, I said the memories have faded, didn't I?) before messing around with the partitions. After repartitioning, I'd print the new partiton table and checked entry by entry against the old.
– vonbrand
Feb 7 '13 at 3:29
Yeah, you can see that in partition c in the bsdlabel output.
– davidcl
Feb 7 '13 at 18:28
Yeah, you can see that in partition c in the bsdlabel output.
– davidcl
Feb 7 '13 at 18:28
But that's bsdlabel partitions within the slice. I don't think that's helpful for creating a new slice. I'm guessing the key is drive geometry... but that could be off base.
– davidcl
Feb 7 '13 at 21:28
But that's bsdlabel partitions within the slice. I don't think that's helpful for creating a new slice. I'm guessing the key is drive geometry... but that could be off base.
– davidcl
Feb 7 '13 at 21:28
1
1
While not BSD specific, before messing with any drive I'm going to do serious partition surgery on, I'd be doing a full backup of the system anyway. Why not use this as a chance to do a fresh install of your server?
– Stephan
Feb 13 '13 at 22:43
While not BSD specific, before messing with any drive I'm going to do serious partition surgery on, I'd be doing a full backup of the system anyway. Why not use this as a chance to do a fresh install of your server?
– Stephan
Feb 13 '13 at 22:43
1
1
That's a fair reply; you know your system better than I do. Take my next comment here with the grain of salt it's worth ;) I subscribe to the philosophy that if I have to manually rebuild a server, any server, I've already lost the war. Having managed several dozen mail servers, I much prefer to let my automation software (chef, cfengine, puppet, etc) do the rebuilds. This ensures that if I'm hit by a bus (or a pink slip) the same day a server fails, that standing a new one up takes minutes, not a day. Best of luck to you.
– Stephan
Feb 14 '13 at 19:42
That's a fair reply; you know your system better than I do. Take my next comment here with the grain of salt it's worth ;) I subscribe to the philosophy that if I have to manually rebuild a server, any server, I've already lost the war. Having managed several dozen mail servers, I much prefer to let my automation software (chef, cfengine, puppet, etc) do the rebuilds. This ensures that if I'm hit by a bus (or a pink slip) the same day a server fails, that standing a new one up takes minutes, not a day. Best of luck to you.
– Stephan
Feb 14 '13 at 19:42
|
show 8 more comments
2 Answers
2
active
oldest
votes
So it sounds like when you did the replacement of the older disk, you basically just used dd to copy the whole old disk to the new one. So you should be able to create another fdisk partition, which would be da0s2, then put another BSD partition in there, which would be da0s2a. I would use geom to do it, rather than sysinstall or sade. If you can show the output of gpart list
, I can probably walk you through creating the new partition. Of course, be sure to have good backups, etc.
Of course, the nicer thing to do would be to upgrade to 9.1, make the partitions larger, then use growfs to make the existing FS larger, so that the new disk space is part of the same FS. (Normally I like to split things up a little, by having a separate /var and /usr (at least), but I know most people don't these days and at that size disk it can become a bit of a chore to manage where things are stored.)
(Oh, and I guess the best thing would be to switch to ZFS but I imagine if the system had a 20gb disk in it, it's probably 32bit and not a lot of RAM so not ideal for ZFS...)
Edit: Completely missed the part about the mirror. Yeah, breaking the mirror could be one path towards it. Is it hardware RAID mirror or software?
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
add a comment |
A 20GB disk!? Go buy yourself a 16 or 32GB USB thumb drive. Stick it into the box (it'll mount as /dev/daN (with N being the next lowest da device not in use). Using sysinstall, format the USB drive as one large partition and copy your entire disk over to the thumb drive (or to 2 thumb drives if you're paranoid and have no other backups):
sysinstall (configure -> fdisk & label)
cd /mnt/root
dump -0aL -f - / | restore xf -
Then edit /mnt/root/etc/fstab, telling FreeBSD to boot off the thumb drive with a fstab entry like this one:
/dev/da0s1a / ufs ro 1 1
If your BIOS is configured to boot off USB removable media, your next reboot will be off the thumb drive. If not, you can change your BIOS settings or edit /etc/fstab on the main disk to boot off the thumb drive. Now that you have a complete verified backup, go into the RAID BIOS, destroy the volume and create a new (much larger) one. Then you can use the standard FreeBSD utilities to format the new volume.
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f64002%2fhow-do-i-make-use-of-unused-space-on-my-boot-drive-on-freebsd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
So it sounds like when you did the replacement of the older disk, you basically just used dd to copy the whole old disk to the new one. So you should be able to create another fdisk partition, which would be da0s2, then put another BSD partition in there, which would be da0s2a. I would use geom to do it, rather than sysinstall or sade. If you can show the output of gpart list
, I can probably walk you through creating the new partition. Of course, be sure to have good backups, etc.
Of course, the nicer thing to do would be to upgrade to 9.1, make the partitions larger, then use growfs to make the existing FS larger, so that the new disk space is part of the same FS. (Normally I like to split things up a little, by having a separate /var and /usr (at least), but I know most people don't these days and at that size disk it can become a bit of a chore to manage where things are stored.)
(Oh, and I guess the best thing would be to switch to ZFS but I imagine if the system had a 20gb disk in it, it's probably 32bit and not a lot of RAM so not ideal for ZFS...)
Edit: Completely missed the part about the mirror. Yeah, breaking the mirror could be one path towards it. Is it hardware RAID mirror or software?
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
add a comment |
So it sounds like when you did the replacement of the older disk, you basically just used dd to copy the whole old disk to the new one. So you should be able to create another fdisk partition, which would be da0s2, then put another BSD partition in there, which would be da0s2a. I would use geom to do it, rather than sysinstall or sade. If you can show the output of gpart list
, I can probably walk you through creating the new partition. Of course, be sure to have good backups, etc.
Of course, the nicer thing to do would be to upgrade to 9.1, make the partitions larger, then use growfs to make the existing FS larger, so that the new disk space is part of the same FS. (Normally I like to split things up a little, by having a separate /var and /usr (at least), but I know most people don't these days and at that size disk it can become a bit of a chore to manage where things are stored.)
(Oh, and I guess the best thing would be to switch to ZFS but I imagine if the system had a 20gb disk in it, it's probably 32bit and not a lot of RAM so not ideal for ZFS...)
Edit: Completely missed the part about the mirror. Yeah, breaking the mirror could be one path towards it. Is it hardware RAID mirror or software?
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
add a comment |
So it sounds like when you did the replacement of the older disk, you basically just used dd to copy the whole old disk to the new one. So you should be able to create another fdisk partition, which would be da0s2, then put another BSD partition in there, which would be da0s2a. I would use geom to do it, rather than sysinstall or sade. If you can show the output of gpart list
, I can probably walk you through creating the new partition. Of course, be sure to have good backups, etc.
Of course, the nicer thing to do would be to upgrade to 9.1, make the partitions larger, then use growfs to make the existing FS larger, so that the new disk space is part of the same FS. (Normally I like to split things up a little, by having a separate /var and /usr (at least), but I know most people don't these days and at that size disk it can become a bit of a chore to manage where things are stored.)
(Oh, and I guess the best thing would be to switch to ZFS but I imagine if the system had a 20gb disk in it, it's probably 32bit and not a lot of RAM so not ideal for ZFS...)
Edit: Completely missed the part about the mirror. Yeah, breaking the mirror could be one path towards it. Is it hardware RAID mirror or software?
So it sounds like when you did the replacement of the older disk, you basically just used dd to copy the whole old disk to the new one. So you should be able to create another fdisk partition, which would be da0s2, then put another BSD partition in there, which would be da0s2a. I would use geom to do it, rather than sysinstall or sade. If you can show the output of gpart list
, I can probably walk you through creating the new partition. Of course, be sure to have good backups, etc.
Of course, the nicer thing to do would be to upgrade to 9.1, make the partitions larger, then use growfs to make the existing FS larger, so that the new disk space is part of the same FS. (Normally I like to split things up a little, by having a separate /var and /usr (at least), but I know most people don't these days and at that size disk it can become a bit of a chore to manage where things are stored.)
(Oh, and I guess the best thing would be to switch to ZFS but I imagine if the system had a 20gb disk in it, it's probably 32bit and not a lot of RAM so not ideal for ZFS...)
Edit: Completely missed the part about the mirror. Yeah, breaking the mirror could be one path towards it. Is it hardware RAID mirror or software?
answered Feb 18 '13 at 20:50
Steve WillsSteve Wills
1,31869
1,31869
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
add a comment |
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
Hardware RAID. And actually when I replaced the disks, the RAID did all the work-- I just swapped the disks one at a time (the old disks were failing, which is was the primary motivation at the time) and let it rebuild on the new disks. I don't have "gpart" on my system-- is this a part of FreeBSD or a port? If part of FreeBSD, it must have been added after 7.3. Upgrading FreeBSD-- and many other things I should do that might seem sensible-- are non-starters without more disk space, unfortunately.
– davidcl
Feb 18 '13 at 21:59
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
OK, that helps. As far as gpart, it should be there. At least the man page was there in 7.3 freebsd.org/cgi/…
– Steve Wills
Feb 19 '13 at 16:08
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
Oops Comment editing is different than reply editing. Anyway, I guess the thing to do would be to go ahead and create da0s2 and da0s2a and create a new FS on there. Do you need help with that?
– Steve Wills
Feb 19 '13 at 16:10
add a comment |
A 20GB disk!? Go buy yourself a 16 or 32GB USB thumb drive. Stick it into the box (it'll mount as /dev/daN (with N being the next lowest da device not in use). Using sysinstall, format the USB drive as one large partition and copy your entire disk over to the thumb drive (or to 2 thumb drives if you're paranoid and have no other backups):
sysinstall (configure -> fdisk & label)
cd /mnt/root
dump -0aL -f - / | restore xf -
Then edit /mnt/root/etc/fstab, telling FreeBSD to boot off the thumb drive with a fstab entry like this one:
/dev/da0s1a / ufs ro 1 1
If your BIOS is configured to boot off USB removable media, your next reboot will be off the thumb drive. If not, you can change your BIOS settings or edit /etc/fstab on the main disk to boot off the thumb drive. Now that you have a complete verified backup, go into the RAID BIOS, destroy the volume and create a new (much larger) one. Then you can use the standard FreeBSD utilities to format the new volume.
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
add a comment |
A 20GB disk!? Go buy yourself a 16 or 32GB USB thumb drive. Stick it into the box (it'll mount as /dev/daN (with N being the next lowest da device not in use). Using sysinstall, format the USB drive as one large partition and copy your entire disk over to the thumb drive (or to 2 thumb drives if you're paranoid and have no other backups):
sysinstall (configure -> fdisk & label)
cd /mnt/root
dump -0aL -f - / | restore xf -
Then edit /mnt/root/etc/fstab, telling FreeBSD to boot off the thumb drive with a fstab entry like this one:
/dev/da0s1a / ufs ro 1 1
If your BIOS is configured to boot off USB removable media, your next reboot will be off the thumb drive. If not, you can change your BIOS settings or edit /etc/fstab on the main disk to boot off the thumb drive. Now that you have a complete verified backup, go into the RAID BIOS, destroy the volume and create a new (much larger) one. Then you can use the standard FreeBSD utilities to format the new volume.
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
add a comment |
A 20GB disk!? Go buy yourself a 16 or 32GB USB thumb drive. Stick it into the box (it'll mount as /dev/daN (with N being the next lowest da device not in use). Using sysinstall, format the USB drive as one large partition and copy your entire disk over to the thumb drive (or to 2 thumb drives if you're paranoid and have no other backups):
sysinstall (configure -> fdisk & label)
cd /mnt/root
dump -0aL -f - / | restore xf -
Then edit /mnt/root/etc/fstab, telling FreeBSD to boot off the thumb drive with a fstab entry like this one:
/dev/da0s1a / ufs ro 1 1
If your BIOS is configured to boot off USB removable media, your next reboot will be off the thumb drive. If not, you can change your BIOS settings or edit /etc/fstab on the main disk to boot off the thumb drive. Now that you have a complete verified backup, go into the RAID BIOS, destroy the volume and create a new (much larger) one. Then you can use the standard FreeBSD utilities to format the new volume.
A 20GB disk!? Go buy yourself a 16 or 32GB USB thumb drive. Stick it into the box (it'll mount as /dev/daN (with N being the next lowest da device not in use). Using sysinstall, format the USB drive as one large partition and copy your entire disk over to the thumb drive (or to 2 thumb drives if you're paranoid and have no other backups):
sysinstall (configure -> fdisk & label)
cd /mnt/root
dump -0aL -f - / | restore xf -
Then edit /mnt/root/etc/fstab, telling FreeBSD to boot off the thumb drive with a fstab entry like this one:
/dev/da0s1a / ufs ro 1 1
If your BIOS is configured to boot off USB removable media, your next reboot will be off the thumb drive. If not, you can change your BIOS settings or edit /etc/fstab on the main disk to boot off the thumb drive. Now that you have a complete verified backup, go into the RAID BIOS, destroy the volume and create a new (much larger) one. Then you can use the standard FreeBSD utilities to format the new volume.
answered Jun 17 '13 at 17:31
Matt SimersonMatt Simerson
1736
1736
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
add a comment |
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
Heh. Hi Matt! You're actually familiar with this particular server. The flash drive is a great idea, and one I hadn't thought of. Not sure why not. I'll need to make sure the BIOS on this box will actually boot off of USB... it's old enough that this may be in doubt. If the BIOS will not boot off of USB, this sounds a bit more challenging. At the point where I've destroyed my original volume, I no longer have a bootable volume. I could install FreeBSD from optical media, and then restore selectively, but it becomes a little more of a project, no?
– davidcl
Jun 19 '13 at 15:18
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
I'd be VERY surprised if the box wouldn't boot off USB. If the machine has USB ports, it almost certainly has the BIOS option to boot off them (likely as 'removable media'). I wouldn't go recreating the volume until after verifying it. Worst case, you back up to a USB drive, recreate the new volume, boot off CD-R, and then restore to the new disk.
– Matt Simerson
Jun 24 '13 at 7:44
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f64002%2fhow-do-i-make-use-of-unused-space-on-my-boot-drive-on-freebsd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Be careful, there were weird "this partition is really the sum of those others" partition schemes in BSD. I did some disk reorganizing under SunOS (BSD derivative). I vaguely remember that the partition table was in the first sector (or so) of the drive, so when fooling around with partitions I'd (a) print the detailed partition table out, and (b) save the partition table somewhere (typically on a floppy disk, I said the memories have faded, didn't I?) before messing around with the partitions. After repartitioning, I'd print the new partiton table and checked entry by entry against the old.
– vonbrand
Feb 7 '13 at 3:29
Yeah, you can see that in partition c in the bsdlabel output.
– davidcl
Feb 7 '13 at 18:28
But that's bsdlabel partitions within the slice. I don't think that's helpful for creating a new slice. I'm guessing the key is drive geometry... but that could be off base.
– davidcl
Feb 7 '13 at 21:28
1
While not BSD specific, before messing with any drive I'm going to do serious partition surgery on, I'd be doing a full backup of the system anyway. Why not use this as a chance to do a fresh install of your server?
– Stephan
Feb 13 '13 at 22:43
1
That's a fair reply; you know your system better than I do. Take my next comment here with the grain of salt it's worth ;) I subscribe to the philosophy that if I have to manually rebuild a server, any server, I've already lost the war. Having managed several dozen mail servers, I much prefer to let my automation software (chef, cfengine, puppet, etc) do the rebuilds. This ensures that if I'm hit by a bus (or a pink slip) the same day a server fails, that standing a new one up takes minutes, not a day. Best of luck to you.
– Stephan
Feb 14 '13 at 19:42