Solaris 2.6 - Duplicate Filesystem to a larger slice(same drive)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Solaris 2.6 - Duplicate Filesystem to a larger slice(same drive)
# 1  
Old 06-21-2011
Bug Solaris 2.6 - Duplicate Filesystem to a larger slice(same drive)

One of our production systems has a slice called "oldslice" that periodically runs low on space during normal operation. We have minimum requirements for online data retention, and whoever sized this slice didn't give it much wiggle room, so it periodically runs low on space. I'm getting tired of archive files every other week in response to low space alerts.

I discovered(I inherited these systems ) that there is an unused slice on the same drive that is several times larger than then problematic one.

I've used newfs to make a filesystem on the unused slice, and have mounted it under /mnt/newslice .

Now I want to duplicate oldslice's contents to newslice. There are a number of ways to do this, but I want the most reliable and least resource intensive one to do it while the system is active.

This looks promising if it doesn't use too many resources -
Code:
 
cd dir1 && tar -cf – . | (cd dir2 && tar -xpvf -)

ideas?

Last edited by the.gooch; 06-21-2011 at 11:15 PM.. Reason: more info
# 2  
Old 06-22-2011
A couple 'is that the best solution' ideas:
  • Can you use a volume manager to allow you to dole out more space to the old fs?
  • Can you convert the old fs to zfs and compress?
I suppose if you copy one raw partition to the next, you do not get a usable larger file system! Smilie

Using two processes as you did, not 'cp -rp `ls -A` target_dir', will usually speed things, as UNIX is single buffered. If you multiplex the file list to many pairs, you might double the speed again, but files might be a bit more page-interlaced (fragmented). Of course, if they are on the same spindle, cable or controller, that might not speed up much if at all.


If you copy by mod age of inode oldest first, the files will be defragmented, as well, and the future fragmentation tends to occur at the end, in younger files. I am still waiting the fs to end all fs, where the stuff moves and defrags in the background to be mirrored or raid N, compressed, backed up on remote nodes, possibly many, possibly compressed in all or all but one copy, some quiescent files not even copied locally, and with the files relocated so the activity of each device versus the bandwidth of the device is leveled (less active files on larger, slower devices, including CD/DVD/WORM), with old versions also preserved as backup, either mandatory or space available.

Last edited by DGPickett; 06-22-2011 at 10:02 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 Volume Manager - adding slice to metadb

Hi all, I added a new disk slice to the current metadb. Below is what I see bash-3.2# metadb -i flags first blk block count a m p luo 16 8192 /dev/dsk/c0t0d0s7 a p luo 8208 8192 ... (3 Replies)
Discussion started by: javanoob
3 Replies

2. Solaris

Possible to increase swap size for existing UFS-based drive slice?

I like to increase swap size for my current server running solaris 10. Seems like the system is not using it's full 16G of physical memory. #swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 32,1 16 1058288 1058288 # swap -s total: 4125120k bytes... (17 Replies)
Discussion started by: JT-KGY
17 Replies

3. HP-UX

How to move the entire system to a new larger drive?

Hi, I have a problem again and I hope that someone on this forum will help me in solving it. My English is weak, but I'll try to describe it clearly. I have an old computer ( HP B180) with HP-UX 10.20. I've done the hard disk image using G4L and replaced the drive. Old drive has 4.3 GB and 9.1... (7 Replies)
Discussion started by: ftwojtek
7 Replies

4. Solaris

Solaris: Expanding / Extending a mount point / Slice

I'm new to UNIX, sort of inherited this job. I have an HP lefthand SAN, where I added 100GB to one of the volumes. As I understand I also have to expand the volume on the server (solaris 10 ) as well. So, how do I do that? The file system is called: sybdump. the mount point is /export/xxx/sybdump.... (19 Replies)
Discussion started by: Spaseman
19 Replies

5. Solaris

How to make Multiple partitions in a slice (solaris sparc 10)?

I am using Solaris Sparc 10,and facing some issues. HD:80gb ; Root = 11gb(currently using) , I have made a parttition in the c0t0d0s2 slice(which is of 60gb & the partition tag is 'usr'),and I have done newfs on -> /dev/dsk/c0t0d0s2 which is mounted on /export (having ufs filesystem). Now... (6 Replies)
Discussion started by: big_zer0
6 Replies

6. Solaris

Move root filesystem to other slice

Hi, df -h display: # df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1t0d0s0 9.8G 8.1G 1.7G 84% / /proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab fd 0K 0K 0K 0% /dev/fd swap 1.0G 152K 1.0G 1% /var/run swap 1.1G 24M 1.0G 3% /tmp /dev/dsk/c1t0d0s3 57G 13G 43G 24%... (4 Replies)
Discussion started by: lamoul
4 Replies

7. Filesystems, Disks and Memory

How to duplicate a drive in Unix?

I have a drive that I need to make a sector-by-sector or exact image copy of. In Windows, I use a program call Ghost by Symantec, but the version I have does not support Unix. Does anyone know of a good product for Unix? Thanks, Brett Gibson Gibson Teldata, Inc. (13 Replies)
Discussion started by: bgibson
13 Replies

8. Solaris

mirroring the boot slice (slice 8) on x86

Hi there I am about to mirror a Solaris 10 x86 box (SunFire X4100) onto a secondary disk using svm (current system is one disk). My question is this, on X86 boxes there is a slice 8 defined as boot partition (and also a slice 9, dunno what its used for tho). Do I need to mirror this boot slice... (0 Replies)
Discussion started by: hcclnoodles
0 Replies

9. Filesystems, Disks and Memory

Is it possible to resize a slice under Solaris 8

I have encountered my first problem of the year at work with one of our NMS servers. We would like to migrate Cisco Works to Solaris, as it is currently running on NT. The NMS is already running OpenView NNM 6.2 (primary NMS program). Anyhow the /var slice is only 6 mb and is almost full, as... (2 Replies)
Discussion started by: obsolesence
2 Replies
Login or Register to Ask a Question